Skip to content
Back to skills

Project Retrofit

ASecurity

Move an existing project's big CLAUDE.md, notes or TODO into the standard doc set without losing any text. Use for "retrofit this project", "split up this CLAUDE.md" or "migrate our notes to the standard docs".

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
ai-agentspythongobashgit

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add oneafrikan/the-grid --skill project-retrofit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Project Retrofit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Project Retrofit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oneafrikan-project-retrofit/badge)](https://www.skillsdirectory.com/skills/oneafrikan-project-retrofit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: project-retrofit
description: Move an existing project's big CLAUDE.md, notes or TODO into the standard doc set without losing any text. Use for "retrofit this project", "split up this CLAUDE.md" or "migrate our notes to the standard docs".
---

# project-retrofit

You decide where each block of text goes. `retrofit.py` moves it verbatim and
proves nothing was lost. **Never retype, summarise or reword source text**, and
never hand-edit a destination to fix a coverage failure.

Script: `project-factory/scripts/retrofit.py` (beside `skills/`; resolve symlinks
with `cd -P`). Run it from the target repo root. Exit codes: 0 ok, 1 coverage
failure, 2 plan error or refusal (nothing written).

## Steps

1. `python3 <retrofit.py> survey .` (read-only). Ask the operator ONE short batch:
   which sources to migrate (default: CLAUDE.md and agent notes; README and TODO
   stay unless chosen), which optional docs to scaffold, anything off-limits.
   Stop and wait for the reply.
2. Scaffold what is missing: `bash <project-factory>/scripts/cut-project.sh --generic [--with a,b] .`
   (existing files are skipped, never overwritten).
3. `python3 <retrofit.py> blocks <source>`; read the source with line numbers.
   Write the plan to a working file outside every destination, e.g.
   `.retrofit/plan.md` (tell the operator it is a working file). Its header is the
   `## source: ... sha256:...` line `blocks` printed, pasted unchanged. Mapping
   guide and syntax: sections/. Every block is accounted for once. Ambiguous means
   `unsorted`. Never guess, never drop.
4. `apply <plan>` (dry run; validates everything) and show the operator a SUMMARY
   TABLE: destination, block count, bytes, previews, any WARNING. Wait for
   approval. Never apply before approval.
5. Ask the operator to commit or stash first, so `git restore <destinations>` (plus
   deleting a new UNSORTED.md or newly scaffolded files) is the undo: apply has no
   revert command. Then `apply <plan> --yes` and `check <plan> --report`. If check
   fails: stop, show the MISSING lines, restore via git, fix the plan, re-run.
6. Write a SLIM replacement entry doc (under 60 lines; `finalize` refuses more,
   `--max-lines N` overrides, 0 = none). Shape: 
   `project-factory/templates/_core/CLAUDE.md` (cut-project skips an existing
   CLAUDE.md). Include only pointers, the `keep` text (`retrofit.py keep <plan>`
   prints it) and facts in the archived original; nothing mechanical checks the
   rest, so invent nothing. Show the FULL replacement to the operator; run
   `finalize <plan> --replace-with <file>` dry, then `--yes` after approval. Never
   pass `--allow-dirty` without the operator's explicit yes; ask them to commit
   the source instead. It archives the original to `docs/archive/` and prints
   the undo (`mv`).
7. `git add` the new docs first (map.py lists tracked files only, so an untracked
   tree gives a false pass), then `python3 scripts/map.py` and `python3 scripts/map.py --check`. Report: coverage
   numbers, UNSORTED.md block count, `<fill:` markers left, files changed. Commit
   only if the operator asks.

## Sections

- sections/mapping-guide.md: read when writing the plan in step 3.
- sections/plan-format.md: read when the script rejects a plan or you need the exact syntax.

Files in this skill

  • SKILL.md3.1 KB
  • sections/mapping-guide.md2.3 KB
  • sections/plan-format.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.