project-spine-drift

project-spine-drift is a skill for Claude Code, Codex from PetriLahdelma/project-spine. It costs 87 tokens per session (969 once invoked), scanned A, original, MIT.

A workflow for detecting drift between a project’s source instructions and generated files such as AGENTS.md, CLAUDE.md, or Cursor rules. Project drift means the generated guidance no longer matches its inputs.

In plain words
What is it for?
Use it to run a drift check, inspect the generated report, and regenerate project guidance when source files or design inputs have changed.
Why use it?
It shows when agent instructions are stale so they can be regenerated before they mislead development work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Cursor.

Good fit Use it to run a drift check, inspect the generated report, and regenerate project guidance when source files or design inputs have changed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/petrilahdelma/project-spine/project-spine-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 PetriLahdelma/project-spine --skill project-spine-drift
Clone the repo
git clone --depth 1 https://github.com/PetriLahdelma/project-spine

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 project-spine-drift

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/petrilahdelma/project-spine/project-spine-drift"><img src="https://agentmods.dev/badge/skills/petrilahdelma/project-spine/project-spine-drift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 969 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.00087 $0.00969
Opus 5 $0.00044 $0.00485
Sonnet 5 $0.00017 $0.00194
Haiku 4.5 $0.00009 $0.00097

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

Security

Grade A, and why

project-spine-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 11d 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/project-spine-drift/SKILL.md · 92 lines

How it starts

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

Drift detection and resolution

Goal: determine whether the generated files still match the current inputs, and if not, help the user pick the right fix for each drift category.

Prerequisites

  • .project-spine/export-manifest.json exists. If not, the project was never compiled — switch to project-spine-kickoff.
  • CLI ≥ 0.8.1.

Step 1 — run the check

From the project root:

spine drift check

Exit codes:

  • 0 — clean; nothing to do.
  • 1 — drift detected; continue.
  • 2 — can't check (missing manifest, unreadable inputs); investigate before proceeding.

The command prints a summary with three counters and writes drift-report.md + drift-report.json under .project-spine/.

Step 2 — interpret each drift category

Input drift

One or more of: brief.md, design-rules.md, tokens.json, repo profile, or the spine hash itself changed.

Fix: spine compile --brief ./brief.md --repo . (add the same --template, --design, or --tokens the project uses). This regenerates all exports from the new inputs.

The [input:tokens] drift kind fires specifically when the design tokens JSON file (DTCG or Tokens Studio) changed — typical when the design team re-exports from Figma.

Export hand-edits

A generated file (e.g. AGENTS.md) was edited manually after the last compile.

Two valid responses — ask the user which they want:

  1. "Accept my edits as canonical" → the user wants the hand-edit to survive. They must edit the upstream input (brief.md, design-rules.md, or the workspace template) so a recompile reproduces the edit. Otherwise the next recompile reverts it.
  2. "Discard my edits, regenerate" → run spine export --targets all to rewrite the exports from the stored spine.json.

The second option is only safe if the user confirms they don't need the hand-edited text. Never auto-discard.

Missing exports

A file listed in the manifest isn't on disk (deleted, moved, gitignored).

Fix: spine export --targets all to regenerate.

Read the full file on GitHub · 92 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. 11d ago First seen · 92 lines · 87 tokens per session scan A fdb5a628cebf

Subscribe to this mod's changes

project-spine-drift is a skill published in the GitHub repository PetriLahdelma/project-spine (2 stars, last pushed 1mo ago), licensed MIT. It adds 87 tokens to every session and 969 once invoked, about $0.0004 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.