retrofit

retrofit is a skill for Claude Code, Codex from MasonEgger/bpe-claude-code-plugin. It costs 32 tokens per session (1,275 once invoked), scanned A, original, MIT.

A guided command that adds a project specification file to an existing code repository. The file records the project's intent, direction, and scope in a format understood by related planning commands.

In plain words
What is it for?
Use it when a project lacks spec.md and you want to prepare it for structured planning. It can also replace an existing specification when explicitly requested.
Why use it?
It fills in the planning information that an older repository may not have, while using the repository's existing files to avoid unnecessary questions.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the bpe plugin — 13 skills, 3 agents shipped together

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.

agentmods
npx agentmods add skills/masonegger/bpe-claude-code-plugin/retrofit
Any agent
npx skills add MasonEgger/bpe-claude-code-plugin --skill retrofit
Clone the repo
git clone --depth 1 https://github.com/MasonEgger/bpe-claude-code-plugin

Made for: Claude Code, Codex.

Or install bpe, the plugin that ships this one along with the rest of its 13 skills, 3 agents.

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 retrofit

README.md
[![agentmods](https://agentmods.dev/badge/skills/masonegger/bpe-claude-code-plugin/retrofit.svg)](https://agentmods.dev/skills/masonegger/bpe-claude-code-plugin/retrofit)
Your own site
<a href="https://agentmods.dev/skills/masonegger/bpe-claude-code-plugin/retrofit"><img src="https://agentmods.dev/badge/skills/masonegger/bpe-claude-code-plugin/retrofit.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,275 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.01275
Opus 5 $0.00016 $0.00638
Sonnet 5 $0.00006 $0.00255
Haiku 4.5 $0.00003 $0.00128

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

Security

Grade A, and why

retrofit 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 5d 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.

bpe/skills/retrofit/SKILL.md · 72 lines

How it starts

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

Retrofit Command

Add a BPE-compatible spec.md to an existing project that never went through /bpe:brainstorm. Most of what a spec needs already lives in the repo; read it there instead of asking. The shortened Q&A covers only the gaps the repo cannot answer: intent, direction, and scope. The resulting spec.md matches the format /bpe:brainstorm produces, so /bpe:plan consumes either without knowing which skill wrote it.

Procedure

  1. Guard against clobbering. Check for spec.md at the repo root. If it exists and --replace is NOT in $ARGUMENTS, refuse: tell the user a spec.md already exists and that /bpe:retrofit --replace overwrites it, then stop. If it exists and --replace is present, proceed; step 5 overwrites the file. If it does not exist, proceed.

  2. Read repo state. Run ls at the repo root. Read README.md if present. Read CLAUDE.md if present. Read whichever manifest files exist: package.json, pyproject.toml, go.mod, Cargo.toml. If the language is detectable from the manifests, read the top-level module docstrings (or equivalent package-level docs) of the main source directories. Use what these reveal to pre-fill draft answers, so the Q&A in step 4 asks only about gaps.

  3. Blindspot pass. Run this pass BEFORE the shortened Q&A. It calibrates the rest of the session to what the user already knows. Same shape as /bpe:brainstorm Step 0; ${CLAUDE_PLUGIN_ROOT}/references/session-management.md documents the resulting ## Starting context section canonically.

    1. Ask ONE question about the user's starting context: domain familiarity, prior attempts at this idea, experience with this codebase. The repo state from step 2 informs the question; it does not answer it.
    2. Given the answer, surface 3-5 unknown-unknowns: questions the user probably doesn't know to ask, framed as "you may want to consider" rather than "you must answer". The user may engage with any, all, or none of them.
    3. Keep the user's context answer verbatim; step 5 writes it into spec.md under ## Starting context. Do not paraphrase; the plan writer and validator calibrate against the user's own words.
    4. Proceed to the shortened Q&A in step 4.

Read the full file on GitHub · 72 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. 5d ago First seen · 72 lines · 32 tokens per session scan A a84a34702e91

Subscribe to this mod's changes

retrofit is a skill published in the GitHub repository MasonEgger/bpe-claude-code-plugin (7 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 1,275 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens