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

Installs 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

  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

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
1wubing2023 avatarpaper-spinewubing2023/paperspineWrite, rewrite, or build a paper or report (journal, conference, report, review, competition) end to end, then output LaTeX/PDF/Word. The main PaperSpine entry 1.3Kskills.sh installs
2nexscope-ai avatarecommerce-email-marketing-buildernexscope-ai/ecommerce-skillsE-commerce email marketing system builder. Creates complete email automation flows with full copywriting, subject lines, ESP setup instructions, segmentation ru1.2Kskills.sh installs
3cap-go avatarcapacitor-app-storecap-go/capgo-skillsComplete guide to publishing Capacitor apps to Apple App Store and Google Play Store. Covers app preparation, screenshots, metadata, review guidelines, and subm1.2Kskills.sh installs
4nexscope-ai avatarproduct-launch-strategynexscope-ai/ecommerce-skillsPlan and execute e-commerce product launches. Pre-launch, launch day, and post-launch playbooks for Amazon, Shopify, and multi-channel sellers. Covers inventory1.2Kskills.sh installs
5davila7 avatarscientific-schematicsdavila7/claude-code-templatesCreate publication-quality scientific diagrams using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Only regenerates 1.2Kskills.sh installs
6neolabhq avatarcreate-hookneolabhq/context-engineering-kitCreate and configure git hooks with intelligent project analysis, suggestions, and automated testing1.2Kskills.sh installs