reforge

reforge is a skill for Claude Code, Codex from Codewithaiyan/reforge-mcp. It costs 64 tokens per session (1,362 once invoked), scanned A, original, MIT.

A workflow for examining and cleaning up a messy Git repository with Reforge tools. It finds issues such as unused code, repeated logic, oversized files, and circular dependencies, then applies one checked fix per commit.

In plain words
What is it for?
Use it to scan a repository, understand its structure, assess maintenance risk, improve its health score, and apply verified cleanup changes with Git commits.
Why use it?
It requires findings to come from repository analysis rather than assumptions or ad hoc file searches. It also prevents work on untracked files or repositories with uncommitted changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan a repository, understand its structure, assess maintenance risk, improve its health score, and apply verified cleanup changes with Git commits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codewithaiyan/reforge-mcp/reforge
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 Codewithaiyan/reforge-mcp --skill reforge
Clone the repo
git clone --depth 1 https://github.com/Codewithaiyan/reforge-mcp

Made for: Claude Code, Codex.

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 reforge

README.md
[![agentmods](https://agentmods.dev/badge/skills/codewithaiyan/reforge-mcp/reforge/github.svg)](https://agentmods.dev/skills/codewithaiyan/reforge-mcp/reforge)
Your own site
<a href="https://agentmods.dev/skills/codewithaiyan/reforge-mcp/reforge"><img src="https://agentmods.dev/badge/skills/codewithaiyan/reforge-mcp/reforge/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 reforge

Your own site · 80×15
<a href="https://agentmods.dev/skills/codewithaiyan/reforge-mcp/reforge"><img src="https://agentmods.dev/badge/skills/codewithaiyan/reforge-mcp/reforge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,362 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.00064 $0.01362
Opus 5.5 $0.00026 $0.00545
Sonnet 5.5 $0.00013 $0.00272
Haiku 4.5 $0.00006 $0.00136

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

Security

Grade A, and why

reforge 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.

skills/reforge/SKILL.md · 111 lines

How it starts

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

Reforge: cleaning up a messy repository

Analysis comes from tools, not from reading files. Every finding is a question to check, not a fact to act on.

1. Prerequisites

The ten reforge MCP tools must be registered: scan_repo, get_chunk, write_fix, git_commit, read_memory, write_memory, infer_architecture, score_risk, get_health_score, generate_changelog.

If they are missing, give the user these two commands and stop — do not substitute grep or manual reading:

pip install reforge-mcp
claude mcp add reforge -- reforge-mcp

No API key is needed. The repository must be a git repository with a clean working tree; only git-tracked files are analysed, so ask the user to git add new work first or it is invisible.

Note the argument names: scan_repo takes root_path, get_chunk and write_fix take file_path plus repo_root, and everything else takes repo_path.

2. Workflow

  1. Scan. scan_repo(root_path=...). Read summary first — it is never truncated. Then parse_failures, summary.unscanned_source_files and dep_graph.unresolved_relative_imports. Long lists are capped on the wire: truncated names every shortened key and <key>_total gives its real length.
  2. Score. get_health_score(repo_path=...) for the 0–100 baseline and its coverage. Low coverage means the score describes a fraction of the repo — say so before quoting it.
  3. Understand the shape. infer_architecture(repo_path=...) for the pattern, entry points and modules. It stores architecture_hypothesis.
  4. Plan, then save it. Rank findings worst-first, weighted by score_risk(symbol=..., file=..., repo_path=...) — prefer low risk and high payoff. Save the ordered plan with write_memory(key="pending_work", value=[...], repo_path=...) before touching anything, and read_memory it back when resuming.
  5. Read only what you need. get_chunk(file_path=..., start_line=..., end_line=...) for each symbol you intend to change. Confirm the finding is real in the code you just read; drop it from the plan if it is not.
  6. One fix. Build a unified diff and apply it with write_fix(file_path=..., diff_str=..., test_command=...). Always pass a test_command when the project has one. The file ends up either correctly changed or byte-identical. If the result carries a backup path, git could not have recovered the file — report that path to the user and leave it alone.
  7. Commit it. git_commit(repo_path=..., files=[...], message=...), one fix per commit, message saying what was removed and why it was safe.
  8. Repeat from step 5 until the plan is empty or the budget stops you.
  9. Finish. get_health_score again, then generate_changelog(repo_path=...) to write REFORGE_CHANGES.md.

Read the full file on GitHub · 111 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 · 111 lines · 64 tokens per session scan A 631fca49b37f

Subscribe to this mod's changes

reforge is a skill published in the GitHub repository Codewithaiyan/reforge-mcp (2 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 1,362 once invoked, about $0.0003 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-11-02.

Related

reforge compared with skills from other repositories

reforge next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
reforgeCodewithaiyan/reforge-mcpSkill2yesterdayMITA64Claude Code, Codex
feature-publishomnigent-ai/omnigentSkill11ktodayApache-2.0A24Claude Code, Codex
lean-reviewSnowflake-Labs/cocoplusSkill727todayMITA44Claude Code
github-commentingjuspay/neurolinkSkill168yesterdayMITA41Claude Code, Codex
git-workflowmodelcontextprotocol/csharp-sdkSkill4.6ktodaynoneA19Claude Code, Codex
prFlorianBruniaux/claude-code-pluginsSkill442d agoMITA16Claude Code
validate-changesFlorianBruniaux/claude-code-pluginsSkill442d agoMITA16Claude Code