
Create Rule
Use when found gap or repetative issue, that produced by you or implemenataion agent.
Install
npx skills add NeoLabHQ/context-engineering-kit --skill create-rule -g -a claude-code -y- Repository
- NeoLabHQ/context-engineering-kit1.8k
- Category
- AI and agents
- Updated
- 2mo ago
- License
- GPL-3.0
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Use when found gap or repetative issue, that produced by you or implemenataion agent. Esentially use it each time when you say "You absolutly right, I should have done it differently." -> need create rule for this issue so it not appears again.
Create Rule
Guide for creating effective .claude/rules files with contrastive examples that improve agent accuracy.
Overview
Core principle: Effective rules use contrastive examples (Incorrect vs Correct) to eliminate ambiguity.
REQUIRED BACKGROUND: Rules are behavioral guardrails, that load into every session and shapes how agents behave across all tasks. Skills load on-demand. If guidance is task-specific, create a skill instead.
About Rules
Rules are modular, always-loaded instructions placed in .claude/rules/ that enforce consistent behavior. They act as "standing orders", every agent session inherits them automatically.
What Rules Provide
- Behavioral constraints, What to do and what NOT to do
- Code standards, Formatting, patterns, architecture decisions
- Quality gates, Conditions that must be met before proceeding
- Domain conventions, Project-specific terminology and practices
Rules vs Skills vs CLAUDE.md
| Aspect | Rules (.claude/rules/) | Skills (skills/) | CLAUDE.md |
|---|---|---|---|
| Loading | Every session (or path-scoped) | On-demand when triggered | Every session |
| Purpose | Behavioral constraints | Procedural knowledge | Project overview |
| Scope | Narrow, focused topics | Complete workflows | Broad project context |
| Size | Small (50-200 words each) | Medium (200-2000 words) | Medium (project summary) |
| Format | Contrastive examples | Step-by-step guides | Key-value / bullet points |
When to Create a Rule
Create when:
- A behavior must apply to ALL agent sessions, not just specific tasks
- Agents repeatedly make the same mistake despite corrections
- A convention has clear right/wrong patterns (contrastive examples possible)
- Path-specific guidance is needed for certain file types
Do NOT create for:

