Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Rule Drift Auditor

ASecurity

Use when rules in CLAUDE.md or AGENTS.md may no longer match what the code does, after refactors, failed compacts, or coordinator-heavy runs. Triggers on \"rule drift\", \"rules vs code\", \"stale rules\", \"handoff doc\", \"fresh restart\", \"delegator vs coordinator\". Non-triggers: size-only audit (use claude-md-auditor), rules to hooks migration (use rules-to-hooks-auditor). Outcome: a drift report with stale rules, handoff doc, and a delegator fix plan.

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentsgosecurity

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add majinmagros/magros.ai-skills --skill rule-drift-auditor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rule Drift Auditor?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Rule Drift Auditor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-rule-drift-auditor/badge)](https://www.skillsdirectory.com/skills/majinmagros-rule-drift-auditor)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: rule-drift-auditor
description: "Use when rules in CLAUDE.md or AGENTS.md may no longer match what the code does, after refactors, failed compacts, or coordinator-heavy runs. Triggers on \"rule drift\", \"rules vs code\", \"stale rules\", \"handoff doc\", \"fresh restart\", \"delegator vs coordinator\". Non-triggers: size-only audit (use claude-md-auditor), rules to hooks migration (use rules-to-hooks-auditor). Outcome: a drift report with stale rules, handoff doc, and a delegator fix plan."
metadata:
  origin: ECC
---

# Rule Drift Auditor

Audit the gap between written rules and real code. Rules rot: refactors
land, compacts drop context, writers approve their own work, and
coordinators invent process nobody follows. This skill diffs
CLAUDE.md and AGENTS.md against the repo, then fixes the run before
the next session inherits the rot.

This skill measures drift, not size. If you only need line counts and
trim suggestions, use a size audit instead (see Relations).

## When To Activate

- The user suspects rules are stale, ignored, or contradict the code.
- After a big refactor, a failed compact, or a long session where
  "the agent stopped following the rules".
- A run used a coordinator where a simple delegator would do, or a
  model was swapped mid-task and behavior changed.
- A writer approved its own output, or iterations kept going past
  the point of improvement.

## Core Concepts

- **Drift**: a rule that claims X while the code does Y, or a rule
  nobody can point to in the repo. Drift is binary per rule: holds
  or does not hold. No partial credit without evidence.
- **Contaminated conversation**: a long or compacted session where
  context is lossy. Never swap models mid-task to fix it; write a
  handoff doc and restart fresh instead.
- **Simple delegator vs coordinator**: a delegator splits work, sets
  done criteria, and merges. A coordinator narrates, re-plans, and
  re-approves. Coordinators are unreliable; prefer the delegator.
- **Fresh reviewer**: drift verdicts come from a reviewer with no
  stake in the rules or the code. The writer never approves.
- **Full trace**: every rule checked, every evidence hit (file and
  line), and every verdict kept. No trace = no audit.

## Workflow

### 1. Collect the rules

- Read CLAUDE.md and AGENTS.md plus any nested rule files they import.
- Number each rule (R1, R2, ...) with its source file and line.
- Mark load-bearing rules (security, deploy, data handling) first;
  they get evidence before style rules do.

### 2. Diff each rule against the code

- For each rule, search the repo for the behavior it mandates or
  forbids (grep for commands, configs, patterns, call sites).
- Verdict per rule: HOLDS (evidence found), STALE (code moved on),
  CONTRADICTED (code does the opposite), ORPHAN (no referent left).
- Record file and line per evidence hit. A verdict without a
  pointer is an opinion, not a finding.

### 3. Score drift and cut or fix

- Drift rate = STALE + CONTRADICTED + ORPHAN over total rules.

## Exemplo

```text
Pós-refactor: 20 regras (CLAUDE.md+AGENTS.md) → grep por comportamento real
Veredito por regra: HOLDS (evidência arq:linha) / STALE / CONTRADICTED / ORPHAN
Saída: drift report + handoff doc + plano delegator (restart fresh, sem trocar modelo no meio)
```

Attribution

majinmagrosmajinmagros
View sourceMore from majinmagros →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →