rules-check-drift

Detect stale rules and drifted architecture maps in CLAUDE.md or AGENTS.md after code changes.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill rules-check-drift-az9713
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rules-check-drift
Source: https://github.com/az9713/claude-code-hooks-tutorial/tree/main/skills/.claude/skills/rules-check-drift
Command: npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill rules-check-drift-az9713

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Rules files like CLAUDE.md and AGENTS.md silently go stale as code evolves, and wrong rules actively mislead AI agents on every future run. This Skill compares your rules file against recent git changes and reports only the drift that matters, with the minimal fix for each. ## Core Features & Use Cases - Drift Detection: Flags rules that are now false, architecture-map entries that no longer match reality, and new durable invariants worth adding as one line. - Anti-Bloat Discipline: Suggests only minimal one-line edits and explicitly avoids changelog-style additions, keeping the rules file lean. - Advisory Output: Produces a structured report of fixes, additions, and verified-still-true areas without modifying files unless asked. - Use Case: Before merging a branch that moved routes from src/routes/ to src/api/routes/, run the check to catch the stale path in your CLAUDE.md architecture map and get the exact one-line correction. ## Quick Start Ask the AI to run the rules drift check on the current diff, for example: check whether CLAUDE.md still matches the changes in main...HEAD and report any stale rules.

Frequently Asked Questions about rules-check-drift

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my CLAUDE.md is out of date after code changes?▼

Run the rules drift check against a git diff range such as main...HEAD or uncommitted changes. It compares each claim in CLAUDE.md or AGENTS.md against the change set and reports stale rules, drifted architecture-map paths, and new invariants with minimal fixes.

What diff range does the rules drift check use by default?▼

By default it uses uncommitted and staged changes via git diff HEAD, falling back to main...HEAD. You can pass an optional diff range argument such as main...HEAD to scope the analysis to a specific branch comparison.

Does the rules check edit CLAUDE.md automatically?▼

No, the check is advisory only. It reports drift in a structured table of fixes and additions, and only applies edits if you explicitly ask it to.

What kinds of issues does the rules drift check flag?▼

It flags exactly three things: rules that are now false, architecture-map entries whose paths no longer match reality, and new durable invariants introduced by the change. It deliberately ignores feature additions and anything that would just grow the file.

When should I run a rules file drift check?▼

Run it before every merge or fold it into your code-review pass. Catching drift at merge time prevents stale rules from misleading the agent on all subsequent runs.