Agent skill

Rules Check Drift

by coleam00 in coleam00/skills

Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass.

MITAuto-check passedAgent Workflows

Install Rules Check Drift

skills CLI
$ npx skills add coleam00/skills --skill rules-check-drift -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install coleam00/skills rules-check-drift --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/coleam00/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/rules-check-drift .claude/skills/rules-check-drift && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rules-check-drift
GitHub stars
674
Token cost
~1k tokens
SKILL.md length
474 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass.

  • Works in 4 steps: See what changed → Read the rules file as it is now → Flag ONLY these three things → …
  • Tasks that involve Agent instruction files
  • SKILL.md covers Input, Process, Output and Rules
  • Calls git

What it does

Rules Check Drift is an agent skill from coleam00/skills. Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass. Reports stale/now-false rules, drifted architecture-map entries, and any new invariant worth adding, each with the minimal edit. Advisory and anti-bloat: it keeps the rules file true, never longer than it needs to be.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. It works with Git. The repository describes itself as: The agent skills I actually use to build software with coding agents. The PIV loop, planning, worktrees, and the meta-skills for building your own AI Layer. The licence is MIT.

When your agent uses it

  • Tasks that involve Agent instruction files

Example prompts

  • “/rules-check-drift”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. See what changed
  2. Read the rules file as it is now
  3. Flag ONLY these three things
  4. Write each suggestion the way CLAUDE.md should read

What it can do on your machine

Read from SKILL.md and the folder at commit 847be08. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rules Check Drift loads about 1k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from coleam00/skills at commit 847be08, republished under its MIT licence (© coleam00). 474 words, ~1,008 tokens.

Download SKILL.mdSave it as .claude/skills/rules-check-drift/SKILL.md (or your agent's skills folder).
name
rules-check-drift
description
Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass. Reports stale/now-false rules, drifted architecture-map entries, and any new invariant worth adding, each with the minimal edit. Advisory and anti-bloat: it keeps the rules file true, never longer than it needs to be.
argument-hint
[optional diff range, e.g. main...HEAD]

/rules-check-drift — keep your rules file true, not longer

Your rules file — CLAUDE.md or AGENTS.md — is a steering document, not documentation: your ground rules, your conventions, and a current map of where things live. Its only failure mode that matters is being wrong: a stale rule or a drifted map actively misleads the agent on every future run. This skill checks the rules file against what just changed and proposes the smallest edit that keeps it true.

Wrong rules are worse than missing rules. A longer rules file is worse than a lean one. Most changes need no edit at all — adding a wrong or verbose line makes it worse.

Input

  • $ARGUMENTS — optional diff range. Default: uncommitted + staged (git diff HEAD); fall back to main...HEAD.
  • Scope: the project's rules file(s) — CLAUDE.md and/or AGENTS.md, the root file + any package-level ones. (If CLAUDE.md is just a @AGENTS.md import, check AGENTS.md.) Ignore README, docs/, and .claude/ agent/command/skill files. This skill exists to keep the rules honest, nothing else.

Process

1. See what changed

git diff <range> + git status. Note: moved/renamed/removed files, new modules, changed conventions, and any new invariant the change establishes.

2. Read the rules file as it is now

Load the project's rules file — CLAUDE.md or AGENTS.md (and any package-scoped ones). Hold each claim against the change set.

3. Flag ONLY these three things
  1. A stated rule or fact is now false — e.g. "routes live in src/routes/" but they moved. → fix it.
  2. The architecture map drifted — a path or "where things live" pointer no longer matches reality. → fix the wrong entry (don't catalog every new file).
  3. A new durable invariant must hold going forward — the change introduces a rule that must stay true (e.g. "never call the DB from handlers — go through repository/"). → add it as one line.

Everything else, leave alone. Do not suggest an edit to record that a feature was added (that's a changelog — the codebase is the source of truth), to restate what the code already makes obvious, or to add background/rationale/prose that doesn't steer future work.

Show full SKILL.md (132 more words)Show less
4. Write each suggestion the way CLAUDE.md should read
  • One bullet, not a paragraph. A rule is a line, not an essay.
  • Keep the map current — don't grow it. Fix the wrong path; don't enumerate the new ones.
  • State rules in natural language; reference the codebase, never paste code. Copied code goes stale; the codebase stays true. Good: "follow the error pattern in src/core/errors/." Bad: pasting the class.

Output

## Rules-file drift check — range: <range>

### Fix (now false)
| Where | What's wrong | Minimal fix |
|-------|--------------|-------------|
| "Architecture" map | routes moved `src/routes/` → `src/api/routes/` | update the one path |

### Add (new invariant only)
- <one-line rule> — established by <the change that made it durable>

### Checked, still true — no edit
- <areas you verified need no change>

If nothing drifted: "The rules file is still accurate for these changes — no edits needed."

Rules

  • Advisory. Report the drift; only apply/piv-commit edits if the caller explicitly asks.
  • Rules file only (CLAUDE.md / AGENTS.md). Not README, not docs.
  • Lean by default. When in doubt, suggest nothing.
  • Run it before every merge (or as part of /piv-review-changes) so your rules never drift behind the code.

© coleam00, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/rules-check-drift of coleam00/skills.

Open the folder on GitHubat commit 847be08

Compare with similar skills

Rules Check Drift next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rules Check Drift compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rules Check Drift this skillcoleam00/skills674—~1kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Harness Evolution Feedback Looprevfactory/harness9.1k—~855Automated safety check: PassApache-2.0
Setup Matt Pocock Skillsywwynm/EverythingDone1449 repos~1.7kAutomated safety check: PassGPL-3.0
Squad Agent Collaboration Patternsmicrosoft/waza1.4k4 repos~500Automated safety check: PassMIT
Docslatitude-dev/latitude-llm4.7k—~2.5kAutomated safety check: PassMIT

Similar skills

  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • Collects feedback on how an agent harness performed, generalizes it, and updates the harness agents, skills and orchestrator along with a change-history table.

    9.1k GitHub stars~855 tokensUpdated 11 days ago
    Agent WorkflowsAuto-check passed
  • Setup Matt Pocock Skills

    ywwynm/EverythingDone

    Sets up an Agent skills block in AGENTS.md/CLAUDE.md and docs/agents/ so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc…

    144 GitHub starsUsed in 9 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Official

    Shared collaboration rules for a team of squad agents covering worktree awareness, writing decisions to an inbox, cross-agent requests and reviewer lockout.

    1.4k GitHub starsUsed in 4 repos~500 tokens
    Agent WorkflowsAuto-check passed
  • Docs

    latitude-dev/latitude-llm

    Review the current conversation context and git changes, then persist durable repository knowledge into dev-docs/.md by domain and into AGENTS.md for cross-cutting repo rules.

    4.7k GitHub stars~2.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Reconcile Context

    Apocrathia/home-assistant-config

    Fix drift in Home Assistant Homelab agent context (AGENTS.md, CLAUDE.md, .agents/context/, rules, skills, agents) against the repo.

    179 GitHub stars~931 tokensUpdated 17 days ago
    Agent WorkflowsAuto-check passed

More from coleam00/skills

All 34 skills in this repo
  • Ablate AI Layer

    coleam00/skills

    Measure whether a repository's AI instructions still earn their place, by running the same real task many times with the layer intact and with it stripped, then grading every rule against what…

    674 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Build Dark Factory

    coleam00/skills

    Take a PRD and build a dark factory around it - a repository that takes work in as an issue and ships validated code out with nobody at the keyboard - one component at a time, into the user's actual…

    674 GitHub stars~12k tokensUpdated 2 days ago
    Auto-check passed
  • Drive Screen

    coleam00/skills

    Take real control of the desktop - list and focus windows, type, paste, click, scroll, and screenshot - on Windows, macOS or Linux, and drive other coding-agent sessions running in terminals.

    674 GitHub stars~5.4k tokensUpdated 2 days ago
    Auto-check passed
  • Second Brain Audit

    coleam00/skills

    Audit any second brain, notes folder, or agent memory for facts that have quietly stopped being true, then fix the worst one so it stops recurring.

    674 GitHub stars~4.6k tokensUpdated 2 days ago
    Auto-check passed
  • Build Signal Engine

    coleam00/skills

    Build a personal signal engine from scratch - a system that reads every source someone cares about each day (changelogs and release notes, communities, feeds, videos, papers), makes a quick decision…

    674 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Worktree Create

    coleam00/skills

    Create one or more git worktrees for parallel development, each on its own branch with gitignored config copied in, dependencies installed, and a health check, by fanning out a setup subagent per…

    674 GitHub stars~958 tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Rules Check Drift

What does Rules Check Drift do?

Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass. Rules Check Drift is an agent skill from coleam00/skills.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass.

When should I use Rules Check Drift?

Rules Check Drift fits situations like: tasks that involve Agent instruction files.

How do I install Rules Check Drift in Claude Code?

Run `npx skills add coleam00/skills --skill rules-check-drift -a claude-code`. Or copy the skill folder (.claude/skills/rules-check-drift in coleam00/skills) into .claude/skills/rules-check-drift in your project. Claude Code loads it when a task matches its description.

How do I install Rules Check Drift in Codex?

Run `npx skills add coleam00/skills --skill rules-check-drift -a codex`. Or copy the skill folder (.claude/skills/rules-check-drift in coleam00/skills) into .agents/skills/rules-check-drift in your project. Codex loads it when a task matches its description.

Can I use Rules Check Drift in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add coleam00/skills --skill rules-check-drift -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rules-check-drift, .gemini/skills/rules-check-drift, .github/skills/rules-check-drift and .opencode/skills/rules-check-drift in your project.

What does Rules Check Drift need to run?

Going by SKILL.md and its folder, Rules Check Drift needs the command-line tools its instructions call (git).

Does Rules Check Drift access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Rules Check Drift safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rules Check Drift use?

Rules Check Drift is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rules Check Drift use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rules Check Drift?

Skills that share tags, products or a category with Rules Check Drift: Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars), Harness Evolution Feedback Loop (revfactory/harness, 9.1k stars), Setup Matt Pocock Skills (ywwynm/EverythingDone, 144 stars) and Squad Agent Collaboration Patterns (microsoft/waza, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rules Check Drift?

coleam00 (a GitHub user) maintains it in coleam00/skills, which has 674 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 7, 2026.

Source: coleam00/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.