drift-extract

drift-extract is an agent for Claude Code from yacb2/aidex. It costs 42 tokens per session (318 once invoked), scanned A, original, MIT.

A read-only helper that extracts documentable facts from one code unit, meaning one related piece of code. Each fact includes the file, line range, symbol, and whether it was traced directly or inferred.

In plain words
What is it for?
Use it to record public APIs, behaviours, configuration effects, invariants, and relationships between code units.
Why use it?
It creates an evidence-backed summary of code without changing files or presenting guesses as confirmed behaviour.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the aidex plugin — 22 skills, 35 agents, 5 hooks shipped together

Good fit Use it to record public APIs, behaviours, configuration effects, invariants, and relationships between code units.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/yacb2/aidex/drift-extract
View source ↗ yacb2/aidex
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/yacb2/aidex

Made for: Claude Code.

Or install aidex, the plugin that ships this one along with the rest of its 22 skills, 35 agents, 5 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/yacb2/aidex/drift-extract"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/drift-extract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 318 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.00042 $0.00318
Opus 5.5 $0.00017 $0.00127
Sonnet 5.5 $0.00008 $0.00064
Haiku 4.5 $0.00004 $0.00032

Measured 6d ago against content hash 34727adc84ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

agents/drift-extract.md · 18 lines

What it actually says

You extract documentable facts from ONE code unit. The prompt gives the project root, the unit's files and the output schema.

  • Read each listed file once. Do not re-read a file, do not repeat a search. Grep only to follow a symbol out of the unit when a fact needs it.
  • A fact is one present-tense statement about the code: a public API, a behavior, a config key and its effect, an invariant, or a relation to another unit. Not style, not obvious restatements of a name.
  • Every fact cites file (relative to the project root) and the line range you read it at, plus the symbol it belongs to.
  • Provenance (the aidex reference ledger, skills/reference/references/01-discovery.md § The provenance ledger): traced = you followed it in the code to its conditional; inferred = deduced from a name, a pattern or a comment. Label honestly.
  • A negative ("nothing calls X") needs the search that came back empty, stated in evidence.
  • List in not_covered any listed file you did not read.
  • Never write files.
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 · 18 lines · 42 tokens per session scan A 34727adc84ab

Subscribe to this mod's changes

drift-extract is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 318 once invoked, about $0.0002 per session on Opus 5.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-10-11.