legacy-context

legacy-context is a skill for Claude Code from rtazima/claude-proj-blueprint. It costs 125 tokens per session (8,568 once invoked), scanned A, original, MIT.

A skill for investigating unfamiliar or poorly documented legacy code and recording how it works. Legacy code is older software whose original design and decisions may no longer be clear.

In plain words
What is it for?
Use it to map an unknown module, capture findings in discovery notes, suggest architecture records, and identify comments or past decisions worth keeping.
Why use it?
It preserves useful knowledge that might otherwise be rediscovered during every coding session. It creates notes and architecture suggestions without changing the source code.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to map an unknown module, capture findings in discovery notes, suggest architecture records, and identify comments or past decisions worth keeping.

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

Made for: Claude Code.

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 legacy-context

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rtazima/claude-proj-blueprint/legacy-context"><img src="https://agentmods.dev/badge/skills/rtazima/claude-proj-blueprint/legacy-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00125 $0.08568
Opus 5 $0.00063 $0.04284
Sonnet 5 $0.00025 $0.01714
Haiku 4.5 $0.00013 $0.00857

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

Security

Grade A, and why

legacy-context scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -u ":$AZURE_DEVOPS_EXT_PAT" \
.claude/skills/legacy-context/SKILL.md · 707 lines

How it starts

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

Legacy Context

Most context-engineering techniques assume layers 1 and 2 of tiered lookup (semantic memory and structured docs) already contain useful information. In consolidated codebases this assumption breaks. There are no ADRs, no post-mortems indexed, no runbooks, no skill memory. Tiered lookup collapses to layer 3 (raw code) and every session pays the full reading cost again.

This skill runs before context-engineering becomes useful. It does code archaeology and writes discovery notes, ADR candidates, and intent marker suggestions into the empty layers, so that the next sessions can use the cheaper layers as designed.

The skill is read-only for source code. It never edits source files. It writes only to memory/discoveries/, docs/architecture/_candidates/, and emits intent marker patches for human review.

Operating principle

Bias toward completeness. When in doubt, capture more, not less. In consolidated codebases, the contextual gem is usually the comment buried in a 6-year-old PR review or the issue closed as "wontfix" with three paragraphs of reasoning. Missing those is a worse failure than producing verbose discovery notes.

This bias is reflected in the defaults: the early-exit heuristic in Phase 3 is disabled by default, the trunk-based threshold is set conservatively (30% PR coverage), and commit message scans extend automatically when remote layers prove thin. Users who prefer speed over completeness can flip the relevant flags in the "Tuning" section of Phase 1.

Supported remote providers

Provider Detection Auth Notes
GitHub URL contains github.com gh auth status Full feature parity
Azure DevOps URL contains dev.azure.com or .visualstudio.com AZURE_DEVOPS_EXT_PAT env var (no az login needed) No reactions on comments; releases mapped to git tags
Other (GitLab, Bitbucket, self-hosted) Anything else n/a Phase 3 skipped with warning

Rules

  1. Read source, write context. Never modify source files. All output goes to discovery notes, ADR candidates, or marker patches for review.
  2. Discovery before implementation. This skill does not implement features. If implementation is needed, hand off to /implement after discovery completes.
  3. Why, not what. Source code already shows what runs. Discovery captures why it exists, what depends on it, and what breaks if changed.
  4. Cover the path entirely on remote. Remote discovery iterates every file in the path, not just the priority ones from the survey. A "warm" file with no commit pattern may still have a critical PR discussion attached to it.
  5. Cap source-code reading depth, not remote breadth. If a single source file exceeds 2,000 lines, treat it as a sub-module and recurse. On remote, do not cap by top-N. Stratify by discussion density instead.
  6. Outputs go to predictable paths. Other skills (memory, incoherence detector, ADR) consume the discovery output. Keep file naming consistent across providers.
  7. Same output across providers. Phase 3 produces identical file structure whether running on GitHub or Azure DevOps. Downstream phases should not need to know which provider generated the data.

Read the full file on GitHub · 707 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 · 707 lines · 125 tokens per session scan A ee5405505a7f

Subscribe to this mod's changes

legacy-context is a skill published in the GitHub repository rtazima/claude-proj-blueprint (20 stars, last pushed 3mo ago), licensed MIT. It adds 125 tokens to every session and 8,568 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.