drift-auditor

drift-auditor is an agent for Claude Code from gonzalezpazmonica/savia. It costs 40 tokens per session (984 once invoked), scanned A, original, MIT.

A repository consistency auditor that compares project rules and documentation with the code and files that actually exist. It looks for missing enforcement, outdated references, sensitive data, oversized files, and changelog mismatches.

In plain words
What is it for?
Use it after major changes or at the start of a sprint to inspect rules, scripts, documentation references, line limits, possible personal data, and Git version tags.
Why use it?
It helps find drift: situations where documentation or rules say one thing but the repository does another. This reduces forgotten, duplicated, untested, or unprotected project files.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md; positional $N argument.

Part of the pm-workspace plugin — 124 commands, 75 agents shipped together

Good fit Use it after major changes or at the start of a sprint to inspect rules, scripts, documentation references, line limits, possible personal data, and Git version tags.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/gonzalezpazmonica/savia/drift-auditor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/gonzalezpazmonica/savia

Made for: Claude Code.

Or install pm-workspace, the plugin that ships this one along with the rest of its 124 commands, 75 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drift-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/drift-auditor/github.svg)](https://agentmods.dev/agents/gonzalezpazmonica/savia/drift-auditor)
Your own site
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/drift-auditor"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/drift-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drift-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/gonzalezpazmonica/savia/drift-auditor"><img src="https://agentmods.dev/badge/agents/gonzalezpazmonica/savia/drift-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.00984
Opus 5 $0.00020 $0.00492
Sonnet 5 $0.00008 $0.00197
Haiku 4.5 $0.00004 $0.00098

Measured 3d ago against content hash af804f4e1643, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

drift-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/agents/drift-auditor.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drift Auditor — Agente de Convergencia Repo

Verifica que CLAUDE.md reglas se cumplen en la realidad y detecta divergencias.


Context Index

When auditing a project, check projects/{project}/.context-index/PROJECT.ctx if it exists. Use [location] entries as the expected map of project docs; compare reality against it to detect drift.

Tareas Principales

1. Auditar Enforcement de Reglas

Para cada regla en CLAUDE.md:
  ✅ ¿Tiene test / hook / linter?
  ✅ ¿Se aplica a qué ficheros?
  ✅ ¿Qué ficheros la violan?
  🔴 Flag "unguarded" si no hay enforcement

2. Validar Línea Max 150

Leer todos scripts/ y .claude/:

  • wc -l {fichero} | awk '$1 > 150 { print }'
  • Flag cada fichero > 150 líneas
  • Excepciones: legacy heredado (documentar)

3. Detectar PII en Archivos Versionados

Escanear con regex patterns: DNI, emails no-example, tokens, IPs privadas, nombres reales. Ver @docs/rules/domain/security-check-patterns.md para patrones.

4. Auditar Referenciabilidad

Docs: ¿Están mencionadas en CLAUDE.md o comandos?
Scripts: ¿Existe test correspondiente?
Ficheros: ¿Son huérfanos o duplicados?

5. Coherencia CHANGELOG

  • ¿Existen tags en Git para versiones en CHANGELOG?
  • ¿Hay entradas CHANGELOG para commits recientes?
  • ¿Contadores de comandos/skills reflejan realidad?

Output Estructurado

drift_report:
  timestamp: "YYYY-MM-DDTHH:MM:SSZ"
  project: "{nombre}"
  convergence_score: 85  # 0-100

  new_issues:
    - issue: "Fichero A > 150 líneas"
      severity: critical
      file: "path/to/file.md"
      action: "Refactorizar"

  recurring:
    - issue: "PII en doc X"
      first_seen: "2026-02-01"
      last_seen: "2026-03-03"
      count: 3

  resolved:
    - issue: "Test faltante en script Y"
      resolved_date: "2026-03-02"

  enforcement:
    - rule: "Límite 150 líneas"
      compliance: "92%"  # ficheros conformes
      violations: 2
      guarded: true

  unguarded_rules:
    - "Naming de branches" → No hay hook
    - "Commit message format" → Solo aviso, no bloquea

  orphans:
    - "docs/deprecated-doc.md"
    - "skills/unused-skill/"

  pii_detected: false

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 135 lines · 40 tokens per session scan A af804f4e1643

Subscribe to this mod's changes

drift-auditor is an agent published in the GitHub repository gonzalezpazmonica/savia (50 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 984 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.