init-project
Initialize project with agent infrastructure, documentation structure, and tooling gaps filled
What this skill does
# Init Project
Initialize the current project with agent infrastructure, documentation, and tooling. Stack assumption: **rosemary** (memory), **mise** (tools), **make** (commands). Nix is supported as an opt-in for repos that already use it.
## Phase 1: Scan
Silently collect before asking anything:
- **Language/framework**: file extensions, config files, dependency manifests
- **Build system**: `Makefile`, `Cargo.toml`, `go.mod`, `package.json`, `build.zig`, etc.
- **Existing agent infra**: `AGENTS.md`, `.agents/`, `CLAUDE.md`, `.cursor/`, `rosemary.toml`
- **Tooling**:
- Mise: `mise.toml`, `.mise.toml` — primary tool source
- Nix: `flake.nix`, `shell.nix`, `default.nix`, `flake.lock` — optional, only when already present
- Formatters, linters, git hooks, CI/CD, editor config
- Task runner: `Makefile` (primary), `justfile`, `Taskfile.yml`
- **Memory**: run `command -v rosemary` — primary store when present; `.agents/` files are the fallback
- **Docs**: `README.md`, `docs/`, existing architecture or design docs
- **Git state**: branch, remotes, recent commits
## Phase 2: Report & Ask
Present scan summary, then ask **one question at a time** for anything not inferable:
1. "What does this project do?" — for AGENTS.md overview
2. "Architecture style?" — monolith / library / CLI / API / microservice
3. "Key coding conventions?" — naming, error handling, testing philosophy
4. "Quality checks that must pass?" — format, lint, test, coverage
5. "Tooling: mise (default) or nix?" — default to mise + Makefile. Choose nix only if `flake.nix` is already present or the user asks; then generate `flake.nix` + the NIX_RUN Makefile wrapper.
6. "Does this project have config management (env files, secrets, migrations) or a release process (tagging, changelogs, CI gates)?" — if yes, generate `rules/config.md` and/or `rules/release.md` in Phase 3.
7. Per tooling gap: "No [tool] found. Want me to add [suggestion]?"
## Phase 3: Generate Agent Infrastructure
If `rosemary` is available, call `rosemary read-graph` first and merge retrieved facts into generated files:
- `CodingStyle` → `AGENTS.md` Coding Conventions
- `ToolPreferences` → `AGENTS.md` Build/Run/Test
- `UserPreferences` → `.agents/CONTEXT.md` Agent Rules
Ask permission before writing each file. Never overwrite without asking.
After generating files, if `rosemary` is available, seed the graph so `/rosemary start` has context on first run:
1. Project entity (repo basename): `rosemary create-entities "[repo-basename]" "project"` then `add-observations` for tech stack + architecture, tool provisioning method (mise / nix), task runner + key make targets, and any non-obvious conventions from the scan.
2. Missing category entities (`UserPreferences`, `CodingStyle`, `ToolPreferences`): seed from the **Global Seed Values in the rosemary skill** — it is the canonical source for these defaults.
### AGENTS.md
Public project briefing for humans and agents. Sections:
- **Project Overview** — description, purpose
- **Tech Stack & Architecture** — detected stack, structure, key patterns
- **Build, Run & Test** — `make fmt`, `make lint`, `make test`, `make check`, etc. All daily operations go through `make <target>`. Tools come from mise (`mise install` to provision). If nix was chosen: enter the shell with `nix develop`, or run a one-off via `nix develop --command <cmd>`.
- **Coding Conventions** — naming, error handling, formatting rules
- **Key Files & Entry Points** — important paths for quick orientation
- **Quality Standards** — required checks before commit/merge
### .agents/ (file fallback)
Generated so the project works when `rosemary` is not installed. When rosemary is present, session state lives in the graph and these files are skipped at runtime. Add all three to `.gitignore`.
- **`.agents/CONTEXT.md`** — Agent Rules (hard DO/DON'T) + Project Context + Tool Provisioning:
- DO: use `make <target>` for all task execution
- DO: at session start, load rosemary entities if available; otherwise read `.agents/CONTEXT.md` + `CURRENT_TASK.md`
- DO: at session end, write state to the `[project]:session` rosemary entity; save conventions to the project entity — fall back to local files only when rosemary is absent
- DO: dispatch sub-agents for independent parallel tasks by default
- DON'T: commit without user confirmation
- DON'T: use plan mode for small, well-scoped tasks
- DON'T: install tools globally — use mise (or the nix devShell, if nix) instead
- Tool Provisioning: mise (`mise install`, `mise exec -- <cmd>`); or nix (`nix develop`, `nix develop --command <cmd>`, never install outside the flake)
- **`.agents/CURRENT_TASK.md`** — seed with initial DONE state. Fields: `Objective`, `Status`, `Completed Steps`, `Remaining Steps`, `Next Action`, `Last Updated`.
- **`.agents/MEMORY.md`** — seed with an empty decision-log header.
### `.claude/` directory
Load `configs/claude-infra.md` for templates. Ask permission once for the whole group before writing.
#### CLAUDE.md (root)
Generate if not already present. Keep minimal — `AGENTS.md` is the single source of truth:
```markdown
@AGENTS.md
## Rules
- See `.claude/rules/core.md` for agent DO/DON'T rules
[- See `.claude/rules/config.md` for config management rules # only if config.md generated]
[- See `.claude/rules/release.md` for release process rules # only if release.md generated]
```
Never overwrite an existing CLAUDE.md — offer to merge instead.
#### `.claude/rules/core.md`
Always generate. Hard DO/DON'T rules for all agents. Use the template from `configs/claude-infra.md`, adapting the tool-provisioning section to the chosen stack (mise / nix).
Rules without `paths:` frontmatter load every session start. Rules with `paths:` frontmatter load only when Claude reads a matching file — use this for topic-scoped conventions.
#### `.claude/rules/config.md` / `release.md`
Generate only if the user confirmed config management / a release process in Phase 2.
#### `.claude/rules/testing.md` (optional, path-scoped)
Offer if a test directory or pattern is detected. Use `paths:` frontmatter so it loads only on test files:
```markdown
---
paths:
- "**/*.test.*"
- "**/*_test.*"
- "test/**"
- "tests/**"
---
# Testing conventions
[project-specific testing rules]
```
#### `.claude/agents/` — skip
Do NOT generate `.claude/agents/` files. Global agents (`haiku-developer`, `gemini-developer`, `codex-developer`, `dispatch-debugger`, `repo-scout`) live in `~/.claude/agents/` and apply to every project.
#### `.claude/commands/help.md`
Offer optionally: "Want a `/help` slash command stub?" Generate if accepted.
#### `.claude/settings.json`
Scaffold permissions + hooks. Ask permission before writing. Adapt `allow` to the detected task runner and tooling:
```json
{
"permissions": {
"allow": ["Bash(make *)", "Bash(mise *)", "Bash(git log *)", "Bash(git diff *)", "Bash(git status *)"],
"deny": ["Bash(rm -rf *)"]
}
}
```
If nix was chosen, add `"Bash(nix develop *)"` to the allow list.
Always include the `block-no-verify` hook — lightweight, protects git hooks on every project:
```json
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "npx -y block-no-verify" }],
"description": "Block --no-verify flag to protect pre-commit/commit-msg/pre-push hooks"
}]
}
```
Use `npx -y block-no-verify` (no version pin) — npm caches the resolved version, so repeat invocations are fast; a pin silently goes stale and adds cold-cache latency on every Bash call.
If a formatter is detected (prettier, ruff, taplo, etc.), offer a `PostToolUse` hook scoped to the edited file:
```json
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_input.file_path // empty' | xargs -I{} prettier --write {} 2>/dev/null || true"
}],
"description": "Auto-format file after each edit (prettier)"
}]
```
Scope to `tool_input.file_path` Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.