
Create Rule
This is meta-tooling for when you catch yourself or an implementation agent making the same mistake twice. The idea is simple: if you're saying "you're absolutely right, I should have done it differently," that's your signal to codify the fix as a rule. The skill guides you through creating contrastive examples (incorrect vs correct patterns) that load into every session as behavioral guardrails. It emphasizes token efficiency and path scoping so you're not loading frontend rules when editing backend code. The approach is grounded in research showing that showing both the wrong and right pattern eliminates ambiguity better than positive examples alone. Useful when you notice patterns in agent mistakes rather than one-off issues.
- skills.sh installs
- 1.3K
- GitHub stars
- 1.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add neolabhq/context-engineering-kit --skill create-rule --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/neolabhq/context-engineering-kit
- Categories
- Git & Pull Requests, AI & Agent Building
- First seen
- Jun 3, 2026
More from neolabhq/context-engineering-kit
All 63- Do In Parallel1.3K
- Add Task1.3K
- Analyse1.3K
- Review Pr1.3K
- Launch Sub Agent1.3K
- Create Agent1.3K
- Test Skill1.2K
- Apply Anthropic Skill Best Practices1.2K
- Tree Of Thoughts1.2K
- Cause And Effect1.2K
- Create Ideas1.2K
- Fix Tests1.2K
- Create Skill1.2K
- Do Competitively1.2K
- Plan Do Check Act1.2K
- Commit1.2K
- Analyze Issue1.2K
- Create Command1.2K
- Create Hook1.2K
- Create Pr1.2K
- Setup Codemap Cli1.2K
- Actualize1.2K
- Git Worktrees1.2K
- Decay1.2K