rules-vs-skills
Explain when to use always-on Rules vs on-demand Skills. Use when the team is confused about where to encode guidance, deciding between rules and skills, or understanding the difference between invariants and procedures.
Best use case
rules-vs-skills is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Explain when to use always-on Rules vs on-demand Skills. Use when the team is confused about where to encode guidance, deciding between rules and skills, or understanding the difference between invariants and procedures.
Teams using rules-vs-skills should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rules-vs-skills/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rules-vs-skills Compares
| Feature / Agent | rules-vs-skills | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Explain when to use always-on Rules vs on-demand Skills. Use when the team is confused about where to encode guidance, deciding between rules and skills, or understanding the difference between invariants and procedures.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Rules vs Skills ## Quick Decision Guide **Use Rules when:** - ✅ Always-applied invariants (safety, scope, format) - ✅ Non-negotiable principles (constitution, core policies) - ✅ Context-independent constraints (file paths, output format) - ✅ Short, declarative statements **Use Skills when:** - ✅ On-demand procedural workflows - ✅ Multi-step processes (bootstrap, report generation) - ✅ Explicit invocation needed (user says "go", runs command) - ✅ Context-dependent procedures ## Rules Overview ### Characteristics - **Always applied**: `alwaysApply: true` in frontmatter - **Automatic**: No explicit invocation needed - **Invariants**: Safety, scope, format constraints - **Short**: Declarative statements, not procedures - **File-scoped**: Can use `globs` to target specific files ### Rule File Structure ```markdown --- description: Brief description globs: ["**/*"] # Optional: file patterns alwaysApply: true --- ## Section - Rule statement 1 - Rule statement 2 ``` ### Example Rules **000-core.mdc** (Core invariants): ```markdown ## Safety (file ops) - Inventory/Search is read-only. - Any write action must follow **Plan → Human Approve → Apply**. - delete is OFF by default (use quarantine). ## Scope guard - Default edits: `src/**`, `tests/**` ``` **010-tdd.mdc** (TDD principles): ```markdown - SoT = `plan.md`. - When user says **go**, select the **next unchecked test** only. - Loop: **RED → GREEN → REFACTOR**. ``` **015-constitution-cursor.mdc** (Non-negotiable): ```markdown - The principles in `docs/constitution.md` are non-negotiable. - If any instruction conflicts, stop and surface the conflict. ``` ## Skills Overview ### Characteristics - **On-demand**: Explicitly invoked (user request or command) - **Procedural**: Step-by-step workflows - **Context-dependent**: May require specific conditions - **Reusable**: Can be called multiple times - **Detailed**: Comprehensive instructions and examples ### Skill File Structure ```markdown --- name: skill-name description: What this skill does and when to use it --- # Skill Name ## When to Use - Specific trigger scenarios ## Instructions 1. Step-by-step procedure 2. Commands and examples 3. Integration points ``` ### Example Skills **tdd-go** (TDD workflow): - Triggered when user says "go" - Multi-step: RED → GREEN → REFACTOR - Updates plan.md - Integrates with implementer agent **inventory-report** (Report generation): - Triggered for weekly/monthly audits - Runs commands to generate reports - Saves output to `_meta/reports/` - Can be called on-demand **plan-gated-apply** (File operations): - Triggered for file organization - Multi-step: Plan → Approve → Apply - Requires approval gate - Transactional execution ## Decision Matrix | Aspect | Rules | Skills | |--------|-------|--------| | **When applied** | Always (automatic) | On-demand (explicit) | | **Type** | Invariants, constraints | Procedures, workflows | | **Length** | Short, declarative | Detailed, step-by-step | | **Invocation** | Automatic | User request or command | | **Context** | Context-independent | Context-dependent | | **Examples** | Safety policies, format | Report generation, setup | ## When to Use Rules ### ✅ Good for Rules **Safety Invariants:** - "Any write action must follow Plan → Approve → Apply" - "delete is OFF by default (use quarantine)" - "Inventory/Search is read-only" **Scope Constraints:** - "Default edits: `src/**`, `tests/**`" - "Setup allowed: `.cursor/**`, `.github/**`" **Output Format:** - "Outputs follow: ExecSummary → Visual → Options → Roadmap" - "Numbers: 2-dec" - "KR concise + EN-inline allowed" **Non-negotiable Principles:** - "The principles in `docs/constitution.md` are non-negotiable" - "SoT = `plan.md`" **TDD Invariants:** - "When user says **go**, select the **next unchecked test** only" - "Loop: RED → GREEN → REFACTOR" ### ❌ Not Good for Rules - Multi-step procedures - Commands that need to be run - Context-dependent workflows - Detailed instructions - Examples and troubleshooting ## When to Use Skills ### ✅ Good for Skills **Procedural Workflows:** - Report generation (`inventory-report`) - Setup procedures (`repo-bootstrap`, `everything-provider-setup`) - Validation processes (`plan-validate`, `release-check`) - TDD cycles (`tdd-go`) **On-demand Tasks:** - User says "go" → `tdd-go` - Weekly audit → `inventory-report` - Release prep → `release-check` - File organization → `plan-gated-apply` **Multi-step Processes:** - Plan → Approve → Apply workflow - TDD: RED → GREEN → REFACTOR - Setup: Install → Configure → Validate **Integration Procedures:** - Everything provider setup - CI/Pre-commit configuration - Agent selection guidance ### ❌ Not Good for Skills - Always-applied safety constraints - Non-negotiable principles - Short declarative statements - Context-independent invariants ## Common Patterns ### Pattern 1: Safety + Workflow - **Rule**: "Any write action must follow Plan → Approve → Apply" (invariant) - **Skill**: `plan-gated-apply` (how to execute the workflow) ### Pattern 2: TDD Principles + Execution - **Rule**: "When user says **go**, select the **next unchecked test** only" (invariant) - **Skill**: `tdd-go` (how to execute TDD cycle) ### Pattern 3: Scope + Procedures - **Rule**: "Default edits: `src/**`, `tests/**`" (scope constraint) - **Skill**: `repo-bootstrap` (how to set up project structure) ## Examples from This Project ### Rules Examples **000-core.mdc:** ```markdown ## Safety (file ops) - Inventory/Search is read-only. - Any write action must follow **Plan → Human Approve → Apply**. - delete is OFF by default (use quarantine). ``` → **Why Rule**: Always-applied safety invariant **010-tdd.mdc:** ```markdown - SoT = `plan.md`. - When user says **go**, select the **next unchecked test** only. ``` → **Why Rule**: Always-applied TDD principle ### Skills Examples **tdd-go:** - Multi-step TDD workflow - Detailed instructions for RED/GREEN/REFACTOR - Integration with agents → **Why Skill**: On-demand procedural workflow **inventory-report:** - Runs commands to generate reports - Saves output to specific location - Can be called for audits → **Why Skill**: On-demand report generation **plan-gated-apply:** - Multi-step: Plan → Approve → Apply - Detailed workflow instructions - Integration with multiple agents → **Why Skill**: Complex procedural workflow ## Migration Guide ### Moving from Rule to Skill If a rule becomes too detailed or procedural: 1. Create new skill file 2. Move detailed instructions to skill 3. Keep invariant in rule (reference skill if needed) 4. Update rule to be declarative only ### Moving from Skill to Rule If a skill contains always-applied invariants: 1. Extract invariant to rule 2. Keep procedure in skill 3. Reference rule from skill 4. Ensure rule is declarative ## Best Practices ### Rules - ✅ Keep short and declarative - ✅ Focus on invariants and constraints - ✅ Use globs for file-specific rules - ✅ Group related rules in same file - ❌ Don't include procedures or commands - ❌ Don't include examples or troubleshooting ### Skills - ✅ Provide detailed step-by-step instructions - ✅ Include examples and use cases - ✅ Document integration points - ✅ Include troubleshooting sections - ❌ Don't duplicate rule invariants - ❌ Don't include always-applied constraints ## Quick Reference ### Rules Location ``` .cursor/rules/*.mdc ``` ### Skills Location ``` .cursor/skills/*/SKILL.md ``` ### Rule Naming - `000-core.mdc` - Core invariants - `010-tdd.mdc` - TDD principles - `015-constitution-cursor.mdc` - Non-negotiable - `030-commits.mdc` - Commit rules - `040-ci.mdc` - CI rules - `100-python.mdc` - Python-specific - `300-inventory-master-domain.mdc` - Domain-specific ### Skill Naming - Lowercase with hyphens - Descriptive of function - Examples: `tdd-go`, `inventory-report`, `plan-gated-apply` ## Additional Resources - For rule examples: `.cursor/rules/*.mdc` - For skill examples: `.cursor/skills/*/SKILL.md` - For agents vs skills: `docs/AGENTS_AND_SKILLS_GUIDE.md` - For constitution: `docs/constitution.md`
Related Skills
skills-management
Search, find, discover, install, remove, update, review, list, and move skills for AI coding agents. Use when user asks "find a skill for X", "search for a skill", "is there a skill for X", "install skill", "remove skill", "update skills", "list skills", "review skill quality", "move skill", "check for updates", or "how do I do X" where X might have an existing skill. This is THE tool for skill discovery and ecosystem search.
sarvam-ai-skills
Guide for building AI applications with Sarvam AI APIs for Indian languages. Use when working with speech-to-text transcription, text-to-speech synthesis, text translation, chat completion, or document intelligence. Covers models saarika:v2.5, saaras:v2.5/v3, bulbul:v3, mayura:v1, sarvam-translate:v1, sarvam-m, and sarvam-vision for 11-23 Indian languages. Trigger when user asks about Indian language AI, STT, TTS, translation, multilingual chatbots, voice assistants, or document processing.
reinforce-skills
This skill should be used when the user asks to 'reinforce skills', 'add skill map', 'update skill map', 'sync skills to CLAUDE.md', 'persist skills', 'save skills to project', 'embed skills', 'skills keep getting forgotten', 'I keep forgetting skills', or when setting up a new project where installed skills should be persisted as context. Generates a compressed skill-mapping directive in CLAUDE.md following the Vercel AGENTS.md research pattern.
pandas-data-manipulation-rules
Focuses on pandas-specific rules for data manipulation, including method chaining, data selection using loc/iloc, and groupby operations.
mixseek-skills
MixSeek Agent Skills collection for AI coding assistants. Provides workspace management, team configuration, evaluation setup, and debugging tools for MixSeek-Core.
managing-skills
Install, find, update, and manage agent skills. Use when the user wants to add a new skill, search for skills that do something, check if skills are up to date, or update existing skills. Triggers on: install skill, add skill, get skill, find skill, search skill, update skill, check skills, list skills.
framer-motion-rules
Defines framer motion is being used for animations
find-skills
Find and install agent skills with `npx playbooks find skill` and `npx playbooks add skill`. Use whenever a skill needs to be discovered or installed.
fenxi-skills
分析指定skills的工作流程,通过中文图文结合方式让使用者了解目标skills的工作方式
dozu-ui-service-skills
Index of AI agent skills and how to use them when implementing features in this repo.
cursor-rules-synchronizer
Synchronizes Cursor Rules (.mdc files in .cursor/rules/) to CLAUDE.md by generating a Rules section with context-efficient descriptions and usage instructions. Use when setting up Cursor Rules for the first time, after adding or modifying rules, or when the Rules section in CLAUDE.md is missing or outdated.
cursor-rules-review
Audit Cursor IDE rules (.mdc files) against quality standards using a 5-gate review process. Validates frontmatter (YAML syntax, required fields, description quality, triggering configuration), glob patterns (specificity, performance, correctness), content quality (focus, organization, examples, cross-references), file length (under 500 lines recommended), and functionality (triggering, cross-references, maintainability). Use when reviewing pull requests with Cursor rule changes, conducting periodic rule quality audits, validating new rules before committing, identifying improvement opportunities, preparing rules for team sharing, or debugging why rules aren't working as expected.