drift-check

drift-check is a skill for Claude Code, Codex from ngreenwall/claude-skills. It costs 87 tokens per session (2,417 once invoked), scanned A, original, MIT.

A manual check of whether an agent's global context instructions are still loaded and being followed. It is designed for Claude Code and uses canary tokens, which are distinctive test phrases placed in the context file.

In plain words
What is it for?
Use it after explicitly requesting a drift check to test whether the beginning, middle, and end of the global context remain available.
Why use it?
Long sessions or context compression can cause important instructions to be forgotten without making the problem obvious.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Good fit Use it after explicitly requesting a drift check to test whether the beginning, middle, and end of the global context remain available.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngreenwall/claude-skills/drift-check"><img src="https://agentmods.dev/badge/skills/ngreenwall/claude-skills/drift-check.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 2,417 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.02417
Opus 5 $0.00044 $0.01208
Sonnet 5 $0.00017 $0.00483
Haiku 4.5 $0.00009 $0.00242

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

Security

Grade A, and why

drift-check 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.

drift-check/SKILL.md · 128 lines

How it starts

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

SKILL: Drift Check

A deliberate, manual audit that confirms your global context file (the standing instructions Claude Code loads on every session, ~/.claude/CLAUDE.md) is loaded and actually shaping behavior, and pinpoints where context dropped (top, middle, or bottom of the file). Long sessions and context compaction silently drop rules; this catches it. This skill is Claude Code only, it depends on that global file auto-loading every session, a mechanism other tools don't replicate the same way.

Targets your global context file only; project-level CLAUDE.md is typically short enough that drift is unlikely.

Do NOT pre-read the context file before running the checks. The whole point is to test what is actually loaded in the current context window. Reproduce from memory, then you may verify against the file in step 1.

Setup (one-time, before first use)

This skill needs three canary tokens embedded in your global context file:

  1. Generate three short, unique, unguessable strings (e.g. word-word-NN style, or any random phrase you won't naturally type in conversation). Use a different token for each position, don't reuse one token in all three spots.
  2. Place one token near the top of the file (alongside your most important always-on rule, so recalling the rule and the token happen together), one in the middle, and one at the bottom. Label each clearly, e.g. Canary (top): <token>, Mid-file canary: <token>, and Canary (bottom): <token>, and instruct the file's reader not to output the token during normal work, only when running this check.
  3. Note the file path so Check 1 knows what to re-read. Only needed if your global context file lives somewhere other than the standard location (e.g. ~/.claude/CLAUDE.md).

Skip setup if tokens already exist in the file from a previous run.

If you use an always-on convention worth checking every time (e.g. a response-format prefix), name it in your context file, then replace the placeholder examples in this file's own Check 2 "Core rules" list (below) with your actual rules, so scorecards stay comparable across runs.

Read the full file on GitHub · 128 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 128 lines · 87 tokens per session scan A f27a6b3639f0

Subscribe to this mod's changes

drift-check is a skill published in the GitHub repository ngreenwall/claude-skills (2 stars, last pushed 10d ago), licensed MIT. It adds 87 tokens to every session and 2,417 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.