init

A project setup workflow for Claude Code that examines a codebase and creates or updates project guidance under .claude/ and relevant subproject documentation.

In plain words
What is it for?
Use it to initialize a single project, monorepo, or multi-repository workspace, reconcile documentation with the source, and install formatting hooks and test infrastructure.
Why use it?
It gives Claude Code documented rules about the project's structure, coding style, architecture, testing, and development hooks.

Skill for Claude CodeCodex

Part of the optimus-claude plugin — 19 skills, 15 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/oprogramadorreal/optimus-claude/init
Any agent
npx skills add oprogramadorreal/optimus-claude --skill init
Clone the repo
git clone --depth 1 https://github.com/oprogramadorreal/optimus-claude

Made for: Claude Code, Codex.

Or install optimus-claude, the plugin that ships this one along with the rest of its 19 skills, 15 agents, 3 hooks.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,625 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.04625
Opus 5 $0.00036 $0.02312
Sonnet 5 $0.00014 $0.00925
Haiku 4.5 $0.00007 $0.00462

Measured 3d ago against content hash c759f3bad30c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (templates/hooks/format-cpp.sh, templates/hooks/format-csharp.sh, templates/hooks/format-dart.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/init/SKILL.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Initialize Project for Claude Code

File semantics

Three classes govern every file this skill writes. Later steps name the class instead of restating the rules.

  • Generated.claude/hooks/* and .claude/docs/coding-guidelines.md: verbatim templates (or fallback hooks), never user-authored. Always overwrite silently, regardless of audit status.
  • Customizable — all CLAUDE.md files, testing.md, styling.md, architecture.md, skill-writing-guidelines.md: never silently overwrite. When the file exists, review-and-propose — compare against the template and detected state, apply only user-approved changes, preserve user-added sections.
  • settings.json — always merge, never overwrite: preserve permissions and any other custom sections. Do not create it when no hooks are installed and it doesn't already exist.

New files of any class are written directly — no confirmation prompts. Preserve when unsure: content not derivable from the codebase is never discarded, not even to meet size targets. Mark content outdated only when source code directly contradicts it, and confirm with the user before removing user-added items. The same semantics apply to subproject docs in monorepos and to each repo's .claude/ in multi-repo workspaces.

CLAUDE.md authoring rules

CLAUDE.md is loaded into every conversation, and Claude can already read the repository. So the budget goes to what reading the repository does not give it.

  • Spend it on gotchas. Invariants a script or CI depends on, a command that must run from a specific directory, a file that looks editable but is generated, a convention the code deliberately breaks in one place, setup that fails in a non-obvious way, why a decision was made. Write fewer real ones rather than padding to a count — an empty Gotchas section is a valid outcome, and better than five lines of restated obviousness.
  • Never restate what the filesystem shows. No directory listings, no "the stack is TypeScript" when package.json says so, no per-file roles. One line of identity and stack at the top is the whole allowance.
  • Commands do belong here: which of a dozen scripts is the real build/test/lint entry point, with the detected package-manager prefix, is not inferable.
  • Target <= 60 lines. The limit is soft: condense template-generated content first; if user-added content still pushes it over, exceed the limit and note the overage in the Step 7 summary.
  • Only universally-applicable content — task-specific material distracts the model and degrades instruction-following.
  • Progressive disclosure: the Documentation table routes a kind of change to the one doc that governs it, so a typo fix does not load the architecture doc.
  • file:line references, not code snippets — snippets go stale.
  • No code-style rules — the formatter hooks installed in Step 5 enforce style deterministically.
  • Monorepo: root CLAUDE.md is an orchestrator — subproject table, workspace-wide commands, workspace-level gotchas only; each subproject's own CLAUDE.md is auto-discovered when working there and carries that package's gotchas. Shared guidelines stay at root .claude/docs/; testing.md/styling.md/architecture.md are scoped per subproject.
  • Multi-repo workspace: each repo is fully self-contained (own .claude/); the parent CLAUDE.md is a lightweight local-only map — nothing is shared at root.

Read the full file on GitHub · 189 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 189 lines · 72 tokens per session scan A c759f3bad30c

Subscribe to this mod's changes

init is a skill published in the GitHub repository oprogramadorreal/optimus-claude (73 stars, last pushed 3d ago), licensed MIT. It adds 72 tokens to every session and 4,625 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens