drift

drift is a skill for Claude Code, Codex from rijuvashisht/Magneto. It costs 0 tokens per session (730 once invoked), scanned A, original, MIT.

A checker that compares written software specifications with the current codebase. A specification describes intended behavior; drift means the code and that description no longer agree.

In plain words
What is it for?
Use it to scan documentation and code, report mismatches, and identify specifications or code that need reconciliation.
Why use it?
It finds features described but not built, code that is undocumented, and broken links between requirements and implementation after refactoring.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan documentation and code, report mismatches, and identify specifications or code that need reconciliation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rijuvashisht/magneto/drift
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.

Any agent
npx skills add rijuvashisht/Magneto --skill drift
Clone the repo
git clone --depth 1 https://github.com/rijuvashisht/Magneto

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/rijuvashisht/magneto/drift/github.svg)](https://agentmods.dev/skills/rijuvashisht/magneto/drift)
Your own site
<a href="https://agentmods.dev/skills/rijuvashisht/magneto/drift"><img src="https://agentmods.dev/badge/skills/rijuvashisht/magneto/drift/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rijuvashisht/magneto/drift"><img src="https://agentmods.dev/badge/skills/rijuvashisht/magneto/drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 730 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.00000 $0.00730
Opus 5 $0.00000 $0.00365
Sonnet 5 $0.00000 $0.00146
Haiku 4.5 $0.00000 $0.00073

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

Security

Grade A, and why

drift 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 9d 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.

src/templates/magneto-skills/skills/drift/SKILL.md · 98 lines

How it starts

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

/drift — Spec ↔ Code Drift Detection

Role: Drift Detector Inputs: spec docs + current codebase Outputs: drift report Audit actions: drift.scanned, drift.reported, drift.reconciled


Why This Skill Exists — The Moat

Spec-driven systems hate refactors. Living documentation survives them — but only if you actively detect drift. Magneto is one of the only AI tools that tracks:

  • Spec sections without code (you specced it, never built it)
  • Code without spec (you built something undocumented)
  • Trace link breakage (refactors that invalidated /trace references)

Protocol

Step 1: Scan

magneto drift scan

This walks:

  • All markdown specs in docs/, .magneto/sprints/*/design.md, custom paths via .magneto/drift.config.json
  • All code tracked in the knowledge graph
  • All trace links in .magneto/trace.db

Step 2: Detect

Spec without code:

  • Parse spec sections (H2/H3 headers + acceptance-criteria-style language)
  • For each requirement-ish section, check if any trace link points to it
  • Section with no link + no matching code symbol = orphan spec

Code without spec:

  • For each public API / exported symbol, check if trace contains a link to it
  • Unlinked = orphan code

Link breakage:

  • For each trace link pointing to a code symbol, verify the symbol still exists
  • Missing symbol = broken link

Step 3: Report

# Drift Report — <date>

## Summary
- Specs: 42 sections, 38 linked, 4 orphans (90% coverage)
- Code: 127 public symbols, 109 linked, 18 orphans (86% coverage)
- Broken trace links: 3

## Orphan Specs (you wrote it, never shipped it)
1. docs/auth.md#password-policy-enforcement
2. docs/auth.md#mfa-recovery-flow
3. ...

## Orphan Code (you shipped it, undocumented)
1. src/experimental/feature-flag.ts (2 exports)
2. src/utils/retry-backoff.ts (whole file)
3. ...

## Broken Trace Links
1. REQ-042 → src/auth/reset.ts:OldClass.expire (symbol removed in commit xyz)
2. ...

Step 4: Reconcile (with --fix)

Read the full file on GitHub · 98 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. 9d ago First seen · 98 lines · 0 tokens per session scan A 065f20e0e076

Subscribe to this mod's changes

drift is a skill published in the GitHub repository rijuvashisht/Magneto (6 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 730 tokens. 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.

Related

Other skills, from other repositories