repo-add
Skill2 starsChanged 4 months agoMITView on GitHub
Onboards a repository into the factory (git URL or local path): clones, registers in repos.yaml, fills its CLAUDE.md with real data, indexes it in codebase-memory and regenerates the as-is map. Use when asked to "add/onboard a repo" or "set up analysis for a repository".
- Reads credentials
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- as-is-learnSkill
- as-isSkill
- as-is-syncSkill
- clarifySkill
- consistencySkill
- context-reportSkill
- convergeSkill
- harness-initSkill
- implement-taskSkill
- orchestrateSkill
- repo-mapSkill
- spec-createSkill
- spec-reviewSkill
- system-mapSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run ./scripts/repo-add.sh $ARGUMENTS (clones/updates, registers in repos.yaml, seeds CLAUDE.md).
- Very specific: line 17
If the user did not provide --role, infer it from the repo (README, package.json, structure) and update the field with …
- Very specific: line 22
Read the freshly cloned repo (README, package.json/Makefile/pom.xml/etc.) and replace every <completar> in repos/<nombre>/CLAUDE.md that …
- Very specific: line 42
If indexing cannot be completed here (MCP down, facade without a seed path): do NOT block the onboarding.
- Very specific: line 48
Run ./scripts/generate-as-is.sh and review the result.
- Very specific: line 49
If there are ≥2 registered repos and the cross-repo graph came out empty or incomplete, recommend /as-is-learn (writes exact per-repo …
- Very specific: line 52
Commit repos.yaml + knowledge/as-is/ in the workspace: chore(repos): alta de <nombre> + mapa as-is.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Goal: leave repo $ARGUMENTS READY TO SPECIFY (/spec-create) in a single pass. The repos.yaml registry is the single source of truth for the topology: never hardcode repo names in scripts or skills.
1. Registration in the registry
- Run
./scripts/repo-add.sh $ARGUMENTS(clones/updates, registers in repos.yaml, seeds CLAUDE.md). If it fails, diagnose with the script's message (credentials → .env, see .env.example) and stop: do not improvise the registration by hand. - If the user did not provide
--role, infer it from the repo (README, package.json, structure) and update the field with./scripts/repo-add.sh <origen> --role "<rol deducido>"(it is idempotent).
2. Fill the repo's CLAUDE.md with REAL data
Read the freshly cloned repo (README, package.json/Makefile/pom.xml/etc.) and
replace every <completar> in repos/<nombre>/CLAUDE.md that you can
back with evidence: real install/dev/test/lint commands, role,
visible conventions. Whatever lacks evidence stays marked
<completar> — do not invent commands. Remember: that file is committed IN
THAT repo, not in the workspace.
3. Index in codebase-memory (code graph)
- Two deployment modes exist (see
docs/codebase-memory-setup.md):- Direct engine: invoke
index_repositoryfrom the codebase-memory MCP onrepos/<name>and verify withindex_status/list_projects. - Fleet / Postgres facade (read-only): the MCP exposes only read tools;
index_repositoryis NOT available and returns-32601 ... no equivalent in the fleet graph. This is EXPECTED — do not treat it as a hard failure. When the fleet is configured in.env(CBM_FLEET_SEED,CBM_FLEET_URL,CBM_FLEET_TOKEN),repo-add.shalready ranscripts/codebase-memory.sh index <name>, which seeds the repo and wires.mcp.jsonautomatically — just confirm its output. Otherwise seed manually (run_local.py seed --repo repos/<name>) and point.mcp.jsonat the project. Details indocs/codebase-memory-setup.md.
- Direct engine: invoke
- If indexing cannot be completed here (MCP down, facade without a seed path):
do NOT block the onboarding; state it explicitly in the final report
("indexing pending: seed via the fleet or run
index_repositorywhen the direct engine is available"). The as-is map and packs still work from grep.
4. As-is map
- Run
./scripts/generate-as-is.shand review the result. - If there are ≥2 registered repos and the cross-repo graph came out empty or
incomplete, recommend
/as-is-learn(writes exact per-repo extractors with evidence from the code). - Commit
repos.yaml+knowledge/as-is/in the workspace:chore(repos): alta de <nombre> + mapa as-is.
5. Final report (output contract)
Summarize: registered name and role, detected stack, MCP indexing status,
as-is map status (with or without graph), and close with the next steps:
"ready for /spec-create <feature>", /repo-map <repo> for the deep
architecture map, and /as-is <pregunta> to explore.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

