drift-sweep

drift-sweep is a skill for Claude Code from lukasrepublic/agentic-foundry. It costs 172 tokens per session (1,894 once invoked), scanned A, original, MIT.

A currently inactive design for finding code specifications that may have become outdated after a schema or module change. A schema defines the structure and names of stored or exchanged data.

In plain words
What is it for?
It is intended for comparing two system snapshots and listing specifications that may need review after a migration.
Why use it?
It cannot currently perform the scan because its supporting script was retired, so it does not provide a runnable drift check.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the foundry plugin — 81 skills, 8 agents, 8 hooks, 1 MCP server shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add lukasrepublic/agentic-foundry
Claude Code
/plugin install foundry

Made for: Claude Code.

Or install foundry, the plugin that ships this one along with the rest of its 81 skills, 8 agents, 8 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/drift-sweep.svg)](https://agentmods.dev/skills/lukasrepublic/agentic-foundry/drift-sweep)
Your own site
<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/drift-sweep"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/drift-sweep.svg" alt="Measured on agentmods" height="20"></a>
Per session 172 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,894 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00172 $0.01894
Opus 5 $0.00086 $0.00947
Sonnet 5 $0.00034 $0.00379
Haiku 4.5 $0.00017 $0.00189

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

Security

Grade A, and why

drift-sweep 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 6d 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.

skills/drift-sweep/SKILL.md · 127 lines

How it starts

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

/foundry:drift-sweep

An operator/agent ADVISORY sweep that names the whole batch of frozen atoms a schema/module migration just invalidated, instead of letting each one be rediscovered one at a time, weeks apart, at its own build. It is the batch-level, schema-coherence analogue of /foundry:coherence-check (which covers citations): same advisory posture, same tri-state fail-closed exit, same fresh-walk-every-run discipline — the missing dimension is schema identifiers instead of citations.

DORMANT: the engine below (scripts/foundry_drift_sweep.py) does not ship — the command is design intent for a re-implementation, not a runnable verb today.

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/foundry_drift_sweep.py" \
  --base  /path/to/base-snapshot.json \
  --head  /path/to/head-snapshot.json \
  --corpus-root "$CLAUDE_PROJECT_DIR"      # default: $CLAUDE_PROJECT_DIR or cwd

Input — a base->head snapshot PAIR (host-side, HOW obtained is a wiring concern)

The sweep takes two already-built snapshots from the system-state snapshot tool (foundry_system_snapshot.build_system_snapshot() results — {schema_version, schema_grounded, module_grounded, grounding_configured, entities, modules, signature}) as JSON files. It opens no grounding source itself and does no git plumbing — how the caller obtains the base (pre-migration) and head (post-migration) snapshots (e.g. re-resolving the same grounding block at two different migration-history points) is an operational wiring concern, not this sweep's.

What counts as a candidate (schema-delta vocabulary)

A dropped/renamed candidate identifier is one present in the base snapshot and absent from the head snapshot, over the grounded dimensions:

  • table — a base entities key absent from head.
  • column — a base <entity>::<column> absent from head.
  • module — a base modules member absent from head.

A RENAME is observed as a drop of the old identifier — the new name appears as an addition, which is never a candidate (only disappearances are). An identifier present in both, or added only in head, is never a candidate.

Read the full file on GitHub · 127 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. 6d ago First seen · 127 lines · 172 tokens per session scan A f47b38a7838b

Subscribe to this mod's changes

drift-sweep is a skill published in the GitHub repository lukasrepublic/agentic-foundry (1 stars, last pushed yesterday), licensed MIT. It adds 172 tokens to every session and 1,894 once invoked, about $0.0009 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-08-31.