agentleFS
derjochenmeyerderjochenmeyer/claude-code-craft/skills/craft-project-setup/SKILL.md

craft-project-setup

Skill2 starsChanged 7 months agoMITView on GitHub

Set up a new project with complete Claude Code infrastructure, or enhance an existing project with missing pieces. Detects foreign structures and hook issues before touching anything.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    Fresh mode: No CLAUDE.md and no .craft/ directory exist.

    line 16
  2. Distinctive:

    Before doing anything, verify templates are available:

    line 26
  3. Very specific:

    All template reads go through $TEMPLATES_DIR/<filename>.

    line 36
  4. Distinctive:

    All paths are relative to the current working directory.

    line 77
  5. Very specific:

    Read $TEMPLATES_DIR/stack-rules.md.

    line 98
  6. Very specific:

    When CLAUDE.md or .craft/ already exists, skip Phase 1 entirely.

    line 112
  7. Very specific:

    Stop hook using echo without JSON — invalid, causes "Invalid input" errors

    line 124
  8. Very specific:

    Stop hook using hookSpecificOutput.additionalContext — wrong schema for Stop hooks

    line 125
  9. Very specific:

    Check each file listed in Phase 2.

    line 157
  10. Distinctive:

    Never overwrite an existing file.

    line 159
  11. Distinctive:

    After creating all missing files, report:

    line 161
  12. Distinctive:

    No GitHub repository creation

    line 213
  13. Distinctive:

    No secrets or SSH key setup

    line 214

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

craft-project-setup

Orchestrate fresh setup or enhance-mode. Reads templates from ~/.claude/craft-templates/, substitutes placeholders, writes to the current project.

IMPORTANT: Never overwrite existing files. Enhance-mode is strictly additive.

Two modes (auto-detected)

Fresh mode: No CLAUDE.md and no .craft/ directory exist. Create everything from scratch.

If this is an existing codebase (has source files), suggest running /init first. /init analyses the codebase and generates a starter CLAUDE.md automatically. Then re-run /craft-project-setup — it will detect the file and switch to Enhance mode.

Enhance mode: CLAUDE.md or .craft/ already exists. Show what exists, show what is missing, ask before adding anything. Never overwrite. Never remove.


Template location

Before doing anything, verify templates are available:

TEMPLATES_DIR="$HOME/.claude/craft-templates"
if [[ ! -d "$TEMPLATES_DIR" ]]; then
  echo "craft-templates not found at $TEMPLATES_DIR — reinstall craft via install.sh"
  exit 1
fi

All template reads go through $TEMPLATES_DIR/<filename>. Placeholders use [UPPERCASE_WITH_UNDERSCORES] and are substituted based on Phase 1 answers.


Phase 1: Questions (Fresh mode only, ask one at a time, wait for each answer)

Q1: "What is this project?" (1-sentence description)

Q2: "Project type? A) Software project (code will be written) B) Project management (docs, planning, coordination) C) Hybrid (code + substantial documentation)"

Q3 (only if A or C): "Tech stack? (multiple ok, or 'not decided yet')

  1. Shopify Theme (Liquid)
  2. Shopify App (React + TypeScript + Prisma)
  3. Next.js / React (TypeScript)
  4. Astro (TypeScript, SSG)
  5. PHP / Drupal
  6. PHP custom / Composer
  7. Python
  8. WordPress
  9. Static HTML/CSS/JS
  10. Node.js / TypeScript (other)
  11. Other (describe)"

Q4: "Project context? (client name, team, personal, open source -- optional, press Enter to skip)"

Q5: "What is the goal? What should be better after this project? (2-4 sentences)"

Q6 (only if A or C): "Deploy target?

  • Hetzner / VPS (SSH) · Vercel / Netlify · Fly.io · Shopify (no own server) · Local only · Not decided yet"

Q7: "Any first known tasks for the backlog? (list them, or press Enter to skip)"

Q8: "What language should project files be in? (Default: English -- or type e.g. German, French, Spanish)"


Phase 2: Create files (Fresh mode)

All paths are relative to the current working directory. Generate content in the language from Q8 (default English).

For each file below: read the template, substitute placeholders, write to destination.

DestinationTemplatePlaceholders to substitute
CLAUDE.mdCLAUDE.md.template[PROJECT TITLE], [GOAL], [CONTEXT], [STACK_TABLE], [DEPLOY]
.claude/settings.jsonsettings-software.json (type A or C) or settings-pm.json (type B)none
.craft/QUALITY.mdQUALITY.mdnone — copy as-is
.craft/memory/MEMORY_INDEX.mdMEMORY_INDEX.md.template[PROJECT NAME]
.craft/memory/learned-rules.mdlearned-rules.md.template[PROJECT NAME]
.craft/PROJECT_STATE.mdPROJECT_STATE.md.template[PROJECT TITLE], [DATE], [GOAL], [STACK], [DEPLOY]
.craft/BACKLOG.mdBACKLOG.md.template[PROJECT TITLE], [TASKS] (from Q7, one bullet per line, or _not yet defined_)
.craft/HANDOVER.mdHANDOVER.md.template[PROJECT TITLE], [DATE], [FIRST_TASK]
.craft/DECISIONS.mdDECISIONS.md.template[PROJECT TITLE], [DATE]
.craft/rules/coding.mdcoding.md.template (type A or C)[PROJECT TITLE], [STACK_RULES] (see below)
.craft/rules/workflow.mdworkflow.md.template (type B or C)[PROJECT TITLE]
.gitignoregitignore-baseappend stack additions (see below)

Stack-specific rules for .craft/rules/coding.md

Read $TEMPLATES_DIR/stack-rules.md. Find the section matching Q3's answer (e.g. ## Next.js / React (TypeScript)). Append that section's body to .craft/rules/coding.md in place of [STACK_RULES]. If no stack was chosen, write _to be defined_.

Stack-specific additions for .gitignore

Append based on Q3:

  • Node.js / Next.js / Shopify App → node_modules/, .next/, .vercel/, dist/, build/
  • Python → __pycache__/, *.pyc, venv/, .venv/
  • PHP / Drupal → vendor/, web/sites/default/settings.php
  • Shopify Theme → *.bak, node_modules/

Phase 3: Enhance mode behavior

When CLAUDE.md or .craft/ already exists, skip Phase 1 entirely.

Step 0: Conflict scan (runs before anything else)

Scan for two things: unexpected files at root level, and hook issues in .claude/settings.json.

Unexpected files — files craft does not create, at project root (not inside .craft/):

  • PROFILE.json · TASKS.md · LESSONS.md · sessions.jsonl · memory/ dir · .memory/ dir

Do NOT guess where these came from. Report what exists, nothing more. Exception: if three or more are present together, note it as a possibility (not certainty) that they may belong to the same external system. Still do not name a specific tool unless there is a clear in-file marker.

Hook issues in .claude/settings.json (if it exists):

  • Stop hook using echo without JSON — invalid, causes "Invalid input" errors
  • Stop hook using hookSpecificOutput.additionalContext — wrong schema for Stop hooks
  • Any hook command using python3 — fragile, fails silently if python3 is unavailable

If nothing unexpected and no hook issues: proceed to "One-shot" below immediately.

If anything is found: stop and report:

Unexpected files found in: [PROJECT NAME]

These files are not part of craft and their purpose is unknown:
  [list]

Hook issues in .claude/settings.json:
  [list]

How would you like to proceed?

  A) Add craft alongside — unexpected files left untouched, hooks not fixed.
  B) Fix hooks only — repair schema errors, leave everything else.
  C) Add craft and fix hooks — create missing craft files, repair hooks.
  D) Stop — no changes. Resolve manually first, then re-run.

Wait for answer.

  • A: Proceed to "One-shot". Skip .claude/settings.json.
  • B: Fix only the hook issues using settings-software.json as reference. Nothing else.
  • C: Proceed to "One-shot". Also fix hooks if present.
  • D: Stop.

One-shot: scan, create, report

Check each file listed in Phase 2. For each that is missing: read the template, substitute derivable placeholders (project name from CLAUDE.md title or directory name, date from date +%Y-%m-%d, everything else left as placeholder for later editing), and write.

Never overwrite an existing file.

After creating all missing files, report:

Enhanced: [PROJECT NAME] (craft-project-setup v1.5.2)

Created:
  [list]

Already existed (not modified):
  [list]

IMPORTANT: .craft/ is for craft management only. Project work data
(analyses, research, outputs, inventories) goes in the project root
or in visible subfolders, never inside .craft/.

Phase 4: Confirmation (Fresh mode)

Setup complete: [PROJECT NAME] (craft-project-setup v1.5.2)

Created:
  CLAUDE.md
  .claude/settings.json ([Software|PM] profile)
  .craft/QUALITY.md
  .craft/memory/ (MEMORY_INDEX.md + learned-rules.md)
  .craft/ (STATE + BACKLOG + HANDOVER + DECISIONS + rules/)
  .gitignore

IMPORTANT: .craft/ is for craft management only (STATE, BACKLOG, memory, etc.).
Project work data — analyses, research, outputs, inventories — goes in the
project root or in visible subfolders (inventory/, output/, analysis/),
never inside .craft/. .craft/ is hidden on macOS Finder; a user looking
there sees nothing.

Note: settings.json grants Write(*) and Edit(*) globally.
Restrict to Write(./) and Edit(./) if you prefer project-scoped access.

Next steps:
  1. git init (if not already a repo)
  2. Start your first task from the backlog
  3. Run /craft-project-status anytime to check progress

What this skill does NOT do

  • No automatic git init
  • No package.json / composer.json / requirements.txt
  • No GitHub repository creation
  • No secrets or SSH key setup

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.