| name | init-project |
| description | Analyze a repository and scaffold its project-level Claude configuration (CLAUDE.md, .claude/ agents/skills/settings, .claude/memory/, and .mcp.json) tailored to the detected stack (or the user's intent for a new project), layered on top of the global config without contradicting it. Invoke manually with /init-project. Named to avoid the built-in /init. |
| disable-model-invocation | true |
/init-project
Set up (or complete) a project's Claude configuration. Everything generated layers on top of
the GLOBAL config and must never contradict it. All output is committed for the team, except
.claude/settings.local.json.
This skill is a router. Do Step 0 and Step 1, then open the ONE doc for the detected state and
follow it. Each doc is self-contained (it repeats what it needs) so you don't have to hold all
four flows in your head at once.
Step 0 — Read the global config first (non-negotiable)
Read ~/.claude/CLAUDE.md, ~/.claude/skills/update-config/docs/strategy.md, and the list of
global agents in ~/.claude/agents/. You will NOT redefine any of these — only add
stack-specific things the global set doesn't cover.
Step 1 — Determine git host, then classify state
1a — Git host (or ask)
Run git remote -v. If a remote exists, derive the host (GitLab → glab; GitHub → gh). If
there is NO remote, ask the user (GitHub vs GitLab) with AskUserQuestion. See
docs/git-host.md for the full rule and the identity convention. Never read or echo tokens
from ~/.gitconfig-gitlab.
1b — Classify into ONE state
Check config presence first, then code presence:
- State 0 — Empty / scratch: no meaningful code yet (empty folder, or only README/LICENSE/
bare
git init). → docs/state-0-empty.md
- State A — Unconfigured: real codebase, but no
.claude/ and no CLAUDE.md.
→ docs/state-a-unconfigured.md
- State B — Skeleton:
.claude/ or CLAUDE.md exists but minimal. → docs/state-b-skeleton.md
- State C — Configured:
CLAUDE.md and a populated .claude/ both exist. → docs/state-c-configured.md
"Meaningful code" (State 0 vs A): a manifest (package.json, pyproject.toml, go.mod,
Cargo.toml, pom.xml, …) or more than a handful of non-doc files. If none, it's State 0.
Step 2 — Follow the state doc
Open the single doc matched above and execute it end to end. Each state doc walks through
discovery → interview (if any) → scaffold → verify, pulling shared details from:
docs/scaffold.md — the files to create and their requirements (common to all states).
docs/git-host.md — host detection and identity convention.
Guardrails (always apply)
- Never redefine global agents/skills; only add stack-specific ones.
- Never contradict global rules; project settings merge on top.
- Never read, echo, or copy tokens/credentials from
~/.gitconfig, ~/.gitconfig-gitlab, or anywhere else.
- Everything under
.claude/ is committed for the team except .claude/settings.local.json.