bootstrap-project
Skill8 starsChanged 7 months agoMITView on GitHub
Initializes the Claude Code configuration in a new or existing project using the dotforge template.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- jrjsmrtn/project-orchestration-skillstheir own version, first seen Nov 3, 2026
- zarubinvibe/athenatheir own version, first seen Nov 1, 2026
- holgerleichsenring/specification-first-agentic-developmenttheir own version, first seen Oct 28, 2026
- kohj1018/agentic-dev-harnesstheir own version, first seen Sep 29, 2026
- alfredobs97/flutter_agentic_templatetheir own version, first seen Sep 24, 2026
- hidekitux/skillstheir own version, first seen Sep 8, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- holgerleichsenring/specification-first-agentic-development★ 41same name
- jrjsmrtn/project-orchestration-skills★ 17same name
- jkm-4314/claude-code-skills★ 4same name
- cahenesy/throughline★ 3same name
- farmisen/skills★ 2same name
- hazarsozer/ren-os★ 2same name
- kohj1018/agentic-dev-harness★ 2same name
- zarubinvibe/athena★ 2same name
- alfredobs97/flutter_agentic_template★ 0same name
- hidekitux/skills★ 0same name
1 more not listed
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 repository20 other files it gives its agents.
- .claude/rules/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-projectSkill
- capture-practiceSkill
- diff-projectSkill
- domain-extractSkill
- export-configSkill
- forge-behaviorSkill
- init-projectSkill
- learn-projectSkill
- mcp-addSkill
- plugin-generatorSkill
- reset-projectSkill
- rule-effectivenessSkill
- scout-reposSkill
- session-insightsSkill
- sync-all-reposSkill
- sync-templateSkill
- update-practicesSkill
- watch-upstreamSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 7 are distinctive, and 15 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Check if $ARGUMENTS contains --profile minimal, --profile standard, or --profile full.
- Very specific: line 14
If not specified, use standard as default.
- Very specific: line 37
Use detection rules from $DOTFORGE_DIR/stacks/detect.md.
- Distinctive: line 62
If CLAUDE.md is a symlink to AGENTS.md (openclaw pattern): do NOT write through the link.
- Very specific: line 64
If both exist and CLAUDE.md has no @AGENTS.md line: warn that AGENTS.md is currently ignored and offer to add the import.
- Very specific: line 67
Use $DOTFORGE_DIR/template/CLAUDE.md.tmpl as the base.
- Distinctive: line 82
Multi-stack: If multiple stacks are detected (e.g.: python-fastapi + react-vite-ts + docker-deploy), merge ALL partials.
- Very specific: line 86
Before writing settings.json, validate that the generated JSON is valid:
- Distinctive: line 97
If validation fails, show the exact error and DO NOT write the file.
- Very specific: line 102
If profile is standard or full: copy $DOTFORGE_DIR/template/hooks/lint-on-save.sh
- Very specific: line 105
If profile is full: copy $DOTFORGE_DIR/template/hooks/warn-missing-test.sh
- Very specific: line 109
If a core/ directory exists alongside hooks, copy it too (e.g., hookify needs core/ + hooks/)
- Distinctive: line 110
Ensure Python scripts are executable
- Very specific: line 121
If any detected stack has a domain: field in its rules (e.g., stacks/trading/rules/trading.md):
- Distinctive: line 126
If the user provided domain description (from init Q4 context):
- Very specific: line 127
Create .claude/rules/domain/ directory if not exists
- Distinctive: line 134
If neither condition is met, skip this step entirely — no noise for projects without domain context.
- Very specific: line 178
Create .claude/agent-memory/ directory for agents with memory: project to persist learnings:
- Distinctive: line 184
Create a seed file for each memory-enabled agent so the directory structure is ready:
- Very specific: line 195
If the user does not have detect-claude-changes.sh installed in ~/.claude/settings.json, show:
- Very specific: line 206
Create .claude/.forge-manifest.json with the SHA256 hash of each file created during bootstrap:
- Very specific: line 229
Do NOT include CLAUDE.md or CLAUDE_ERRORS.md (they are in the root, not in .claude/).
“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
Initialize a complete .claude/ in the current project using the dotforge template.
Step 0: Determine profile
Check if $ARGUMENTS contains --profile minimal, --profile standard, or --profile full.
If not specified, use standard as default.
Profiles control what gets installed:
| Component | minimal | standard | full |
| CLAUDE.md | yes | yes | yes |
| settings.json | yes | yes | yes |
| block-destructive hook | yes | yes | yes |
| lint-on-save hook | no | yes | yes |
| session-report hook | no | yes | yes |
| warn-missing-test hook | no | no | yes (strict profile) |
| rules/ (_common + stack) | yes | yes | yes |
| commands/ | no | yes | yes |
| agents/ + orchestration | no | yes | yes |
| agent-memory/ | no | no | yes |
| CLAUDE_ERRORS.md | no | yes | yes (pre-populated) |
| memory.md rule | no | yes | yes |
Save the profile in .claude/settings.local.json under env.FORGE_BOOTSTRAP_PROFILE.
Step 1: Detect stack
Use detection rules from $DOTFORGE_DIR/stacks/detect.md.
Step 2: Confirm with user
Show:
Profile: {{profile}}
Detected stack: {{stacks}}
Will create:
- CLAUDE.md (base template + stack rules)
- .claude/settings.json (base permissions + stack)
- .claude/rules/ (common rules + stack)
- .claude/hooks/ (block-destructive + lint + session-report) [minimal: block-destructive only]
- .claude/commands/ (audit, health) [minimal: skipped]
- .claude/agents/ + orchestration [minimal: skipped]
- CLAUDE_ERRORS.md (empty, for error logging) [minimal: skipped]
Proceed? (yes/no)Adapt the list shown based on the profile (hide components that won't be installed).
Step 3: Generate CLAUDE.md
First, check for an existing AGENTS.md (Claude Code reads it natively since v2.1.277, but only when no CLAUDE.md exists — a new CLAUDE.md would silently hide it):
- If
CLAUDE.mdis a symlink toAGENTS.md(openclaw pattern): do NOT write through the link. TreatAGENTS.mdas the instruction file, write the generated managed sections to the symlink target, and keep the symlink. - If
AGENTS.mdexists andCLAUDE.mddoes not: generateCLAUDE.mdfrom the template with@AGENTS.mdas the first line after the title (replace the<!-- forge:agents-md -->marker). Claude then loads both once;AGENTS.mdstays the shared file for other tools. Mention/importas an alternative if the user prefers a single mergedCLAUDE.md. - If both exist and
CLAUDE.mdhas no@AGENTS.mdline: warn thatAGENTS.mdis currently ignored and offer to add the import. - Otherwise remove the
<!-- forge:agents-md -->marker line.
Use $DOTFORGE_DIR/template/CLAUDE.md.tmpl as the base.
Replace markers:
{{PROJECT_NAME}}→ name of the current directory<!-- forge:agents-md -->→@AGENTS.mdor nothing (see above)<!-- forge:stack -->→ detected technologies<!-- forge:commands -->→ detected build/test commands (package.json scripts, Makefile targets, etc.)
Step 4: Generate settings.json
- Load
$DOTFORGE_DIR/template/settings.json.tmplas the base - For each detected stack, read
$DOTFORGE_DIR/stacks/{stack}/settings.json.partial - Merge: combine the
allowarrays from all partials with the base (union of sets, no duplicates) - Merge: combine the
denyarrays the same way - Write to
.claude/settings.json
Multi-stack: If multiple stacks are detected (e.g.: python-fastapi + react-vite-ts + docker-deploy), merge ALL partials. Order does not matter — it is a union of sets.
Step 4b: Validate JSON
Before writing settings.json, validate that the generated JSON is valid:
python3 -c 'import json; json.load(open(".claude/settings.json"))' 2>&1Or if not yet written, validate the content in memory/string:
echo '<json_content>' | python3 -c 'import json,sys; json.load(sys.stdin)'If validation fails, show the exact error and DO NOT write the file. Fix the JSON before continuing.
Step 5: Copy hooks
- Copy
$DOTFORGE_DIR/template/hooks/block-destructive.sh→.claude/hooks/(ALL profiles) - If profile is
standardorfull: copy$DOTFORGE_DIR/template/hooks/lint-on-save.sh - If profile is
standardorfull: copy$DOTFORGE_DIR/template/hooks/session-report.sh - If profile is
standardorfull: copy$DOTFORGE_DIR/template/hooks/detect-stack-drift.sh - If profile is
full: copy$DOTFORGE_DIR/template/hooks/warn-missing-test.sh chmod +xall copied hooks- For each detected stack, if
$DOTFORGE_DIR/stacks/{stack}/hooks/exists:- Copy the entire hooks directory to
.claude/hooks/{stack}/ - If a
core/directory exists alongside hooks, copy it too (e.g., hookify needs core/ + hooks/) - Ensure Python scripts are executable
- Copy the entire hooks directory to
Step 6: Copy rules
- Copy
$DOTFORGE_DIR/template/rules/_common.md→.claude/rules/ - For each detected stack, copy rules from
$DOTFORGE_DIR/stacks/{stack}/rules/→.claude/rules/
Step 6b: Domain knowledge scaffolding
Only if domain info was provided (via /forge init Q4 or user explicitly requests it during bootstrap).
If any detected stack has a domain: field in its rules (e.g., stacks/trading/rules/trading.md):
- Create
.claude/rules/domain/directory - Copy domain-tagged rules from the stack into
.claude/rules/domain/instead of.claude/rules/ - Show: "Domain stack detected: {{domain}}. Domain rules copied to .claude/rules/domain/"
If the user provided domain description (from init Q4 context):
- Create
.claude/rules/domain/directory if not exists - Generate 1-3 seed domain rule files based on the described concepts:
- Each file: frontmatter with
globs:(domain-specific patterns),domain:tag,last_verified:(today) - Content: key facts, constraints, business rules — concise, imperative, <40 lines each
- File names: kebab-case matching the domain area (e.g.,
jira-api.md,agile-metrics.md)
- Each file: frontmatter with
- Show generated files to user for confirmation before writing
If neither condition is met, skip this step entirely — no noise for projects without domain context.
Important: Domain rules in .claude/rules/domain/ are project-owned. They are NOT tracked in the forge manifest and are NOT updated by /forge sync.
Step 7: Copy commands
Skip if profile is minimal.
Copy $DOTFORGE_DIR/template/commands/ → .claude/commands/
Step 8: Copy agents and orchestration rule
Skip if profile is minimal.
- Copy
$DOTFORGE_DIR/agents/*.md→.claude/agents/ - Copy
$DOTFORGE_DIR/template/rules/agents.md→.claude/rules/agents.md
This gives the project access to the 6 specialized subagents (researcher, architect, implementer, code-reviewer, security-auditor, test-runner) and the orchestration rule that defines when to delegate.
Step 9: Create CLAUDE_ERRORS.md
Skip if profile is minimal.
For full profile: pre-populate with the Type column format and example entry.
For standard profile: create empty template.
# Known errors — {{PROJECT_NAME}}
Evolving log of errors and lessons learned. Consult BEFORE working in areas with prior errors.
Truth hierarchy: source code > CLAUDE.md > CLAUDE_ERRORS.md > auto-memory
## Format
| Date | Area | Type | Error | Root cause | Fix | Derived rule |
|------|------|------|-------|------------|-----|--------------|
Valid types: `syntax`, `logic`, `integration`, `config`, `security`Step 9b: Create agent-memory/
Only for full profile. Standard creates the directory but not the seed files.
Create .claude/agent-memory/ directory for agents with memory: project to persist learnings:
mkdir -p .claude/agent-memoryCreate a seed file for each memory-enabled agent so the directory structure is ready:
for agent in implementer architect code-reviewer security-auditor; do
touch ".claude/agent-memory/${agent}.md"
doneThis enables implementer, architect, code-reviewer, and security-auditor to accumulate project-specific knowledge across sessions.
Step 10: Suggest global hook
If the user does not have detect-claude-changes.sh installed in ~/.claude/settings.json, show:
Tip: For automatic practice capture, install the global hook:
Copy hooks/detect-claude-changes.sh to ~/.claude/hooks/
Add in ~/.claude/settings.json under hooks → Stop
See docs for details.Step 11: Generate manifest
Create .claude/.forge-manifest.json with the SHA256 hash of each file created during bootstrap:
shasum -a 256 <file> | cut -d' ' -f1Format:
{
"dotforge_version": "<version from $DOTFORGE_DIR/VERSION>",
"synced_at": "<current date YYYY-MM-DD>",
"stacks": ["<detected-stack-1>", "<detected-stack-2>"],
"files": {
".claude/settings.json": {"hash": "sha256:<hash>", "source": "template+stacks"},
".claude/rules/_common.md": {"hash": "sha256:<hash>", "source": "template"},
".claude/hooks/block-destructive.sh": {"hash": "sha256:<hash>", "source": "template"},
".claude/hooks/lint-on-save.sh": {"hash": "sha256:<hash>", "source": "template"}
}
}sourceindicates where the file came from:"template","template+stacks"(if merged from base + stacks), or"stacks/<name>".- Include ALL files created in
.claude/(rules, hooks, commands, agents). - Do NOT include CLAUDE.md or CLAUDE_ERRORS.md (they are in the root, not in
.claude/).
Step 12: Report
Show a summary of created files and suggest running /audit-project to verify.
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.

