repo-onboarding
Skill0 starsChanged 39 days agoMITView on GitHub
Inspect a repository and generate the cross-tool contract files this toolkit's skills rely on: AGENTS.md, TASKS.md, .claude/project.json, and GOTCHAS.md. Use when onboarding a new repo to the workflow toolkit, when the user says "set up this repo for the toolkit", "generate AGENTS.md", "create project.json", or asks how the codebase is laid out, or when /onboard, /discovery, /codelearn, or /init-toolkit is invoked.
- Reads credentials
- Deletes or force-pushes
10 other projects use a version of this.
Adopted by
Most recently taken up by
- KhaiTrang1995/nexus-kbtheir own version, first seen Nov 8, 2026
- janghotan/repo-onboardingtheir own version, first seen Oct 25, 2026
- salmandev/everything-geminitheir own version, first seen Oct 17, 2026
- dss-time/repo-doctor-skillstheir own version, first seen Oct 15, 2026
- nhat092005/skillstheir own version, first seen Oct 13, 2026
- RichardGeorgeDavis/Codex-Workspacetheir own version, first seen Sep 18, 2026
Used with
Projects with it also use mcp-maintainer and release-guard.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
KhaiTrang1995Skillmcp-maintainer
Operate and maintain the local MCP server for this repository. Use for MCP tool updates, policy-guard changes, host configuration, and MCP runtime troubleshooting.
Also in 3 projects that use this
KhaiTrang1995Skillrelease-guard
Run release-readiness checks for this repository. Use when validating docs, scripts, verification coverage, and operational safety before merge or release.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- hoangsonww/Claude-Code-Agent-Monitor★ 1.2ksame name
- caiaffa/claude-code-ultimate-engineering-system★ 17same name
- ldilov/harness-forge★ 4same name
- RichardGeorgeDavis/Codex-Workspace★ 2same name
- salmandev/everything-gemini★ 2same name
- dss-time/repo-doctor-skills★ 1same name
- janghotan/repo-onboarding★ 1same name
- KhaiTrang1995/nexus-kb★ 1same name
- nhat092005/skills★ 1same name
- MrZarrar/Jarvis-Sub-Agent-Dashboard★ 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 repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstormSkill
- brainstorm-teamSkill
- code-tourSkill
- dead-code-reviewSkill
- docstring-syncSkill
- flowsimSkill
- gotchaSkill
- plan-htmlSkill
- repo-healthSkill
- sdlcSkill
- sdlc-statusSkill
- taskSkill
- test-checkSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 3 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
If .claude/project.json already exists, first run bash scripts/migrate-project-json.sh check (toolkit path: repo-local scripts/.
- Very specific: line 124
Interactive sessions only: When there is nobody to answer — a headless claude -p run, a CI job, any non-interactive invocation — do not ask …
- Very specific: line 189
If AGENTS.md is missing (or the user asks to regenerate it), produce one by filling in the placeholders in templates/AGENTS.md.template.
- Distinctive: line 196
Keep each section terse. AGENTS.md is read by every agent, every session — brevity beats completeness.
- Distinctive: line 200
After the user confirms or adjusts — or immediately, with the recorded defaults, when Step 3 was skipped as non-interactive.
- Very specific: line 204
Write .claude/project.json (create .claude/ if missing).
- Very specific: line 205
Write AGENTS.md at repo root.
- Very specific: line 206
If no TASKS.md, copy templates/TASKS.md.template to repo root.
- Very specific: line 207
If no GOTCHAS.md at repo root, create one from examples/GOTCHAS.md.example.
- Very specific: line 211
Write only what Step 3's .gitignore answer chose — the user decides what stays out of git.
- Very specific: line 227
Write the entries without the # if selected annotations.
- Very specific: line 239
After the project.json bootstrap, ask the user:
- Very specific: line 247
On no: leave both pipeline.poka_yoke and .claude/settings.json unchanged.
- Very specific: line 251
Write the PreToolUse hook entry into .claude/settings.json (create the file if missing.
- Very specific: line 257
If a scripts/hooks/secret-scan.sh is not already present in the repo, stub one out (or document where the user should drop it) using the …
- Distinctive: line 272
If one already exists, read it, show the user what's there vs.
- Very specific: line 274
Do not infer commands that haven't been verified: If you see pytest.ini but no actual tests pass, still propose the pytest command but flag …
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repo Onboarding / Discovery
This skill inspects the current repository and generates the config files that
the rest of the toolkit reads. Run this once per repo after dropping the
toolkit's skills and scripts in place. After it finishes, /test-check,
/repo-health and /sdlc should work with no further setup.
Output
Produces (or offers to produce):
AGENTS.md(at repo root) — architecture summary + agent conventions (absorbs /codelearn)TASKS.md(at repo root) — empty task queue from template.claude/project.json— the runner config contractGOTCHAS.md(at repo root) — empty template if missing- A short report of what was detected and what was left blank
Procedure
Step 1 — Scan the repo
In the main context window (no subagents), survey the repo structure:
- Language / stack fingerprints:
package.json→ Node/JS/TS project. Notescripts.test,scripts.e2e, workspace layout.pyproject.toml/requirements.txt/Pipfile→ Python. Check for pytest config.go.mod→ Go. Test command isgo test ./....Cargo.toml→ Rust. Test command iscargo test.Gemfile,pom.xml,build.gradle, etc. → flag the stack.
- Container/orchestration:
docker-compose.yml/compose.yml→ read service namesDockerfileonly → single-container appkubernetes/ork8s/or Helm chart → kubectl-based logs- None → logs come from processes or log files directly
- Test infrastructure:
tests/dir withtest_*.py→ pytest__tests__/,*.test.ts→ jest/vitestplaywright.config.*→ e2e tests presentvitest.config.*/jest.config.*→ unit test runner
- Eval/fixtures (rare — toolkit-specific):
evals/directory → already set up for the eval runnertests/eval/directory → already has eval tests
- Branch info:
git remote -v+git symbolic-ref refs/remotes/origin/HEAD→ default branch name
- Existing docs:
README.md,CLAUDE.md→ skim for existing commands and conventions
Sweep the whole repo, then account for every key. The fingerprints above are the common cases, not the contract. Walk the actual tree (honour
.gitignore; skip.git/,node_modules/,venv/, build output) and also readMakefile/Justfile/Taskfile.*targets,.github/workflows/*(where the real test/lint/build commands are usually written down),.env.example,Procfile,pytest.ini/tox.ini/setup.cfg,migrations//alembic//prisma/, workspace globs, published ports.Then drive the proposal from the key registry, not from what you happened to notice: open
.claude/project.json.example(in the plugin repo itself, the same file lives under its templates dir) and put every key in one bucket —detected(evidence),not applicable(with why), orunknown(ambiguous). That list is what makes the scan exhaustive rather than best-effort, and it is the only way a key nobody thought to look for gets noticed. Carry it into Step 2; report theunknownones in Step 6.
Step 2 — Propose the config
If .claude/project.json already exists, first run bash scripts/migrate-project-json.sh check
(toolkit path: repo-local scripts/; else the plugin root, this skill's base directory two levels
up, <base>/../..; else ~/.claude/brainstorm-toolkit/) and offer apply for any dead keys it
lists. Headless: apply (a .bak is written) and list the moves in the report.
Build a draft project.json from what you found. Fill in:
test.unit— from detected test frameworktest.frontend— if a separate frontend package was detectedtest.e2e— if Playwright/Cypress/etc. was detectedlogs.command— from detected orchestration (docker / kubectl / file tail)logs.services— from compose services or k8s deploymentsstack.up/stack.rebuild— how to bring the runnable stack up for manual verification; propose only from a detected orchestrator, never invent one (see the detection table).rebuildis the force-recreate variant used when a dependency manifest changed.stack.url— the local URL to open once it is up, if a port is discoverable from compose/Procfile/framework configeval.runner— only ifscripts/eval-runner.pyexists (from the toolkit)eval.features_dir—evals/if dir exists, otherwise blankgotchas_file—GOTCHAS.md(default)main_branch— from gitcoauthor_trailer— whether commit messages this toolkit writes or suggests carry aCo-Authored-By: Claude <noreply@anthropic.com>trailer. Detection cannot decide this — ask (Step 3). Defaultfalse. Do not infer it from existing history: a repo whose log already shows the trailer may have been committed by a different tool or by a contributor who wants it, and neither implies consent for this checkout.discipline.data_globs— the default**/migrations/**misses alembic: when a**/alembic/versionstree exists, propose adding**/alembic/**.discipline.frontend_globs— when the frontend root is notfrontend/(e.g.portal/holding apackage.jsonplus.ts/.tsxfiles), propose globs rooted there (portal/**/*.tsx, ...).modules— inferred from top-level code directories (src/,api/,web/,packages/*, etc.)models.implement,models.code_review,models.cap— choices, not detection (Step 3).models.capis a ceiling that only lowers; absent = no ceiling. Recommend omitting it; proposehaikuorsonnetonly to squeeze cost. Every othermodels.*key exists with its default and is edited inproject.json(.claude/project.json.example). Contract:skills/sdlc/templates/models.md.
When unsure, leave the key out. A missing key causes skills to skip that step gracefully — that's better than a wrong command.
Step 3 — Show the proposal, then walk the choices detection can't make
Interactive sessions only. When there is nobody to answer — a headless claude -p
run, a CI job, any non-interactive invocation — do not ask and do not stop. Take each
row's documented default (models.implement: "sonnet", review off, no models.cap, coauthor_trailer: false,
stack.* as detected or omitted, the full default .gitignore set with no extra paths, no autoCompactWindow), then go straight to Steps 4–5 so the repo is actually
onboarded, naming every assumed value in the Step 6 report so it is one edit to correct.
First print the proposed project.json with a one-line rationale per detected key
(Detected Python + pytest → test.unit; docker-compose services [api, web] → logs.* + stack.*;
no eval runner → eval.* left blank; main branch from origin HEAD; …).
Then interview the repo's owner about the stack and the architecture — read first, ask
second, and ask as many rounds as it takes. Step 1 read the code; this is where you find
out what the code cannot tell you. There is no question cap: keep going until you could
write AGENTS.md without inventing anything. Ground every question in something you
actually saw — "I see api/ and worker/ but no queue client; how does work reach the
worker?" beats "describe your architecture", because the first proves you read the repo and
gives them something concrete to correct. Cover at least:
- Stack beyond the manifests — the datastore and why it, the cache, the queue, external services and which are load-bearing, anything running in production that has no file in this repo.
- Architecture and request flow — entry point through to persistence, which modules own which responsibility, where the seams are, what talks to what. Draw back what you inferred from the scan and ask what is wrong; a correction is faster to give than a description.
- What is deliberately unusual — every repo has a decision that reads as a mistake and
isn't. Ask for it directly; it is the highest-value thing you can put in
AGENTS.md, and it is invisible to a scan. - Where the bodies are — the flaky area, the module nobody touches, the migration that
must run in a certain order. These become
GOTCHAS.mdentries, not architecture prose. - How work actually ships — branch and review conventions, what must pass before merge, what is enforced by CI versus by habit.
Take the answers into Step 4 (AGENTS.md) and into GOTCHAS.md; anything that resolves a
config key goes into the proposal above. Skip this interview entirely when non-interactive,
per the rule at the top of this step.
Then ask these questions explicitly — do not bury them in "does this look right?". Detection can't decide any of them, they are the main cost/quality/policy levers, and a user who is never asked never discovers the key exists. Ask them in one batch — prefer the host's built-in interactive question UI (the multiple-choice picker it already uses to ask you to choose an approach): one question per key, options as choices, recommended default first. Where the host has no such UI, print a numbered list and take the answers in a single reply. Default first so "just accept" is one keystroke, and state the cost (or policy) direction in each option:
| Ask | Key | Options (default first) |
| Which model implements the work? (Stage 2 implementers, fix agents.) The bulk of the tokens. | models.implement | sonnet (recommended) · haiku (cheapest) · opus (priciest) |
Enable the adversarial Review→Fix stage, and which model reviews? Recommend on + opus: Sonnet does the bulk of the tokens and a different, stronger model reviews — cheaper than Opus end to end, and the review stays independent. | pipeline.review_fix.enabled / models.code_review | true + opus (recommended) · true + fable (usage-billed, explicit opt-in) · false (never runs by accident) |
| Ceiling for every sub-agent fan-out? It only lowers a tier, never raises one — omitting it leaves each role at its own key. | models.cap | omit (recommended; no ceiling) · sonnet · haiku (cheapest; fine for sweeps/monitoring) |
Which model pre-flights your plan before any code is written (Stage 1.5, never gated — it runs on every /sdlc run). Say plainly that the built-in per-focus defaults are paths=haiku, completeness=sonnet, gotchas=sonnet, and that models.cap cannot raise any of them — models.sanity (a string for all focuses, or a per-focus map) is the only lever. | models.sanity / agents.sanity_focuses | omit → built-in defaults (paths=haiku, completeness=sonnet, gotchas=sonnet) · opus (raises every focus at once) · a map like {"completeness": "opus"} to raise just one · fewer focuses to cut cost (paths is mechanical; drop gotchas when there's no GOTCHAS.md) |
| How many review lenses? Ask only if the review stage is on. One reviewer call per lens at the reviewer model, so this scales the stage's cost roughly linearly. | agents.code_review_lenses | omit → all four (correctness, plan-alignment, config-env-docs, security) · ["correctness", "security"] (half cost; good default for app code) · ["correctness"] (quarter cost; highest-yield single lens) |
| How do you bring this app up for manual verification? Confirm or correct what was detected. | stack.up / stack.rebuild / stack.url | the detected compose/dev commands · corrected by the user · omit (skills then say which key is missing instead of guessing) |
What should git ignore? Not a config key — it decides what Step 5 appends to .gitignore. Multi-select over the toolkit files that are a genuine team choice (the machine-state entries in Step 5 are always ignored and never asked). State the trade per option: ignored = personal, no merge conflicts; tracked = shared with the team, survives a git reset --hard. For .claude/project.json also say that tracking it makes the opt-in stop gate stand down — it never runs a test command from a committed config unless BRAINSTORM_TRUST_STOP_GATE=1. Then ask for any other paths this repo wants ignored (local env files, scratch or output dirs the scan saw untracked) — and never propose a path that is already tracked without saying ignoring it won't untrack it. | .gitignore | all three checked (default): .claude/project.json, TASKS.md, plans/ · uncheck any the team shares · plus free-text extra paths |
| Should commit messages this toolkit writes or suggests credit Claude as a co-author? Not a cost lever — a disclosure choice, so it is off unless the user says yes. Mention that it also lands in any PR body a future step authors, and that some DCO / commit-lint setups reject unrecognized trailers. | coauthor_trailer | false (default — no trailer) · true (append Co-Authored-By: Claude <noreply@anthropic.com>) |
When should Claude Code auto-compact the conversation? Claude only — not a project.json key; it goes in .claude/settings.json, shared by everyone on the repo. A larger window keeps more working context before a compaction but every turn past the default costs more; on a 1M-context model 600000 suits long /sdlc runs. Mention that each person can still override it for themselves with /autocompact <tokens> (user settings). | autoCompactWindow (.claude/settings.json) | omit (default — Claude Code decides) · 600000 (1M-context models; fewer compactions mid-run) · a custom token count |
Explain the interaction once, because it surprises people: models.cap is a ceiling, not a
target — it can only lower a role's tier, never raise it, so a cap of sonnet silently
turns an explicit models.sanity: "opus" into Sonnet. Every other models.* key exists with its
default and is edited in project.json — see .claude/project.json.example and
skills/sdlc/templates/models.md; do not walk them here. Close with the open catch-all: "Anything
else to add, remove, or correct?"
Step 4 — Write AGENTS.md (architecture summary)
If AGENTS.md is missing (or the user asks to regenerate it), produce one by filling in the placeholders in templates/AGENTS.md.template. Derive each section from the scan:
- Project summary — 1–3 sentences. Infer from
README.md, package name, top-level structure. - Tech stack — bullet list from detected stack (language, framework, DB, test/build tools).
- Architecture at a glance — 5–10 bullets covering: top-level module layout, how requests flow (entry point → router → service → data), key cross-module dependencies. Do NOT invent what you can't see.
- Build / test / run — concrete commands, preferring what's already in
README.mdorpackage.jsonscripts. If unsure, say "TODO: confirm with maintainer" inline.
Keep each section terse. AGENTS.md is read by every agent, every session — brevity beats completeness.
Step 5 — Write the files
After the user confirms or adjusts — or immediately, with the recorded defaults, when Step 3 was skipped as non-interactive. This step always runs. Reaching Step 5 and writing nothing is a failed onboarding, not a cautious one:
- Write
.claude/project.json(create.claude/if missing). - Write
AGENTS.mdat repo root. IfCLAUDE.mdis also missing, copy it — never symlink, matchingsetup.sh(WSL/NTFS and Windows git both struggle with symlinks). Keep the two in sync. - If no
TASKS.md, copytemplates/TASKS.md.templateto repo root. - If no
GOTCHAS.mdat repo root, create one fromexamples/GOTCHAS.md.example. Update
.gitignore. The toolkit's working files are local working files — they churn every run, they are personal to whoever is driving, and they are a merge-conflict magnet in any repo with more than one contributor. Write only what Step 3's.gitignoreanswer chose — the user decides what stays out of git; don't append a fixed list over their answer. Create.gitignoreif missing; append under a# brainstorm-toolkitcomment; don't duplicate lines that already exist. The machine-state lines are always written (pure run state, never useful in history); the rest only if selected, then any extra paths the user named:# brainstorm-toolkit — local working state, not shared contract .claude/pipeline/ .claude/.next-action .claude/.auto-continue-hops .claude/.stop-gate-hops ACTION_ITEMS.md .claude/project.json # if selected TASKS.md # if selected plans/ # if selectedWrite the entries without the
# if selectedannotations.Keep tracked:
.claude/project.json.example(the bootstrap template),.claude/settings.json(hook wiring the team does share),AGENTS.md,GOTCHAS.md, and any committed agent/skill definitions.Auto-compact window (Step 3, Claude only): when the user chose a value, merge
"autoCompactWindow": <tokens>into.claude/settings.json(create it if missing; keep every existing key, never overwrite the file). Omitted → leave the file untouched.
Step 5.5 — Offer secret-blocking PreToolUse hook (Claude only)
After the project.json bootstrap, ask the user:
"Enable secret-blocking PreToolUse hook? (recommended for production repos) When enabled, Claude Code blocks Write/Edit if the about-to-be-written content matches a known secret shape (AWS keys, GitHub tokens, JWTs, private-key blocks). Default: off. (Copilot consumers: this hook is Claude-only — no effect for you.)"
- On no: leave both
pipeline.poka_yokeand.claude/settings.jsonunchanged. Note in the report that the user declined. - On yes:
- Set
pipeline.poka_yoke: truein.claude/project.json. - Write the PreToolUse hook entry into
.claude/settings.json(create the file if missing; merge into existinghooks.PreToolUselist rather than overwriting). The schema is documented intemplates/AGENTS.md.templateunder "Hooks (Claude-only)" — matcher is"Write|Edit",commandruns the secret-pattern scanner, non-zero exit blocks the tool call. - If a
scripts/hooks/secret-scan.shis not already present in the repo, stub one out (or document where the user should drop it) using the pattern set inexamples/GOTCHAS.md.example"Secret Patterns (recommended for hooks)".
- Set
Step 6 — Report
Report what was written and suggest next steps:
- "Try
/test-checkto see which steps run." - "Start a new feature with
/brainstorm [topic]or/task <description>." - "See current work queue with
/sdlc-status."
What NOT to do
- Do not overwrite an existing
project.jsonwithout explicit confirmation. If one already exists, read it, show the user what's there vs. what you'd propose, and ask. - Do not infer commands that haven't been verified. If you see
pytest.inibut no actual tests pass, still propose the pytest command but flag it. - Do not generate evals. That's the pipeline's Stage 3. This skill only sets up the config needed for evals to work if the user chooses to use them.
- Do not stop at a proposal. Scanning, printing a config and not writing it is this
skill's most likely failure, because the analysis looks like the deliverable. It
isn't — on a from-scratch repo the written files are. With nobody to confirm, assume
the defaults and write (Step 3). The one exception stays the first rule above: an
existing
project.jsonstill needs explicit confirmation to overwrite.
Detection heuristics reference
| Signal | Implies |
package.json with "test" script | test.unit or test.frontend = npm test (or pnpm/yarn equivalent) |
pyproject.toml with [tool.pytest] | test.unit = pytest |
playwright.config.* at root | test.e2e = npx playwright test |
docker-compose.yml | logs.command = docker compose logs {service} --tail={tail}, logs.services from compose services; stack.up = docker compose up -d --build, stack.rebuild = docker compose up -d --build --force-recreate; stack.url from the first published host port |
| Kubernetes manifests | logs.command = kubectl logs deploy/{service} --tail={tail}; leave stack.* unset — a cluster is not a local up/down |
package.json with a dev/start script and no compose file | stack.up = that script (npm run dev); no stack.rebuild unless a build step is separate |
go.mod | test.unit = go test ./... |
Cargo.toml | test.unit = cargo test |
Top-level dirs like api/, web/, worker/ | modules list |
.git/HEAD or origin default | main_branch |
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.

