bootstrap-project
Skill6 starsChanged 3 months agoMITView on GitHub
Bootstrap a fresh or existing repo with nyann. TRIGGER when the user says "set up this project", "initialize git workflow", "bootstrap this repo", "scaffold this project", "ngyamm this repo", "use my <name> profile" / "apply the nextjs-prototype profile" (profile mode). ALSO trigger on "standard setup" / "usual stack" / "the usual setup" / "install all the standard hooks" / "give this repo the usual setup" / "make this repo standard" / "install nyann" — these read as opinionated bulk setup, not narrow edits, even though they sound small. Also trigger on any phrasing that mentions wiring up git hooks + branching + conventions + docs as a single opinionated setup. DO NOT trigger on narrow requests like "add a lint hook" or "update CLAUDE.md" — those are edits, not bootstraps. DO NOT trigger on "audit this project" / "fix what's drifted" / "bring into compliance" — those are retrofit. DO NOT trigger on "check this project's health" / "is this healthy" — those are doctor. When in doubt, run the detection step and ask.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- holgerleichsenring/specification-first-agentic-developmenttheir own version, first seen Oct 4, 2026
- jrjsmrtn/project-orchestration-skillstheir own version, first seen Sep 30, 2026
- kohj1018/agentic-dev-harnesstheir own version, first seen Sep 29, 2026
- alfredobs97/flutter_agentic_templatetheir own version, first seen Sep 24, 2026
- hazarsozer/ren-ostheir own version, first seen Sep 4, 2026
- farmisen/skillstheir own version, first seen Aug 29, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- jrjsmrtn/project-orchestration-skills★ 15same name
- holgerleichsenring/specification-first-agentic-development★ 9same name
- luiseiman/dotforge★ 8same name
- jkm-4314/claude-code-skills★ 4same name
- farmisen/skills★ 2same name
- hazarsozer/ren-os★ 2same name
- kohj1018/agentic-dev-harness★ 2same name
- joseluisamado/bootstrap-project-skill★ 1same name
- Sparvovic/codex-flightdeck★ 1same name
- alfredobs97/flutter_agentic_template★ 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 repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-team-sourceSkill
- check-prereqsSkill
- cleanup-branchesSkill
- commitSkill
- diagnoseSkill
- diff-profileSkill
- doctorSkill
- explain-diffSkill
- explain-stateSkill
- fleet-retrofitSkill
- fleetSkill
- gen-ciSkill
- gen-claudemdSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-profileSkill
- learn-profileSkill
- migrate-profileSkill
- new-branchSkill
- optimize-claudemdSkill
- prSkill
- record-decisionSkill
- releaseSkill
- retrofitSkill
- route-docsSkill
- settingsSkill
- setupSkill
- shipSkill
- suggestSkill
- syncSkill
- sync-team-profilesSkill
- undo-bootstrapSkill
- undoSkill
- wait-for-pr-checksSkill
- watchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. 0 are common, 10 are distinctive, and 25 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Run bin/check-team-staleness.sh before starting.
- Distinctive: line 37
Do not block — let the user decide whether to sync first.
- Very specific: line 41
Run bin/detect-stack.sh --path <target> and capture the JSON to a temp file (e.g.
- Very specific: line 44
If confidence < 0.6, tell the user what you found and ask them to confirm the stack before continuing.
- Very specific: line 47
If is_monorepo is true, note it — bootstrap will auto-resolve per-workspace configs (hooks, lint-staged entries, commit scopes) using …
- Very specific: line 59
No profile named: Run bin/suggest-profile.sh --target <repo> --stack <stack-json-file> to get a ranked list of matching profiles with …
- Distinctive: line 69
If the top suggestion has confidence ≥ 70, propose it directly.
- Distinctive: line 70
If the top suggestion has confidence 40-69, propose it but ask the user to confirm.
- Very specific: line 71
If no suggestion has confidence ≥ 40, fall back to default — warn the user because default means "skip all stack-specific hooks".
- Very specific: line 73
If suggestions is empty (no matches at all), use default with the same warning.
- Very specific: line 75
Multi-stack repos (monorepo with workspace_suggestions): If the workspace_suggestions[] array is non-empty, each workspace has its own …
- Very specific: line 90
If workspace_suggestions[].confidence >= 70, propose it directly.
- Distinctive: line 91
If confidence 40-69, include but flag for confirmation.
- Distinctive: line 92
If confidence < 40 or suggestion is null, workspace inherits the root profile.
- Very specific: line 99
Legacy secondary_suggestions: If workspace_suggestions is empty but secondary_suggestions is non-empty, fall back to the legacy behaviour: …
- Very specific: line 110
If needs_user_confirm is true, show the three top reasoning strings and ask the user to confirm before writing the strategy into the plan.
- Very specific: line 139
If the user picks Yes, pass --archetype <archetype> --use-archetype-scaffolds to bin/route-docs.sh in the next step.
- Very specific: line 141
If No, pass nothing extra (current behaviour).
- Very specific: line 147
When the resolved scaffold set includes glossary (either via the profile's documentation.scaffold_types OR via an enabled archetype map for …
- Very specific: line 166
If Yes, set documentation.glossary.auto_populate: true in the resolved profile snapshot before passing it to bootstrap.sh.
- Very specific: line 175
Run bin/detect-mcp-docs.sh --project-path <target> to discover Obsidian / Notion connectors and local vaults.
- Very specific: line 177
If available[] is empty AND discoverable_vaults[] is empty, run bin/route-docs.sh --profile <path> with no MCP flags — plan is local-only.
- Very specific: line 180
If available[] is empty but discoverable_vaults[] is non-empty, offer the user:
- Very specific: line 184
If user says yes to direct connection: use the vault path directly with --obsidian-vault <vault_name> and proceed with MCP routing flow.
- Distinctive: line 186
If user declines: fall back to local-only routing.
- Very specific: line 187
If any MCP connector is available, load references/mcp-routing.md and walk the user through local vs MCP vs split.
- Very specific: line 198
After routing, scan for existing documentation that doesn't follow nyann conventions:
- Very specific: line 201
If the output array is non-empty, present the proposals to the user via AskUserQuestion:
- Very specific: line 218
If Yes, reorganize all: write the full proposals JSON to a temp file and run bin/reorganize-docs.sh --target <repo> --moves …
- Distinctive: line 223
If Let me pick: show a table of proposals (source → target, confidence, reason) and ask the user which to approve.
- Distinctive: line 226
If No: skip. The scaffolder's idempotency means it won't create docs where non-conforming versions already exist at other paths — but the …
- Distinctive: line 229
After reorganization, any moved files now occupy canonical paths.
- Very specific: line 261
Before invoking preview.sh, run bin/render-plan.sh so merge actions on .gitignore and CLAUDE.md carry a preview_blob field.
- Very specific: line 321
Every step is idempotent. On any failure, bootstrap.sh aborts cleanly with which step failed in its summary.
- Distinctive: line 326
After success, ask *only these three* — in order:
“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
bootstrap-project
You are executing nyann's main bootstrap flow. The goal is to take an empty directory, a fresh repo, or an existing messy repo and bring it up to the conventions in a nyann profile — without silently mutating anything.
Work in phases. Each phase is one or more bash scripts in bin/. Never run a destructive
action outside a preview-confirmed plan. If a phase emits a structured skip record
({"skipped": "...", "reason": "..."}), log it in your final summary and continue with the
remaining phases.
0. Team profile freshness check (quick, non-blocking)
Run bin/check-team-staleness.sh before starting. If it produces
output, show the notification to the user (e.g. "Your team profiles
have upstream changes. Run /nyann:sync-team-profiles to update
before bootstrapping, or continue with the current versions.").
Do not block — let the user decide whether to sync first.
1. Detect
- Run
bin/detect-stack.sh --path <target>and capture the JSON to a temp file (e.g.bin/detect-stack.sh --path <target> > "${TMPDIR:-/tmp}/nyann-stack.json") so step 2 can pass it via--stack. Never proceed without it. - If
confidence < 0.6, tell the user what you found and ask them to confirm the stack before continuing. Show the top two or three reasoning entries so they can see why you chose what you chose. - If
is_monorepois true, note it — bootstrap will auto-resolve per-workspace configs (hooks, lint-staged entries, commit scopes) usingbin/resolve-workspace-configs.sh.
See references/python.md and references/javascript.md for stack-specific notes Claude should
fold into its follow-ups. Only load them when the detected stack matches.
2. Pick a profile
Three branches:
- User named a profile. Load it with
bin/load-profile.sh <name>. If the loader exits 2 (profile not found), list the available profiles it reported and ask the user to pick one. No profile named. Run
bin/suggest-profile.sh --target <repo> --stack <stack-json-file>to get a ranked list of matching profiles with confidence scores. Pass the StackDescriptor JSON captured in step 1 via--stackso the script reuses it instead of re-running detect-stack.sh (which would duplicate the directory walk).Show the user the top suggestion (or top 2-3 if scores are close):
"Detected: TypeScript + Next.js. Suggested profile:
nextjs-prototype(confidence: 90). Use this profile?"Rules:
- If the top suggestion has confidence ≥ 70, propose it directly.
- If the top suggestion has confidence 40-69, propose it but ask the user to confirm.
- If no suggestion has confidence ≥ 40, fall back to
default— warn the user becausedefaultmeans "skip all stack-specific hooks". - If suggestions is empty (no matches at all), use
defaultwith the same warning.
Multi-stack repos (monorepo with workspace_suggestions): If the
workspace_suggestions[]array is non-empty, each workspace has its own best-matching profile. Present per-workspace profile assignments to the user:"This monorepo has multiple stacks. Here are the suggested profiles:
Workspace Stack Suggested profile Confidence apps/web TypeScript + Next.js nextjs-prototype90 apps/api TypeScript + Express node-api85 apps/mobile Dart + Flutter flutter-app92 Accept these assignments?"
Rules for workspace profiles:
- If
workspace_suggestions[].confidence >= 70, propose it directly. - If confidence 40-69, include but flag for confirmation.
- If confidence < 40 or suggestion is null, workspace inherits the root profile.
- User can override any workspace assignment (e.g., "use
react-vitefor apps/web instead"). - Confirmed workspace→profile mappings are written into the root profile's
workspacesfield with"profile": "<name>"entries. This persists the choice for future bootstraps.
Legacy secondary_suggestions: If
workspace_suggestionsis empty butsecondary_suggestionsis non-empty, fall back to the legacy behaviour: mention the secondary stacks as informational.- Audit mode ("check hygiene", "is this healthy"). Invoke the
doctorskill instead. - Retrofit mode ("fix what's drifted", "bring into compliance"). Invoke the
retrofitskill instead — it handles audit + remediation for existing repos.
3. Recommend branching (unless the profile already pins one)
- Pipe the StackDescriptor into
bin/recommend-branch.sh. - If
needs_user_confirmis true, show the three top reasoning strings and ask the user to confirm before writing the strategy into the plan. - Otherwise, feed the recommendation straight into the action plan.
4. Route docs
4a. Archetype prompt (v1.6.0+)
The StackDescriptor from step 1 carries an archetype field
(api-service / cli-tool / library / web-app / mobile-app /
plugin / unknown). When it's anything other than unknown AND
the resolved profile does not already declare
documentation.use_archetype_scaffolds: true, prompt the user via
AskUserQuestion:
{
"questions": [{
"question": "Detected archetype: <archetype>. Enable archetype-aware Project Memory scaffolding?",
"header": "Project Memory",
"options": [
{"label": "Yes (recommended)", "description": "Scaffold api-reference, runbook, deployment, glossary as appropriate for this system."},
{"label": "No", "description": "Use the profile's flat scaffold list (pre-v1.6.0 behaviour)."}
],
"multiSelect": false
}]
}If the user picks Yes, pass --archetype <archetype>
--use-archetype-scaffolds to bin/route-docs.sh in the next step.
If No, pass nothing extra (current behaviour). Skip the prompt
entirely when archetype is unknown or when the profile already
sets use_archetype_scaffolds: true.
4a-2. Glossary auto-population (v1.7.0+)
When the resolved scaffold set includes glossary (either via the
profile's documentation.scaffold_types OR via an enabled archetype
map for library / api-service / others), prompt the user via
AskUserQuestion:
{
"questions": [{
"question": "Auto-populate `docs/glossary.md` with detected exported types from your codebase?",
"header": "Glossary",
"options": [
{"label": "Yes (recommended)", "description": "Seed entries for top-level exported structs/interfaces/classes/types. Idempotent, preserves user content outside markers."},
{"label": "No", "description": "Keep the empty template. You can opt in later via the profile."}
],
"multiSelect": false
}]
}If Yes, set documentation.glossary.auto_populate: true in the
resolved profile snapshot before passing it to bootstrap.sh. The
bootstrap orchestrator reads the flag and forwards
--auto-glossary (plus --glossary-max-terms /
--glossary-languages) to bin/scaffold-docs.sh. Default Yes for
the library and api-service archetypes; default No otherwise.
4b. Run route-docs
- Run
bin/detect-mcp-docs.sh --project-path <target>to discover Obsidian / Notion connectors and local vaults. Capture the JSON. - If
available[]is empty ANDdiscoverable_vaults[]is empty, runbin/route-docs.sh --profile <path>with no MCP flags — plan is local-only. Pass the archetype flags from 4a if the user opted in. - If
available[]is empty butdiscoverable_vaults[]is non-empty, offer the user:"Found Obsidian vault(s) on disk:
<vault_name>(<vault_path>). Would you like to route docs to Obsidian? I can connect directly to the vault, or you can add the Obsidian MCP server for full integration."- If user says yes to direct connection: use the vault path directly with
--obsidian-vault <vault_name>and proceed with MCP routing flow. - If user declines: fall back to local-only routing.
- If user says yes to direct connection: use the vault path directly with
- If any MCP connector is available, load
references/mcp-routing.mdand walk the user through local vs MCP vs split. It covers the questions to ask, how to compose the--routingstring, the connector-target inputs (--obsidian-vault,--obsidian-folder,--notion-parent), and the post-route creation flow (MCP tool calls per non-local target + plan update with returned identifiers). Archetype flags from 4a propagate the same way.
Capture the resulting DocumentationPlan. memory/ stays local by invariant regardless of
any routing choice.
4c. Doc conformance check (v1.9.0+)
After routing, scan for existing documentation that doesn't follow nyann conventions:
- Run
bin/detect-doc-conformance.sh --target <repo> --archetype <archetype>. - If the output array is non-empty, present the proposals to the user via
AskUserQuestion:
{
"questions": [{
"question": "Found existing docs that don't follow nyann conventions. Reorganize them?",
"header": "Doc layout",
"options": [
{"label": "Yes, reorganize all", "description": "Move/rename all detected docs to their canonical paths (uses git mv when tracked)."},
{"label": "Let me pick", "description": "Show the list so I can approve each move individually."},
{"label": "No, leave as-is", "description": "Keep current paths. Scaffolding will skip those categories since files already exist."}
],
"multiSelect": false
}]
}If Yes, reorganize all: write the full proposals JSON to a temp file and run
bin/reorganize-docs.sh --target <repo> --moves <proposals.json> --apply. (Without
--apply, the script previews and exits without mutating; pass --apply once the
user has approved the moves.)
If Let me pick: show a table of proposals (source → target, confidence, reason) and ask the user which to approve. Filter the array to approved-only, then run reorganize-docs.
If No: skip. The scaffolder's idempotency means it won't create docs where non-conforming versions already exist at other paths — but the user keeps their layout.
After reorganization, any moved files now occupy canonical paths. The subsequent scaffold step will detect them as "exists" and skip creation — preserving user content that was moved into place.
5. Build and preview the plan
Compose an ActionPlan JSON from the profile + StackDescriptor + DocumentationPlan + BranchingChoice. The shape:
{
"writes": [{ "path": "...", "action": "create|merge|overwrite", "bytes": 123 }],
"commands": [{ "cmd": "git init", "cwd": "." }],
"remote": []
}Required writes[] entries — include each one the profile/plan opts into; bootstrap.sh will refuse to materialise a file that isn't in this list (preview-before-mutate):
.gitignore— when gitignore templates apply.editorconfig— whenprofile.extras.editorconfig == trueCLAUDE.md— whenprofile.extras.claude_md == true.husky/pre-commit,.husky/commit-msg,commitlint.config.js— for JS/TS hook phase.pre-commit-config.yaml— for Python hook phase.git/hooks/commit-msg,.git/hooks/pre-commit— always for core hooks- Doc files per DocumentationPlan (
docs/architecture.md,docs/prd.md,docs/decisions/ADR-000-…md,docs/research/README.md) — when the profile'sdocumentation.scaffold_typesdeclares them
5a. Pre-render merge previews (v1.7.0+)
Before invoking preview.sh, run bin/render-plan.sh so merge actions
on .gitignore and CLAUDE.md carry a preview_blob field. Preview
diffs against the current file and shows the operator the actual lines
about to be added — no more "234 B merged" surprises.
bin/render-plan.sh \
--plan <plan.json> \
--target <repo> \
--profile <profile.json> \
--doc-plan <doc-plan.json> \
--stack <stack.json> \
--templates-csv "<inferred-from-stack>" \
--output <plan.rendered.json>Determine --templates-csv from the StackDescriptor exactly the way
bootstrap.sh does (jsts / python / go / rust / generic, plus
secondary languages). Skip render-plan only when the plan has zero
merge actions for the two covered paths — render-plan is a no-op in
that case so it's safe to always call.
The rendered plan supersedes the original for both preview and execute.
Pass it as --plan <plan.rendered.json> from this point on.
5b. Preview
Pipe the rendered plan through bin/preview.sh --plan <file> --target <repo>.
Pass --target so the merge-diff renderer resolves .path entries
against the actual repo (not the caller's cwd). Show the stderr
preview to the user. If they respond with skip <path>, re-invoke
with --skip <path> and reshow. If no, stop and exit.
6. Execute
Capture the plan SHA-256 first — bin/preview.sh --plan <file> --emit-sha256 prints just the
hex on stdout. Pass it as --plan-sha256 so bootstrap can recompute and verify the bytes
haven't changed between the user's "yes" and execution. The SHA binding is required;
bootstrap refuses to run without it.
sha=$(bin/preview.sh --plan <confirmed-plan.json> --emit-sha256)
bin/bootstrap.sh --plan <confirmed-plan.json> --plan-sha256 "$sha" \
--target <repo> --profile <path> --doc-plan <path> --stack <path>bootstrap.sh handles:
git initif needed.- Creating base branches per the strategy.
- Writing files in the plan.
- Running install commands (declared in the plan, never inferred).
- Calling
bin/install-hooks.shwith the matching phase flags (--core,--jsts,--python). For monorepos, also passes--workspace-configs(per-workspace lint-staged entries) and--commit-scopes(workspace-derived scopes for commitlint). - Calling
bin/scaffold-docs.shwith the DocumentationPlan. - Calling
bin/gen-claudemd.shwith profile + plan + stack. For monorepos, also passes--workspace-configs(renders Workspaces table) and--extra-scopes(merges workspace scopes into conventions table).
Every step is idempotent. On any failure, bootstrap.sh aborts cleanly with which step failed in its summary; surface that verbatim. Do not retry automatically.
7. Offer the post-bootstrap nudges
After success, ask only these three — in order:
- "Save this as a profile for reuse?" → if yes, ask for a profile name,
then call
bin/learn-profile.sh --target <repo> --name <slug>. Both--targetand--nameare required flags — never pass the name as a positional argument. - "Run
/nyann:doctornow to audit?" → invoke the doctor skill. Pass the bare profile name (e.g.python-cli), not a filesystem path, as--profile. Doctor'sGITHUB PROTECTIONsection will surface whether branch / tag protection is in place; tell the user they can re-run doctor anytime to verify protection state. - "Set up GitHub branch protection?" → invoke
bin/gh-integration.sh(apply mode). For audit-only ("is protection drift on this repo?"), doctor already covers it viabin/gh-integration.sh --check— no separate skill needed.
Output summary
End with a compact report:
- Detected stack + confidence.
- Profile applied (source: user / starter).
- Files created / merged (count only; the plan has the detail).
- Hook phases run, with any skip records.
- Whether CLAUDE.md was under the soft-cap budget.
- Next steps the user can take.
When something goes wrong
- Detection confidence low → ask before writing.
preview.shdeclined → stop, no cleanup needed (nothing was written).- Any bin script exits non-zero during execute → do not proceed; show the failing step's stderr and exit. The user can re-run after fixing.
- A structured skip record is not a failure; include it in the summary but keep going.
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.

