agentleFS
mmaripanguecmmaripanguec/dev-sdd-kit/.claude/skills/repo-add/SKILL.md

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

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
  1. Very specific:

    Run ./scripts/repo-add.sh $ARGUMENTS (clones/updates, registers in repos.yaml, seeds CLAUDE.md).

    line 13
  2. Very specific:

    If the user did not provide --role, infer it from the repo (README, package.json, structure) and update the field with …

    line 17
  3. Very specific:

    Read the freshly cloned repo (README, package.json/Makefile/pom.xml/etc.) and replace every <completar> in repos/<nombre>/CLAUDE.md that …

    line 22
  4. Very specific:

    If indexing cannot be completed here (MCP down, facade without a seed path): do NOT block the onboarding.

    line 42
  5. Very specific:

    Run ./scripts/generate-as-is.sh and review the result.

    line 48
  6. Very specific:

    If there are ≥2 registered repos and the cross-repo graph came out empty or incomplete, recommend /as-is-learn (writes exact per-repo …

    line 49
  7. Very specific:

    Commit repos.yaml + knowledge/as-is/ in the workspace: chore(repos): alta de <nombre> + mapa as-is.

    line 52

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_repository from the codebase-memory MCP on repos/<name> and verify with index_status/list_projects.
    • Fleet / Postgres facade (read-only): the MCP exposes only read tools; index_repository is 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.sh already ran scripts/codebase-memory.sh index <name>, which seeds the repo and wires .mcp.json automatically — just confirm its output. Otherwise seed manually (run_local.py seed --repo repos/<name>) and point .mcp.json at the project. Details in docs/codebase-memory-setup.md.
  • 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_repository when the direct engine is available"). The as-is map and packs still work from grep.

4. As-is map

  • Run ./scripts/generate-as-is.sh and 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.