Create Rule
Structured guide for writing .claude/rules files with Incorrect/Correct contrastive examples to stop recurring agent mistakes.
- CCM score
- 52 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 1.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers when to create a rule versus a skill or CLAUDE.md, with a comparison table of loading, scope, size, and format
- Defines global, path-scoped, and priority rule types, each with its
pathsfrontmatter and example - Requires a Description-Incorrect-Correct template, keeping each rule file to 50-200 words and one concern per file
- Designed for teams that want agents to stop repeating the same mistakes across sessions
Install
$ npx -y skills add neolabhq/context-engineering-kit --skill create-rule -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/neolabhq/context-engineering-kit
- Categories
- Agent Workflow & Planning, Skill & Plugin Building
- First seen
- Jun 3, 2026
Questions
What does the create-rule skill do?
The create-rule skill guides you in writing effective .claude/rules files that use contrastive Incorrect and Correct examples to keep agents from repeating the same gap or mistake. It applies whenever a repetitive issue shows up, such as when an agent says it should have done something differently.
How do I install the create-rule skill?
Run npx -y skills add neolabhq/context-engineering-kit --skill create-rule -y in your project to install it. Once installed, the agent gets guidance on turning a recurring agent mistake into a standing rule.
Which skills lead create-rule in the Agent Workflow & Planning category?
create-rule sits in the Agent Workflow & Planning category alongside grill-me, grill-with-docs, setup-matt-pocock-skills, grilling and prototype. It focuses on capturing behavioral fixes as always-loaded rules rather than on planning or interviewing workflows.
When should I use create-rule instead of a skill?
Use create-rule when a behavior must apply to all agent sessions, not just one task, because rules load every session while skills load on demand. Task-specific workflows are better served by a skill.
More from neolabhq/context-engineering-kit
All 62- Do In Steps1.3K
- Do In Parallel1.3K
- Analyse1.3K
- Review Pr1.3K
- Add Task1.3K
- Launch Sub Agent1.3K
- Test Skill1.3K
- Create Agent1.3K
- Tree Of Thoughts1.3K
- Cause And Effect1.3K
- Apply Anthropic Skill Best Practices1.3K
- Do Competitively1.3K
- Create Skill1.3K
- Plan Do Check Act1.3K
- Create Ideas1.3K
- Fix Tests1.3K
- Commit1.3K
- Analyze Issue1.3K
- Create Hook1.3K
- Setup Codemap Cli1.3K
- Create Command1.3K
- Create Pr1.3K
- Actualize1.3K
- Git Worktrees1.3K
Similar to Create Rule
More Agent Workflow & Planningcreate-agentSkillneolabhq/context-engineering-kit1.3K installsComprehensive guide for creating Claude Code agents with validated frontmatter, triggering examples, and system prompts.
skill-authoringSkillmicrosoft/github-copilot-for-azure1K installsGuidance and validation rules for writing and reviewing Agent Skills against the agentskills.io specification.
improve-claude-mdSkillhumanlayer/skills3.2K installsA structured guide for improving CLAUDE.md files with conditional <important if> blocks that keep agent instructions relevant.
apply-anthropic-skill-best-practicesSkillneolabhq/context-engineering-kit1.3K installsAuthoring guide that turns Anthropic's skill best practices into concrete rules for writing skills.
skill-writerSkillpytorch/pytorch3.6K installsGuided workflow for creating valid Agent Skills, covering scope, location, frontmatter, and descriptions.
skill-skillPlugindavepoon/buildwithclaude3.8K starsWrite, upgrade or audit Claude skills so they change what gets generated: distil rules from real corrections, turn them into required artifacts, gates and scrip