agentleFS
MostAshrafMostAshraf/ai-sdlc-harness/skills/add-repo/SKILL.md

add-repo

Skill20 starsChanged 3 months agoMITView on GitHub

Register one new repo into an already-bootstrapped workspace, without disturbing repos already registered or re-running the full interview. USER-ENTRY — invoke only when the user explicitly runs /add-repo; never autonomously, never from a subagent (guard-enforced).

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. cTuningLabs/cmeta★ 9same name
    2. curv-institute/atlas★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every command below is ${CLAUDE_PLUGIN_ROOT}/bin/harness <verb> … — run it yourself via Bash.

    line 12

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

add-repo

Every command below is ${CLAUDE_PLUGIN_ROOT}/bin/harness <verb> … — run it yourself via Bash. Never ask the user to type a harness command; the user only answers the questions below.

1 · Ask

  • Repo name (must be new — case-insensitively distinct from every already-registered name) and its local path.

2 · Discover, then confirm

${CLAUDE_PLUGIN_ROOT}/bin/harness discover --repo <path> — same discovery /init-workspace uses. It first ensures the repo is clean and on its default branch: a dirty repo, or one mid-rebase/merge, refuses with a clear error — surface that to the user verbatim, never auto-stash/discard. If the guessed default branch doesn't resolve (no origin/HEAD), ask the user to name it explicitly, then pass --branch <name> yourself; a repo with no origin and a stray local branch that happens to be named main can't be told apart from a genuine one, so confirm rather than assume. Known risk: running discover against a path that's actually already registered, with a /dev-workflow run in progress against it, can switch that run's feature-branch checkout back to default — if there's any chance the path is already registered, check first rather than running discover on it. The same hazard reaches a path that is merely inside a checkout some other registered repo already covers (the monorepo shape below): the branch switch flips the whole shared tree, so check for an in-flight run on every logical repo sharing that checkout, not only on this exact path.

Present the proposals (language, test_cmd, default branch) as defaults-to-confirm, not facts:

  • Confirm test_cmd by actually running it — don't accept the proposal unconfirmed, and never collapse this repo's own command onto another registered repo's.
  • A proposal may carry no test_cmd: no single command covers that root (a .NET root with no solution file, or two side by side). Ask the user; never synthesise one. init-verify gates on invocability only, so a command that cannot even locate its project still reports pass, and the first verify-red then seals a red-proof over a build error.
  • A monorepo_split proposal means this "one repo" is actually several logical repos sharing one .git at the physical root. Register each proposed root as its own logical repo — one /add-repo pass per root (this run registers one; tell the user the rest each need their own run), not one registration at the checkout. monorepo_split lists the root of every proposal, checkout-relative in the platform's own separators (backslashed on Windows), . meaning the checkout itself; the path to register is <checkout>/<root> (plain <checkout> for .). Suggest <repo>-<root> names (xtream-backend for the . root holding the solution, xtream-frontend for frontend/) and let the user overrule the names, not the shape. init-verify passes any path inside a git work tree, root or subtree, and says <path> (subtree of <checkout>) when they differ — confirmation, not a warning. Confirm each root's test_cmd from that subtree (cd <checkout>/frontend first): proposed commands are subtree-relative and the harness runs them with the registered path as cwd. Say plainly what the user gets: per-task worktrees still isolate (built from the physical checkout, task works in <worktree>/<subtree>, staging bounded to the subtree), but outside worktrees both logical repos sit on the SAME branch — preflight cuts it in the shared checkout — and a parent root legally contains its child, so only review catches a parent task editing the child's files.

3 · Register

${CLAUDE_PLUGIN_ROOT}/bin/harness add-repo --name <n> --path <path> --test-cmd '<confirmed cmd>'

This merges into the existing repo/language config — every already- registered repo survives untouched. It refuses (never renames/overwrites/ aliases) on:

  • --name already registered, compared case-insensitively — surface this verbatim and ask the user for a different name.
  • --path already registered under a different name — surface this verbatim; the repo is very likely already set up, so confirm with the user rather than retrying with a new name.

--path may be a subtree of a checkout another registered repo already covers — that's the monorepo shape above, and it is not a collision: the duplicate-path refusal compares resolved paths exactly, so <checkout> and <checkout>/frontend are two distinct registrations while the identical path twice is still refused. Pass the subtree path verbatim and register the subtree's own --test-cmd with it; nothing downstream rewrites the path back to the physical checkout root.

--test-cmd is optional — omitting it registers the repo but leaves init-verify's test_cmd:<name> check failing until a command is set via init-section --section language (merge the new repo's entry into the existing language.repos map — that section is still full-replace, so resupply the whole map, not just this repo's entry).

4 · Verify + finish

  1. ${CLAUDE_PLUGIN_ROOT}/bin/harness init-verify — every check must pass (or be manual with the user's explicit acknowledgment, for MCP- transport work-item providers). Do not proceed on failures — show the remediation, fix, re-run.
  2. ${CLAUDE_PLUGIN_ROOT}/bin/harness init-finalize — refreshes the permission allowlist to cover the new repo (its test_cmd binary, Read on its path). Confirm .claude/settings.json merged cleanly.
  3. Repo-map: offer to generate now — run /repo-map-refresh's step 2 procedure for this repo (that skill owns the exact subagent_type- guessing warning and the harness-mode: repo-map spawn/stamp sequence; don't restate it here), pointed at .claude/context/repo-map/<repo-name>/.
  4. Tell the user the new repo is ready for /dev-workflow.

Known risk

security-scan scans every registered repo in one call, regardless of which repo a given /dev-workflow run's tasks touch — avoid running /add-repo while another run is active for an unrelated repo, in case the newly-added one isn't a valid checkout yet.

Going from one repo to several does not reach an in-flight quick run: its confirm-repo predicate reads the repo-ambiguity artifact recorded once at fetch, so it still walks straight to preflight on the only repo it knew about. Runs fetched after this command see the choice; to move an in-flight one, abort and re-fetch.

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.