A Claude Code skill that bootstraps — or audits — the full
.claude/memory architecture of any project.
/init (the built-in slash command) creates a basic CLAUDE.md and stops there. claude-init goes the rest of the way: scaffolds rules, skills, agents, hooks, settings, context log, and validates the result against a strict 7-rule conformance checklist.
This skill operates in two modes, auto-detected from project state:
- Bootstrap mode (no
.claude/present): generates the full architecture from scratch, tailored to the detected project type (Node, Python, Rust, monorepo, etc.). Produces a complete, valid scaffolding the first time the user invokes Claude Code in a fresh repo. - Audit mode (
.claude/already present): walks the existing scaffolding, flags drift from current best practices, and offers a structured diff of recommended changes — never destructive without confirmation.
The skill enforces seven non-negotiables on every output:
- Never overwrite a file without explicit
AskUserQuestionconfirmation. settings.jsonmust validate as JSON (jq .).CLAUDE.mdmust be ≤ 200 lines (otherwise adherence drops).- No content duplication between
CLAUDE.mdand any.claude/rules/file. - Skill names are kebab-case, ≤ 64 characters.
- Non-critical hook commands end with
|| true. - Security-critical hooks (PreToolUse blockers) never fail-open.
It also produces a per-project context-log.md so future Claude sessions know what was bootstrapped, when, and why.
Trigger phrases:
- "set up Claude for this project"
- "bootstrap
.claude/" - "audit claude memory"
- "initialize project best practices"
- "scaffold my Claude Code setup"
Do NOT use when:
- You just want a basic
CLAUDE.md— use the built-in/initinstead. - The project already has a hand-crafted, intentionally minimalist scaffold you want to preserve.
- You're working in a monorepo subdirectory; run it from the monorepo root.
claude-init is registered in hashbulla/dotclaude's skills.manifest.toml. Clone dotclaude and run bootstrap.sh — the skill is cloned and symlinked automatically.
git clone git@github.com:hashbulla/claude-init-skill.git \
~/Desktop/AIEngineering/Skills/claude-init-skill
# Point Claude Code at the skill
ln -sfn ~/Desktop/AIEngineering/Skills/claude-init-skill/skills/claude-init \
~/.claude/skills/claude-initRestart Claude Code (or run /skills reload); confirm with /skills list | grep claude-init.
The skill runs in context: fork mode — a dedicated subagent (project-memory-architect) carries the .claude/ design knowledge in isolated context. That subagent reads the project tree, infers project type, then either:
- Bootstraps: emits each artifact (CLAUDE.md, settings.json, rules/, hooks/, etc.) sequentially, validates each against the 7-rule checklist, and only writes after
AskUserQuestionconfirmation. - Audits: produces a structured diff report — what's present, what's missing, what conflicts current best practice. Recommendations are ordered by impact, not alphabetical.
Both modes finish by writing a context-log.md entry documenting the operation, the choices made, and any open follow-ups.
The skill's SKILL.md declares:
---
name: bootstrap-project # slash-command name (called via /claude-init)
description: > # used for auto-discovery; lead with semantics
Bootstraps or audits the full .claude/ memory architecture …
argument-hint: "[bootstrap|audit]" # autocomplete hint in /-menu
user-invocable: true # shows up in user's /-menu
context: fork # runs in isolated subagent context
agent: project-memory-architect # subagent type used in fork mode
---See skills/claude-init/SKILL.md for the full body.
Bootstrap a fresh project:
$ cd new-project && claude
> claude-init bootstrap
The skill detects no .claude/ and walks through a guided setup, asking before each artifact.
Audit an existing project:
> claude-init audit
Produces a diff report ranked by impact. You decide which changes to accept.
Explicit mode override:
> /claude-init audit
Forces audit mode even if .claude/ looks fresh.
- Monorepo nuance: detection works at the root only. If you have per-package
.claude/dirs, the skill audits the root and the per-package ones must be handled separately. - No automatic migration: when auditing, the skill recommends changes — it doesn't apply them. You stay in control.
- Single language detection: polyglot projects get a "best-fit" detection. If wrong, pass
--lang <name>on invocation. - Doesn't manage MCP server config: that lives in
~/.claude/mcp.json(user scope) and isn't part of the per-project scaffolding.
- Per-package monorepo support (audit each
packages/*/) - Recommended-skill suggestions based on project type (e.g.,
claude-apifor Anthropic SDK projects) - Idempotent re-bootstrap (re-running detects existing scaffolding and skips identical pieces)
MIT — see LICENSE.
Inspired by the discipline of shanraisshan/claude-code-best-practice and the project-memory-architect subagent pattern. Maintained as part of hashbulla/dotclaude.