init
Initialize or regenerate the project CLAUDE.md and README.md for vibe coding (TDD-first, no manual testing)
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- init
- model
- claude-sonnet-5-5
- version
- 1.1.0
- description
- Initialize or regenerate the project CLAUDE.md and README.md for vibe coding (TDD-first, no manual testing)
- argument-hint
- [optional: project description]
03 SKILL.md 正文
/vibe:init — Vibe Coding Project Setup
Initialize or regenerate this project's CLAUDE.md (and ensure README.md) for vibe coding: the user is Product Owner only, so all quality assurance is automated.
Step 1 — Reconnaissance
Scan for manifests — a project may use several stacks: package.json (jest/vitest/mocha; biome or eslint + prettier), pyproject.toml/setup.py/requirements.txt (pytest/unittest; ruff or black), Cargo.toml and go.mod (built-in test and format), pom.xml/build.gradle (junit; spotless/checkstyle), composer.json (phpunit; php-cs-fixer), Gemfile (rspec; rubocop), *.csproj/*.sln (xunit/nunit; dotnet format), Makefile (check targets).
Read from each manifest its name, description, scripts (test, lint, format, build, run) and dependencies; also the directory structure, the existing CLAUDE.md (sections marked <!-- keep --> are preserved), .env.example, CI config, and $ARGUMENTS.
Empty project (no manifest at all): use AskUserQuestion for the project idea (open text) and the stack (Node.js/TS, Python, Rust, Go, or the user's own). If the idea is a vague noun phrase or slogan with no concrete actor, action, or outcome ("an app to manage stuff"), invoke the vibe:clarify skill with it; settled/partial → use its ### Synthesis as the description, abandoned → keep the answer as given. The chosen stack is scaffolded in Step 3.
Project language (always asked): "What language should generated content for this project (documentation, backlog items, comments, etc.) be written in?" — the current ## Project language value first if one exists, otherwise English and French first; "Other" for anything else.
Step 2 — Gaps and review agents
Missing test framework or style tooling → installed in Step 3. Review agents for the CLAUDE.md table: always review-tests, review-naming, review-security, review-dependencies, review-robustness, review-hygiene, review-antipatterns, review-simplicity, review-overengineering, and review-architecture (.vibe/ will exist after Step 5); review-solid if the project has classes, interfaces, or a modular architecture; review-performance if it is an API, server, full-stack app, or has a real-time render loop; review-web-security if it exposes HTTP endpoints — mark it ✅ (dynamic) only if the user wants a locally-run instance probed as well; review-ddd if an explicit domain layer exists (domain/, entities/, aggregates/, or equivalent vocabulary).
Then invoke the vibe:tasks skill with: Bootstrap / install tooling (only when the project is empty or tooling is missing) → Write CLAUDE.md → Run lint, tests, and vibe:sync → Create/update README.
Step 3 — Bootstrap / install tooling
Empty project: create the stack's minimal scaffold (manifest + one source file) with its standard init command. Then install what is missing, preferring the canonical modern tool for the stack (Vitest + Biome, Pytest + Ruff, JUnit 5 + Spotless, RSpec + RuboCop, xUnit, PHPUnit + PHP-CS-Fixer; nothing for Rust and Go), add the test and lint scripts to the manifest, create a minimal passing placeholder test, run lint once to auto-fix, and confirm both commands exit 0.
Step 4 — Write CLAUDE.md
Create or fully overwrite CLAUDE.md from the template below, every placeholder filled from the real project, then mark the task completed.
# CLAUDE.md — [PROJECT_NAME]
> Auto-generated by /vibe:init. Edit freely — re-run /vibe:init to regenerate.
> Add `<!-- keep -->` on a section heading to preserve it on regeneration.
## Project overview
[1–3 sentences from the manifest description, $ARGUMENTS, the Step 1 answers, and the directory structure]
**Stack:** [e.g. Python 3.12 / FastAPI / Pytest / Ruff]
**Type:** [CLI / REST API / frontend / library / full-stack / other]
## Project language
[Language] — all documentation, backlog items, code comments, and other generated content for this project are written in [language].
## Architecture
[Top-level directories and their roles, as a short annotated tree]
<!-- The import below loads the compact codebase map into every session. It is maintained by /vibe:sync; details (modules/, models.md, glossary.md) stay on-demand. -->
@.vibe/index.md
## Development workflow (Vibe Coding)
The user is the **Product Owner only**: they describe requirements and evaluate outcomes, they never write or manually test code. Features and fixes go through `/vibe:feature` and `/vibe:fix` — tests first (red), minimum implementation (green), real runtime check, refactor, lint. A bug is reproduced by a failing test before it is fixed.
### Definition of Done
- [ ] Tests cover the nominal path, at least 2 edge cases, and the error path, and all pass (`[test command]`)
- [ ] Lint exits 0 (`[lint command]`)
- [ ] The change was exercised for real at runtime, not only through tests
- [ ] No debug artifacts, dead code, or unused imports
- [ ] No hardcoded secrets — environment variables only
**Never present a result while tests are failing.** On a failure: diagnose, fix, re-run, up to 3 times; escalate only for an ambiguous requirement.
## Testing conventions
- Test location: `[actual path, e.g. tests/, __tests__/, src/**/*.test.ts]`
- Test runner: `[framework]`
- One test file per source module; test names describe behaviour ("returns empty list when input is empty")
## Review agents
Review agents active on this project (run by the internal review of every feature and fix):
| Agent | Active | Reason |
|---|---|---|
| `vibe:review-tests`, `vibe:review-naming`, `vibe:review-security`, `vibe:review-dependencies`, `vibe:review-robustness`, `vibe:review-hygiene`, `vibe:review-antipatterns`, `vibe:review-simplicity`, `vibe:review-overengineering`, `vibe:review-architecture` | ✅ | always active |
| `vibe:review-solid` | [✅ / ❌] | [OO or modular architecture / functional or scripting style] |
| `vibe:review-performance` | [✅ / ❌] | [API, server, full-stack, or real-time loop / CLI, library, or script] |
| `vibe:review-web-security` | [✅ / ✅ (dynamic) / ❌] | [HTTP endpoints exposed / no HTTP surface] |
| `vibe:review-ddd` | [✅ / ❌] | [explicit domain layer / no explicit domain model] |
Step 5 — Lint, tests, sync
Run the lint command (auto-fix across the codebase), run the test command (all pass), then invoke the vibe:sync skill — CLAUDE.md imports @.vibe/index.md, so .vibe/ must exist when this skill completes.
Step 6 — README
Invoke the vibe:docs skill: it creates a README with managed sections when there is none, asks which sections to add to a hand-written one, and refreshes existing managed sections in place. Never write README content here.
Step 7 — Report
Short, plain sentences: detected stack and type; project language; what was installed or configured; lint and test status; one sentence on what CLAUDE.md now enforces; README status (created / sections added / up to date). No CLAUDE.md dump unless asked.
Step 8 — First audit
Only when the project already had code before this run (not for a new or empty one): ask "Run a first audit of the existing code now? (/vibe:audit)". Yes → invoke the vibe:audit skill; no → stop.
04 同仓库更多 Skills
workspace-init
Set up or refresh a multi-repo workspace from the parent folder of its sibling repos — the hub repo (repos registry, cross-repo backlog and decisions) that /vibe:next-task reads, and the local, untracked workspace-root CLAUDE.md that indexes the hub and the siblings
usage-report
Usage report of a vibe workflow: counts, while the work runs, the bricks called, the loop rounds, the findings, the questions asked to the user and the fixes, then writes these statistics to `.vibe/usage-reports/` in the project at the end. Invoked by `vibe:feature` and `vibe:fix` through their shared workflow, at the start of the work and at the end. Never triggered by a user request.
tasks
Creates and tracks a vibe workflow's task list and keeps it up to date until the end — through the native task system (TaskCreate / TaskUpdate / TaskList / TaskGet) when it is available, otherwise through a `tasks.tsv` file in the scratchpad, kept by a script that reproduces the same model (ids, statuses, blockedBy dependencies, owner). Invoked internally by other vibe skills, never directly by users.
sync
Sync .vibe/ — generate on first run, incrementally update on subsequent runs
rewrite
暂无简介
review
Runs the project's active review agents on a scope and returns their raw findings — one owner per dimension, the shared finding contract injected into every prompt — without judging, fixing or committing anything. Invoked by the build workflow (`vibe:feature`, `vibe:fix`) as its internal review step and by `vibe:audit`, never directly by users.