Back to Articles

The State of Skill File Rot

A reproducible audit of 597 agent instruction files across 25 public developer repositories.

researchagents

Skill files rot. Agent memory forgets. Nicia is the durable knowledge store your agents build on.

A coding agent can follow an instruction to the letter and still open a file that moved last month or run a script from before a monorepo migration. We wanted to see how often that kind of mismatch appears in well-maintained developer repositories that actively invest in instructions for AI agents.

We audited our own repository first. At commit a48fc532ae93, npx @nicia-ai/cli audit returned 2 findings across 5 instruction files — both context-bloat warnings on our own root AGENTS.md (16,530 estimated tokens by itself, and 16,806 combined across root always-loaded files). We then scanned 25 established public repositories covering 597 deduplicated instruction files using @nicia-ai/cli@0.2.1. The public figures below use the 25 public repositories as their denominator.

What the audit found

Metric Result
Repositories with a dead path or script 18/25 (72%)
Repositories with stale instructions 2/25 (8%)
Repositories with cross-agent drift 0/25 (0%)
Always-loaded tokens, median 2,501
Always-loaded tokens, p90 5,145

A stale-instruction flag means the CLI found git evidence that code in the file’s directory scope moved while the instruction file stayed untouched. Cross-agent drift checks for conflicting tool claims or long root instruction files edited more than 30 days apart; 0% tripped that check in this cohort because many of these teams have already consolidated onto a single root AGENTS.md or symlinked CLAUDE.md to it (symlinks are deduplicated to their canonical target so they are neither double-counted in tokens nor flagged as stale). The context numbers are estimates for root instructions the audit classifies as always loaded; actual loading and tokenization depend on the client and model.

Rule Repositories Findings
dead-path 18 87
dead-script 4 34
stale-against-code 2 3
cross-agent-drift 0 0
context-bloat 8 8
uncited-hard-fact 2 2

A repository can have several findings, including several against one file. The audit ran static checks only; it did not execute agents or measure task failure rates. Even with symlink deduplication and monorepo workspace-script awareness in 0.2.1, static heuristics can still flag edge cases such as generated files or unscoped scripts inside nested skills — which is why we hand-verified every example cited below against its pinned revision and git history.

Hand-verified examples at the scanned revisions

Every example below was checked directly against the pinned commit and git log so you can inspect the exact mismatch in context:

  • dead-path in withastro/astro (d5af08b89ffd) — Astro’s security code-review skill links to ../../../packages/astro/src/core/encryption.ts as a starting point for server-island data protection. Commit 486f9ea (2026-11-09, #18609) moved that file to packages/runtime/src/internal/core/encryption.ts. Similarly, root AGENTS.md line 78 cites packages/runtime/src/core/errors/errors-data.ts, which lives under packages/runtime/src/internal/core/errors/errors-data.ts. Pinned skill · Pinned AGENTS.md.
  • dead-path in zed-industries/zed (a36d4850f3c0) — Root AGENTS.md points agents to .factory/prompts/crash/investigate.md and .factory/prompts/crash/fix.md for crash investigation. Both prompt files were deleted on 2026-10-23 in commit 4f862ffb (#66024, “Cleanup unused workflows and script files”), while root AGENTS.md — right above its own “Rules Hygiene” section — kept pointing to them. Pinned source.
  • dead-script in cline/cline (d92f9393acec) — .github/copilot-instructions.md tells Copilot: Build: bun run compile — NOT bun run build, along with bun run watch and bun run protos. After the repository reorganized into a monorepo (moving the VS Code extension into apps/vscode/), root package.json defines build and no longer defines compile, watch, or protos — those moved to apps/vscode/package.json while .github/copilot-instructions.md stayed on the pre-monorepo layout. Pinned source.
  • dead-path in mastra-ai/mastra (bab5b9cfb8af) — .claude/skills/live-mastracode-instrumentation/SKILL.md names mastracode/factory-ui/src/ui/domains/chat/services/runtime.ts as the web-mirror instrumentation hook; that file was deleted on 2026-11-29 in commit e98d6b4f (#31839) when the Factory session thread view moved into playground-ui. Pinned source.
  • stale-against-code in continuedev/continue (5522c6f44ca0) — extensions/cli/AGENTS.md went untouched for 270 days (last edited 2026-03-04 in abb1fc04) while 31 commits landed under extensions/cli/ within the shallow history window. Pinned source.
  • context-bloat in vercel/next.js (b85ec51918eb) — Root AGENTS.md runs 7,639 estimated always-loaded tokens in a single file (and langchain-ai/langchain at fbe26955936c runs 5,145 estimated tokens) — smaller than our own 16,530-token AGENTS.md, and a good illustration of how quickly shared defaults grow when everything lands in one root file. Pinned source.
  • uncited-hard-fact in pydantic/pydantic-ai (ff32d39cb19a) — .github/workflows/AGENTS.md embeds a date-stamped external pricing assumption (“Z.ai published no GLM-5.4 API price as of 2026-11-23, so GLM-5.4 uses GLM-5.3’s… AWF retains its fixed 10,000-credit cap”) with no source link to verify when pricing changes. Pinned source.

None of these reflect sloppy engineering — these are some of the fastest-moving, best-run open-source teams in the ecosystem. They show a structural problem: code changes and instruction files live in separate commits, with nothing linking a refactor to the guidance that rests on it.

How we measured it

We screened 50 prominent AI frameworks, coding tools, and web and infrastructure projects on November 29, 2026 for tracked CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md, or SKILL.md files, and selected 25 established public repositories across those three categories. The cohort is an intentionally selected sample of projects that already ship agent instructions; its rates describe this cohort rather than all GitHub repositories.

Each repository was cloned at its pinned commit with up to 100 commits of history (--depth=100) and audited with @nicia-ai/cli@0.2.1 (audit <dir> --json). That shallow depth limits how far back staleness and deletion history reach. Every raw finding from the public cohort is published in the public JSON dataset so anyone can inspect or reproduce the exact run.

Public cohort revisions

Repository Commit Files scanned Est. always-loaded tokens
vercel/ai 362bd2c19417 19 4,107
langchain-ai/langgraph 3e3dbd42c532 1 1,059
langchain-ai/langchain fbe26955936c 1 5,145
openai/openai-agents-python cecd9eb2152c 19 4,157
openai/openai-agents-js ccceb64ff6ce 19 5,982
google/adk-python bee78e7ce1bc 22 355
crewAIInc/crewAI 9c6aeb80f9a8 5 468
mastra-ai/mastra bab5b9cfb8af 195 449
pydantic/pydantic-ai ff32d39cb19a 52 5,042
cloudflare/agents 30d843b10a36 12 2,501
modelcontextprotocol/typescript-sdk 5ee54ee30ddc 9 324
anomalyco/opencode c3532611c740 46 4,555
openai/codex 4999d8167b3c 10 0
cline/cline d92f9393acec 14 2,314
continuedev/continue 5522c6f44ca0 3 0
zed-industries/zed a36d4850f3c0 10 3,119
All-Hands-AI/OpenHands 02f5e035cdcb 10 2,638
google-gemini/gemini-cli 60f8082b14ff 33 0
astral-sh/ruff 4d970500e563 8 5,137
vercel/next.js b85ec51918eb 43 7,639
supabase/supabase a2e41ea71b65 34 3,458
TanStack/query e7916a9e2eb6 1 1,062
vitejs/vite 7d0c054f41ba 1 408
withastro/astro d5af08b89ffd 11 2,242
grafana/grafana e09ef249c60d 19 2,919

Download the full sanitized public JSON output (revisions, rule totals, and raw per-repository findings): Study dataset (skill-file-rot-study-2026-12.json).

You can inspect your own checkout with zero signup:

Terminal window
npx @nicia-ai/cli audit .

What changes when an instruction has a source

Docs go stale. Agent memory forgets. Put what your agents rely on in Nicia.

Keep code-local instructions in Git. For shared rules, policies, or operational facts that several agents and teammates rely on, store the rule in a Nicia space with a citation or declared ground. When that source changes, dependent records reopen for review. The next read shows that the rule needs review, and receipts record what earlier reads served.

TypeGraph, the engine under Nicia, is MIT open source, and @nicia-ai/cli is MIT open source.