agentleFS
luiseimanluiseiman/dotforge/skills/init-project/SKILL.md

init-project

Skill8 starsChanged 7 months agoMITView on GitHub

Quick-start Claude Code configuration. Auto-detects stack, asks 4 questions to understand the project, generates complete config.

  • Reads credentials

49 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware and 10 more.

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.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. 0 are common, 13 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    If AGENTS.md exists (with or without a CLAUDE.md), say so before the questions: bootstrap will keep it and generate CLAUDE.md with an …

    line 21
  2. Distinctive:

    Use the appropriate version based on detected language.

    line 106
  3. Distinctive:

    STOP HERE. Wait for the user's response before proceeding.

    line 108
  4. Distinctive:

    If the user answers in a single message covering all 4, parse accordingly.

    line 110
  5. Distinctive:

    If the user says "skip", proceed with auto-detected info only.

    line 111
  6. Very specific:

    Run /bootstrap-project internally with:

    line 117
  7. Very specific:

    If the user provided build/test commands in their answers, also update the ## Build & Test section above the forge:custom marker.

    line 147
  8. Very specific:

    If the user mentioned specific services, external APIs, or sensitive areas in question 2, add relevant deny patterns to settings.json.

    line 151
  9. Distinctive:

    If the user answered question 4 with domain/role info:

    line 158
  10. Distinctive:

    Keep each file under 40 lines — concise, imperative, no filler

    line 164
  11. Distinctive:

    If the user skipped question 4, skip this entirely.

    line 167
  12. Distinctive:

    When triggered, ask ONE additional question in the detected language:

    line 173
  13. Distinctive:

    If answered (not "none"):

    line 182
  14. Very specific:

    Create .claude/rules/domain/infra.md with frontmatter:

    line 184
  15. Very specific:

    If the ~/.ssh/config snippet pasted is not already in the user's ~/.ssh/config, show it and offer to append it (do NOT write ~/.ssh/config …

    line 198
  16. Very specific:

    NEVER store private key content — only the path referenced via IdentityFile

    line 199
  17. Distinctive:

    If answered "none" or no VPS heuristic matched, skip this section entirely.

    line 201
  18. Distinctive:

    Ask exactly 4 questions, together, not sequentially

    line 228
  19. Distinctive:

    If user skips questions, proceed with auto-detected info — never block on missing answers

    line 229
  20. Distinctive:

    Keep the output concise — no walls of text

    line 230
  21. Very specific:

    If bootstrap-project fails, show error and suggest /forge bootstrap for full interactive version

    line 232

“Common” is measured: kept by at least 6 in 10 of the 42 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Init Project

MANDATORY FLOW: detect stack → ask 4 questions → WAIT for answers → generate config.

You MUST ask the 4 questions in Step 4 and WAIT for the user to answer BEFORE generating any files. Do NOT skip the questions. Do NOT generate config before receiving answers.

Step 1: Check if already initialized

If .claude/settings.json exists:

Already initialized. Use /forge sync to update or /forge audit to check score.

Exit without changes.

If AGENTS.md exists (with or without a CLAUDE.md), say so before the questions: bootstrap will keep it and generate CLAUDE.md with an @AGENTS.md import (or write to the symlink target) instead of hiding it — see /bootstrap-project Step 3.

Step 2: Detect stacks

Scan project files silently using $DOTFORGE_DIR/stacks/detect.md as reference:

python-fastapi: pyproject.toml, requirements.txt with fastapi
react-vite-ts:  package.json with react + vite
swift-swiftui:  Package.swift, *.xcodeproj
node-express:   package.json with express/fastify (no react)
go-api:         go.mod
java-spring:    pom.xml or build.gradle with spring
supabase:       supabase/ dir or supabase in deps
docker-deploy:  Dockerfile or docker-compose*
gcp-cloud-run:  app.yaml or cloudbuild.yaml
aws-deploy:     cdk.json or template.yaml
redis:          redis in deps
data-analysis:  *.ipynb prominent
devcontainer:   .devcontainer/

Also scan existing files for additional context:

  • README.md → project description
  • existing test files → testing patterns
  • CI config (.github/workflows, Makefile) → build/test commands

Step 3: Detect user language and ask 4 questions

Detect language: check previous messages → global CLAUDE.md → system locale → default English.

OVERRIDE RULE: For /forge init, ALWAYS present questions in the detected language, even if global CLAUDE.md says "communicate in Spanish/English/etc." The questions are part of the tool's UI, not a conversation.

Present all 4 questions together in one message. Then STOP and WAIT for the user's response. Do NOT proceed to Step 5 until the user answers.

English version:

═══ FORGE INIT ═══
Stack detected: {stacks or "none — generic config"}

4 quick questions to generate a complete config:

1. What does it do and what does it NOT do?
   → One sentence: the problem it solves, and explicit limits of v0.1.
   Example: "REST API for real-time quotes. No auth, no frontend, no historical data yet."

2. Built with what?
   → Stack, language, DB, external services, where it runs.
   Example: "Python 3.12, FastAPI, Supabase, deployed on GCP Cloud Run."

3. How do you work?
   → Solo or team, spec-first or prototype-first, testing level from day one.
   Example: "Solo, prototype-first, tests only for critical paths."

4. What domain and role?
   → What expertise does Claude need? What business concepts are critical?
   Example: "Expert in Jira API v3, agile metrics, dashboard generation.
   Key concepts: velocity, cycle time, sprint burndown, JQL."

Spanish version:

═══ FORGE INIT ═══
Stack detected: {stacks or "none — generic config"}

4 quick questions to generate a complete config:

1. What does it do and what does it NOT do?
   → One sentence: the problem it solves, and the explicit limits of v0.1.
   Example: "Real-time quotes REST API. No auth, no frontend, no historical data yet."

2. Built with what?
   → Stack, language, DB, external services, where it runs.
   Example: "Python 3.12, FastAPI, Supabase, deploy on GCP Cloud Run."

3. How do you work?
   → Solo or team, spec-first or prototype-first, testing level from day one.
   Example: "Solo, prototype-first, tests only for critical paths."

4. What domain and role?
   → What expertise does Claude need? What business concepts are critical?
   Example: "Expert in Jira API v3, agile metrics, dashboard generation.
   Key concepts: velocity, cycle time, sprint burndown, JQL."

Use the appropriate version based on detected language. For other languages, translate the questions following the same structure.

STOP HERE. Wait for the user's response before proceeding.

If the user answers in a single message covering all 4, parse accordingly. If the user says "skip", proceed with auto-detected info only.

Important: Generate CLAUDE.md content in English (Claude-consumed content must be in English per project conventions). The user's answers are incorporated as-is regardless of their language.

Step 5: Generate config

Run /bootstrap-project internally with:

  • Profile: standard
  • Stacks: auto-detected
  • No confirmation prompt

Then enrich the generated CLAUDE.md with the user's answers:

CLAUDE.md enrichment

Insert the user's answers into the <!-- forge:custom --> section of CLAUDE.md:

<!-- forge:custom -->

## What this project does
{answer to question 1 — what it does AND what it doesn't do}

## Stack & infrastructure
{answer to question 2 — expanded with detected stacks}

## Working style
{answer to question 3 — solo/team, approach, testing expectations}

## Role
{Generated from answer to question 4 — Claude's role and expertise for this project}

## Domain
{Generated from answer to question 4 — key domain concepts, business rules, reference data}

If the user provided build/test commands in their answers, also update the ## Build & Test section above the forge:custom marker.

Deny list enrichment

If the user mentioned specific services, external APIs, or sensitive areas in question 2, add relevant deny patterns to settings.json. Examples:

  • Mentioned Supabase → ensure Read(**/.env) covers SUPABASE_* vars
  • Mentioned external API → add API key env var patterns
  • Mentioned "no auth yet" → no auth-related deny needed

Domain rules scaffolding

If the user answered question 4 with domain/role info:

  1. Create .claude/rules/domain/ directory
  2. Based on the domain concepts mentioned, generate 1-3 domain rule files:
    • Each file covers one domain area (e.g., jira-api.md, agile-metrics.md)
    • Each file has frontmatter: globs (specific to domain keywords), description, domain tag, last_verified
    • Content: key facts, constraints, and gotchas Claude needs to know about that domain
    • Keep each file under 40 lines — concise, imperative, no filler
  3. Show the generated files to the user for review before writing

If the user skipped question 4, skip this entirely.

SSH/VPS scaffolding (runs whenever question 2 mentions a VPS, self-hosted server, SSH, or named host)

Heuristic for "VPS mentioned": answer 2 contains any of ssh, vps, oracle, hetzner, digitalocean, bare metal, self-hosted, ubuntu server, droplet, a hostname, or a bare IP. Also trigger if ~/.ssh/config has a Host alias whose name resembles the project name.

When triggered, ask ONE additional question in the detected language:

5. SSH/VPS connection? (optional)
   → Paste the relevant lines from `cat ~/.ssh/config`, OR answer
     "<alias> <user> <host> <key> <app_dir>".
     Say "none" if the project does not deploy by SSH.

If answered (not "none"):

  1. Install the vps-ssh stack (add its rules + merge its settings.json.partial)
  2. Create .claude/rules/domain/infra.md with frontmatter:
    ---
    globs: "**/deploy*.sh,**/Makefile,**/scripts/*.sh"
    description: "Remote host, deploy flow, and ops for this project"
    domain: infra
    last_verified: <today>
    ---
  3. Body sections (fill with user-provided values, leave placeholders as TBD if unknown):
    • ## Host — alias, User, HostName, IdentityFile (path only, never key content), port
    • ## App — remote app dir, service name (systemd/docker/pm2), runtime user
    • ## Deploy — exact command(s) from local → remote, rollback command
    • ## Observability — logs command, health-check URL or command
  4. If the ~/.ssh/config snippet pasted is not already in the user's ~/.ssh/config, show it and offer to append it (do NOT write ~/.ssh/config without explicit confirmation)
  5. NEVER store private key content — only the path referenced via IdentityFile

If answered "none" or no VPS heuristic matched, skip this section entirely.

Step 6: Output

Show a concise summary:

═══ FORGE INIT — DONE ═══
Project:  {name}
Stacks:   {detected stacks}
Config:   dotforge v2.3.0 standard

Generated:
  CLAUDE.md          → project context (personalized)
  .claude/settings.json → permissions + hooks
  .claude/rules/     → {N} rules
  .claude/hooks/     → {N} hooks
  .claude/commands/  → {N} commands
  .claude/agent-memory/ → persistent memory
  CLAUDE_ERRORS.md   → error log
  .forge-manifest.json → version tracking

Score: {X}/10 (run /forge audit for details)

Constraints

  • Ask exactly 4 questions, together, not sequentially
  • If user skips questions, proceed with auto-detected info — never block on missing answers
  • Keep the output concise — no walls of text
  • The user's answers go in <!-- forge:custom --> section (protected from future syncs)
  • If bootstrap-project fails, show error and suggest /forge bootstrap for full interactive version

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.