agentleFS
DeL-TaiseiOzakiDeL-TaiseiOzaki/claude-code-orchestra/.claude/skills/init/SKILL.md

init

Skill199 starsChanged 2 months agoMITView on GitHub

Analyze project structure, populate .claude/docs/DESIGN.md, and write the thin Repository Identity section in .claude/STATE.md.

141 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 9 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.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-run

    Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

    Also in 4 projects that use this

  • +6 more from Lambenthan
  • +1 more from skyllwt

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 129 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never create a CLAUDE.md: Claude Code reads AGENTS.md only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md exists.

    line 18
  2. Distinctive:

    Read these fields before writing anything:

    line 42
  3. Distinctive:

    Ask the user for the project purpose, code-language preference, and additional conventions only when repository evidence does not already …

    line 65
  4. Very specific:

    Write the input JSON to .claude/logs/init-design-input.json and use only the typed keys:

    line 75
  5. Very specific:

    All three must exit 0 with ok: true.

    line 138

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

Initialize Project Configuration

Initialize project-owned context without expanding the always-loaded root AGENTS.md.

Ownership

  • .claude/docs/DESIGN.md owns macro requirements and design.
  • .claude/STATE.md owns the active main agent, thin repository identity, and cross-session working state.
  • Root AGENTS.md is template-owned and must not be edited by this skill. Never create a CLAUDE.md: Claude Code reads AGENTS.md only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md exists.
  • PROGRESS.md is maintained by /checkpointing.

Steps

1. Collect stack evidence

Run:

python3 .claude/skills/init/detect_stack.py

The script reports evidence, not conclusions. It never infers a command: evidence.tools names the [tool.*] tables declared in pyproject.toml, evidence.scripts carries the verbatim package.json script strings, and evidence.dependencies gives each dependency's name, its raw spec, the manifest it came from, and the key it was declared under (project.dependencies, project.optional-dependencies.dev, dependency-groups.lint, devDependencies.x, …). You decide from that evidence which commands and libraries are real; do not copy a command the repository does not declare.

Read these fields before writing anything:

  • warnings — a manifest that could not be read, decoded, or parsed. Non-empty means the evidence is partial, even though the exit code is 0.
  • evidence.parsed_manifests / evidence.unparsed_manifests — "parsed and empty" versus "present but not parsed for dependencies" (Cargo.toml, go.mod, setup.py, Makefile, Dockerfile).
  • manifests — every checked filename with an explicit true/false, so "checked and absent" is never mistaken for "never checked".
  • agent_bootstrap — agents_md, no_claude_md_shadow, state_md, claude_agents_dir, claude_skills_dir, cli_subagent_contract.

Exit codes: 0 normal · 1 bad arguments, including a --project-root that is not a directory · 2 the agent bootstrap is invalid — ok: false and error name the failed markers. Exit 2 covers the root AGENTS.md contract, the absence of a shadowing CLAUDE.md, shared state, the CLI-subagent contract, and both native runtime directories (.claude/agents and .claude/skills must be real directories; a missing one silently disables all native agent and skill discovery). Stop and repair the installation — bash scripts/check.sh diagnoses the same layout — before writing context.

2. Ask for missing context

Ask the user for the project purpose, code-language preference, and additional conventions only when repository evidence does not already answer them.

3. Populate DESIGN.md

DESIGN.md is written through the typed writer, never by hand: it is a user-owned document, and update_design.py supplies the dry-run preview, the atomic replace, the concurrent-modification hash guard, per-cell | escaping, and validation of the composed document before it replaces the original.

Write the input JSON to .claude/logs/init-design-input.json and use only the typed keys:

DESIGN.md targetInput keyRow fields
## 機能要件 (Functional Requirements)requirementsid, requirement, priority, notes
## 非機能要件 (Non-Functional Requirements)nfrcategory, requirement, metric
## 技術選定 (Tech Stack & Rationale)tech_choicesarea, technology, rationale, alternatives
## アーキテクチャ (Architecture) Agent Roles tableagent_rolesagent, role, responsibilities
## Key Decisionsdecisionsdecision, rationale, alternatives (date is stamped for you)
Prose sections (背景・目的, スコープ, 制約, TODO / Open Questions)section_updatesheading, content
python3 .claude/skills/_shared/update_design.py --input .claude/logs/init-design-input.json
# Read the preview at preview_file, then apply:
python3 .claude/skills/_shared/update_design.py --input .claude/logs/init-design-input.json --apply --require-change

Completion test — result == "applied" and (decisions_appended > 0 or any rows_appended value > 0 or sections_updated non-empty). --require-change turns a no-op into exit 2, so an all-duplicate or all-empty input can never be reported as populated. Exit 2 also means the DESIGN.md structure is invalid; exit 3 means DESIGN.md changed underneath the writer — re-read and retry.

Fill only claims supported by repository evidence or the user's answers, and do not fabricate requirements. Later incremental design changes go through /design-tracker, which uses the same writer.

4. Update Repository Identity

## Repository Identity is also written through its typed writer, which replaces only that section's body and aborts if ## Main Agent, ## Progress Tracker, or any working block would be lost. Write .claude/logs/init-identity-input.json:

{"identity": "One sentence naming what this repository is."}
python3 .claude/skills/_shared/append_state_block.py --type repository-identity \
  --input .claude/logs/init-identity-input.json
python3 .claude/skills/_shared/append_state_block.py --type repository-identity \
  --input .claude/logs/init-identity-input.json --apply

The writer emits the <!-- Managed by /init. Re-run /init to refresh. --> marker and the docs/DESIGN.md pointer itself, so the input carries the identity sentence only. Do not add a heading, a ---, or a second paragraph — the writer rejects them (exit 1). Confirm result: "applied", structure_ok: true, and progress_tracker_preserved: true (a real check: it aborts the write with exit 2 when an existing tracker line was deleted or rewritten).

5. Re-verify and report

Re-run the closing gate, and report the JSON verdicts rather than a claim:

python3 .claude/skills/init/detect_stack.py
python3 .claude/skills/_shared/validate_doc.py --contract design-doc --file .claude/docs/DESIGN.md
python3 .claude/skills/_shared/validate_doc.py --contract state-doc --file .claude/STATE.md

All three must exit 0 with ok: true. detect_stack.py confirms shared state and the native runtime directories are intact; the two contracts confirm the documents this skill just wrote still have the sections every other skill reads them for — exit 2 names the missing section. Checking the two documents directly is stricter than inferring their health from the detector, which is why the detector alone is no longer the gate.

Then review .claude/rules/ for irrelevant stack-specific rules, but do not remove them without user approval. Report the evidence you used and the evidence you rejected, the two updated files, any warnings, and your recommendations, per .claude/rules/language.md.

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.