governing-logic-placement

Official

Database vs. Application Logic

Authormusher-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured decision framework to determine the optimal placement of business logic, ensuring data integrity and maintainability by deciding whether logic belongs in the database layer or the application layer.

Core Features & Use Cases

  • Decision Matrix: A clear table guiding placement decisions for various logic types (e.g., constraints, RLS, workflows).
  • Database Layer Guidance: Detailed explanations and examples for using CHECK constraints, Foreign Keys, RLS, EXCLUDE constraints, partial unique indexes, and deferrable constraints.
  • Application Layer Guidance: Explanations for placing workflow orchestration, dynamic business rules, and complex calculations.
  • Hybrid Patterns: Best practices for audit trails and updated-at timestamps.
  • Use Case: When designing a new feature that requires enforcing a business rule, use this Skill to decide if the rule should be a database constraint or an application-level validation.

Quick Start

Use the governing-logic-placement skill to decide where to implement a new business rule that ensures a user cannot have more than 5 active API keys.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: governing-logic-placement
Download link: https://github.com/musher-dev/bundles/archive/main.zip#governing-logic-placement

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.