Skills

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
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

  1. Behavioral constraints, What to do and what NOT to do
  2. Code standards, Formatting, patterns, architecture decisions
  3. Quality gates, Conditions that must be met before proceeding
  4. Domain conventions, Project-specific terminology and practices

Rules vs Skills vs CLAUDE.md

AspectRules (.claude/rules/)Skills (skills/)CLAUDE.md
LoadingEvery session (or path-scoped)On-demand when triggeredEvery session
PurposeBehavioral constraintsProcedural knowledgeProject overview
ScopeNarrow, focused topicsComplete workflowsBroad project context
SizeSmall (50-200 words each)Medium (200-2000 words)Medium (project summary)
FormatContrastive examplesStep-by-step guidesKey-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:

Read the whole SKILL.md on GitHub

More in AI and agents