Init
Project initial setup and tech stack detectionFrom its SKILL.md
npx -y skills add jhlee0409/all-for-claudecode --skill initAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.7 KB, as published. Nobody here has run it
/afc:init — Project Initial Setup
Creates project-local configuration files (
.claude/afc.config.md,.claude/rules/afc-project.md,.claude/afc/project-profile.md). Project-local only — never touches~/.claude/CLAUDE.md. For global routing setup use/afc:setup.
Project State (auto-loaded)
!ls .claude/afc.config.md .claude/rules/afc-project.md .claude/selfish.config.md .claude/.selfish-* 2>/dev/null | head -20 || echo "[no existing afc files]"
Arguments
$ARGUMENTS— (optional) additional context or hints for project analysis
Execution Steps
1. Legacy Migration (v1.x → v2.x)
Detect and migrate selfish-pipeline artifacts in one pass:
.claude/selfish.config.mdexists,afc.config.mddoes not → rename toafc.config.md.claude/.selfish-*files found → rename each to.afc-{x}.claude/selfish/exists,.claude/afc/does not → rename to.claude/afc/git tag -l 'selfish/*'→ rename known patterns toafc/equivalent, delete the rest
Print a single migration summary line. If nothing to migrate, skip silently.
2. Check for Existing Config
If .claude/afc.config.md already exists and this is NOT a migration:
- Ask user: "Config file already exists. Overwrite?"
- If declined: abort
3. Analyze Project Structure
Use $ARGUMENTS as additional context. Detection heuristics are in reference.md — consult it for package manager, framework, architecture, and tool detection tables.
- Read
package.json→ extract CI scripts, detect package manager from lockfile - Detect framework from
package.jsondeps - Detect architecture from directory structure +
tsconfig.jsonpaths - Detect state/styling/testing/linter/DB tools
- Read 2–3 code samples to verify naming patterns
Detection is best-effort. Present results to user for confirmation before writing files.
4. Generate Config File
Write .claude/afc.config.md based on template at ${CLAUDE_SKILL_DIR}/../../templates/afc.config.template.md:
- CI Commands — YAML block with
ci,gate,testkeys (scripts parse this; format is fixed) - Architecture — detected pattern, layers, import rules, path aliases (free-form prose)
- Code Style — language, strictness, naming, lint rules (free-form prose)
- Project Context — framework, state, styling, testing, DB, risks (free-form prose)
No YAML blocks except CI Commands. Use TODO: Adjust for your project for unresolved items.
4.5. Generate Project Rules File
Write .claude/rules/afc-project.md (auto-loaded by Claude Code for all sub-agents):
- Create
.claude/rules/if not present - If file exists with
<!-- afc:auto-generatedmarker → overwrite silently - If file exists without marker → ask user before overwriting
- Use template
${CLAUDE_SKILL_DIR}/../../templates/afc-project.template.md - First line:
<!-- afc:auto-generated — do not edit manually; regenerate with /afc:init --> - Max 30 lines (excluding marker) — bullets only, no explanations
4.6. Generate Project Profile
Write .claude/afc/project-profile.md for expert consultation agents:
- Create
.claude/afc/if not present - If file already exists → skip (do not overwrite)
- Fill Stack/Architecture/Domain from Step 3 analysis; leave Team/Scale/Constraints as placeholders
- Use template
${CLAUDE_SKILL_DIR}/../../templates/project-profile.template.md
4.7. Update CLAUDE.md with Compact Instructions
Append a # Compact instructions section to the project's CLAUDE.md (create if not present):
- Check if
CLAUDE.mdalready contains# Compact instructions→ if yes, skip silently - Append the following block to
CLAUDE.md:
# Compact instructions
When compacting, always preserve:
- Active pipeline feature name and current phase
- File Change Map from plan.md (file paths + task assignments)
- All unresolved ESCALATE items with their options
- context.md contents (spec summary + plan decisions + advisor results)
- Changed files list and CI/test pass/fail status
- Current task progress (completed/total)
This ensures auto-compact retains critical pipeline state.
4.8. Recommend Context Window Configuration
If the project CLAUDE.md does not already contain auto-compact configuration guidance, append:
# Context window configuration (recommended)
# Add to .claude/settings.json or .claude/settings.local.json:
# { "env": { "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "500000" } }
# This treats the window as 500k for compaction — the remaining 500k is reserve headroom.
# Combined with the compact instructions above, this gives you full control over when compaction happens.
Note: This is informational only. Do NOT modify settings.json — just add as a comment in CLAUDE.md for user awareness.
5. Final Output
all-for-claudecode project init complete
├─ Config: .claude/afc.config.md
├─ Rules: .claude/rules/afc-project.md (auto-loaded)
├─ Profile: .claude/afc/project-profile.md
├─ Compact instructions: CLAUDE.md updated
├─ Framework: {detected framework}
├─ Architecture: {detected style}
├─ Package Manager: {detected manager}
├─ Auto-inferred: {inferred item count}
├─ TODO: {items requiring manual review}
└─ Next step: /afc:setup (global routing) or /afc:auto (start building)
Notes
- Idempotent: existing auto-generated rules are silently regenerated; config prompts for confirmation.
- Inference limits: Auto-detection is best-effort — review and adjust after generation.