context-legacy

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

A code-archaeology workflow for understanding why legacy code exists by examining the codebase, Git history, and optionally Jira, a project-tracking system.

In plain words
What is it for?
Use it to investigate an unfamiliar module, check existing discovery notes, trace historical decisions, and produce notes plus possible architecture records and product requirements for human review.
Why use it?
It reconstructs missing context before changes are made, helping distinguish intentional behavior from outdated or unexplained code.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/jira-context-fetch.sh \.

Good fit Use it to investigate an unfamiliar module, check existing discovery notes, trace historical decisions, and produce notes plus possible architecture records and product requirements for human review.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rtazima/claude-proj-blueprint
agentmods
npx agentmods add skills/rtazima/claude-proj-blueprint/context-legacy

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rtazima/claude-proj-blueprint/context-legacy"><img src="https://agentmods.dev/badge/skills/rtazima/claude-proj-blueprint/context-legacy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,397 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.00095 $0.03397
Opus 5 $0.00048 $0.01699
Sonnet 5 $0.00019 $0.00679
Haiku 4.5 $0.00010 $0.00340

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

Security

Grade A, and why

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

.claude/skills/context-legacy/SKILL.md · 386 lines

How it starts

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

Context Legacy Skill

Multi-phase discovery for legacy code. Reads code, git, and optionally Jira to reconstruct intent. Never modifies source files. All output goes to memory/discoveries/ and docs/.

Phases

Phase 0 → Memory query          (check what's already indexed — avoid redoing work)
Phase 1 → Code archaeology      (static analysis — always)
Phase 2 → Git history           (always)
Phase 3 → Jira enrichment       (only if JIRA_* env vars present in .env)
Phase 4 → Cross-reference       (synthesize all signals)
Phase 5 → Output generation     (notes + candidates + re-index)

Phase 0 — Memory query

Before reading any code, check if the module was already discovered.

memory/.venv/bin/python -m memory.query "<module_name>" 2>/dev/null | head -30

If results show prior discovery notes for this module:

  • Read memory/discoveries/<module-slug>-survey.md if it exists
  • Note what's already known — skip re-deriving it in Phases 1–2
  • Focus new work on gaps or on Jira context not yet captured

If no prior results, proceed to Phase 1 fresh.


Phase 1 — Code archaeology

Goal: understand what the module does, not how it works.

# Map the target
find <module_path> -type f | sort
wc -l <module_path>/**/* 2>/dev/null | sort -rn | head -20

# Hot files: most commits in last 2 years
git log --since="2 years ago" --pretty=format: --name-only -- <module_path> \
  | sort | uniq -c | sort -rn | head -10

# Cold files: untouched 3+ years, still present
git log --before="3 years ago" --name-only --pretty=format: -- <module_path> \
  | sort -u > /tmp/cold-all.txt
git log --since="3 years ago" --name-only --pretty=format: -- <module_path> \
  | sort -u > /tmp/cold-recent.txt
comm -23 /tmp/cold-all.txt /tmp/cold-recent.txt

Read hot and cold files first. For each, note:

  • Public interface (classes, functions exported, iface.hh for C++)
  • Non-obvious dependencies (#include, imports, deps file)
  • Surprising patterns — magic numbers, global state, platform ifdefs
  • Existing comments that hint WHY (not what)
  • Markers already present (:HACK:, :UNSAFE:, TODO, FIXME, XXX)

Read the full file on GitHub · 386 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 · 386 lines · 95 tokens per session scan A 5ee00ecf666c

Subscribe to this mod's changes

context-legacy is a skill published in the GitHub repository rtazima/claude-proj-blueprint (20 stars, last pushed 3mo ago), licensed MIT. It adds 95 tokens to every session and 3,397 once invoked, about $0.0005 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-30.