onboarding-repository
Use when bootstrapping documentation for a repository for the first time — generates AGENTS.md, CLAUDE.md, README.md, and docs/*.md from codebase analysis using staged exploration, user review, and generation. Supports --auto to skip review.
What this skill does
# Onboarding Repository
Generate the full documentation suite for a repository in three stages: explore → review → generate → validate.
## Critical Guidelines
- **You MUST load the `curator:documenting-repositories` skill first** for format standards, abstraction rules, and frontmatter spec.
- **You MUST follow the steps in order** — pre-flight, explore, review, generate, validate, summary.
- **You MUST create TodoWrite todos for each step in the Workflow section** — one todo per Step, marked `in_progress` on entry and `completed` on exit. Multi-step workflows silently skip steps without explicit tracking.
- **You MUST get user confirmation before generating files** unless the user invocation includes `--auto`.
- **You MUST NOT overwrite existing documentation without explicit user choice** (Regenerate / Complete / Cancel).
- **You MUST treat `README.md` as a separate decision** from the rest (Replace / Merge / Skip) — never replace silently.
- **You MUST verify generated outputs** in Step 4 before reporting success.
## When to Use
- **Use this skill** when a repository has no documentation, or partial documentation that needs filling in.
- **Use `adding-documentation`** instead for focused docs on a specific module / file / topic in an already-onboarded repo.
- **Use `updating-documentation`** instead when existing docs need refreshing based on code changes.
## Invocation
User invokes via `/curator:onboarding-repository [--auto]`.
- `--auto` — skip user review (Step 2); with an existing `README.md`, defaults to **Skip** (non-destructive).
## Workflow
### Step 0 — Pre-flight
Check which standard documents already exist:
```bash
ls AGENTS.md CLAUDE.md README.md docs/architecture.md docs/domain.md docs/patterns.md docs/development.md 2>/dev/null
```
Branch based on the result:
| State | Action |
|-------|--------|
| All standard docs exist | Present options: **Regenerate** (replace all), **Use updating-documentation instead**, **Cancel** |
| Some standard docs exist | Present options: **Complete** (generate missing only), **Regenerate** (replace all), **Cancel** |
| No standard docs | Proceed to Step 1 |
**`README.md` handling is a separate question** (always ask, even with `--auto`):
| README state | With `--auto` | Without `--auto` |
|--------------|----------------|------------------|
| Exists | Default to **Skip** | Ask: Replace / Merge / Skip |
| Does not exist | Generate from template | Generate from template |
Store the README action (`replace` / `merge` / `skip`) — needed in Step 3.
### Step 1 — Explore
Launch the `curator:codebase-explorer` agent via the Task tool:
```
Description: Explore codebase for documentation
Prompt: Explore this repository and extract documentation-relevant information.
Return structured findings: project overview, tech stack, architecture,
patterns (as rules + rationale, anchored by file path or exported symbol —
NEVER line numbers, NEVER code snippets), invariants and gotchas,
complex modules, and scope paths for each document type.
Capture durable, non-derivable knowledge only. Skip anything an agent could
discover in seconds with `grep` or `ls` (function lists, parameter lists,
file listings, dependency lists, version numbers).
```
**Capture** the structured findings — needed in Steps 2 and 3.
### Step 2 — Review
**Skip this step if the user invoked with `--auto`.**
Present a concise summary to the user. Use this template:
```markdown
## Repository Analysis
**Project:** <name from findings>
**Type:** <type from findings>
**Tech Stack:** <stack from findings>
### Complex Modules
<List paths and reasons, or "None identified">
### Documentation Plan
Will generate:
- `README.md` — <Replace | Merge | Skip>
- `AGENTS.md`, `CLAUDE.md`
- `docs/architecture.md`
- `docs/domain.md` <or "Skipped — technical project with no business domain">
- `docs/patterns.md`
- `docs/development.md`
<For each complex module:>
- `<path>/AGENTS.md`, `<path>/CLAUDE.md`
### Scope Tracking
Each document will track specific file patterns for staleness detection.
---
**Options:**
1. **Proceed** — Generate with these findings
2. **Re-explore** — Gather more information about a specific area
3. **Adjust** — Modify findings before generating
4. **Cancel** — Stop onboarding
```
Handle the user's choice:
- **Proceed** → continue to Step 3
- **Re-explore** → ask what area needs more exploration, then return to Step 1 with a focused target
- **Adjust** → ask what to change, incorporate, re-present
- **Cancel** → stop and report cancellation
### Step 3 — Generate
Launch the `curator:doc-generator` agent via the Task tool:
```
Description: Generate documentation files
Prompt: Generate documentation files from these findings:
<paste the full findings from Step 1>
README action: <action from Step 0 — replace | merge | skip>
Read templates from:
${CLAUDE_PLUGIN_ROOT}/skills/documenting-repositories/reference/templates.md
Generate (in order):
1. README.md (only if action is replace or merge)
2. AGENTS.md (root)
3. CLAUDE.md (root)
4. docs/architecture.md
5. docs/domain.md (skip for purely technical projects)
6. docs/patterns.md
7. docs/development.md
8. Module AGENTS.md / CLAUDE.md pairs for complex modules listed in findings
```
**Capture** the agent's summary (created files, skipped files, open TODOs).
### Step 4 — Validate
Verify outputs locally:
```bash
# Files exist
ls README.md AGENTS.md CLAUDE.md docs/*.md 2>/dev/null
# Frontmatter is HTML-wrapped (first line should be <!-- for all except CLAUDE.md)
for f in AGENTS.md docs/*.md README.md; do
[ -f "$f" ] && echo "$f: $(head -1 "$f")"
done
# CLAUDE.md is single-line @AGENTS.md
[ -f CLAUDE.md ] && cat CLAUDE.md
```
Self-check:
- [ ] All tracked docs start with `<!--` (HTML-wrapped frontmatter)
- [ ] `CLAUDE.md` contains only `@AGENTS.md`
- [ ] Build commands use the build system, not raw commands
- [ ] `README.md` links to `docs/` resolve (if generated/merged)
If any check fails, report it in Step 5 as a follow-up rather than silently retrying.
### Step 5 — Summary
Report back to the user:
```markdown
## Onboarding Complete
### Generated
- `README.md` — Project overview <or "Skipped" / "Merged">
- `AGENTS.md` — Main agent documentation
- `CLAUDE.md` — Redirect
- `docs/architecture.md` — System design
- `docs/domain.md` — Business concepts <or "Skipped — technical project">
- `docs/patterns.md` — Code conventions
- `docs/development.md` — Build/test/run
<Module docs if any>
### Open TODOs
<List from doc-generator's output, or "None">
### Next Steps
1. Review generated documentation
2. Run `/curator:validating-documentation` to verify system integrity
3. Commit the documentation
```
## Edge Cases
| Scenario | Approach |
|----------|----------|
| Monorepo | Root-level docs; only complex sub-projects get their own `AGENTS.md` |
| No build system detected | Generate `development.md` with raw commands and a clearly-marked TODO |
| Empty or near-empty repo | Generate minimal docs; flag limited findings in the summary |
| Existing `CLAUDE.md` with content | Migrate content to `AGENTS.md`, then replace `CLAUDE.md` with `@AGENTS.md` |
| No `LICENSE` file | Omit the License section from `README.md` entirely |
| No `package.json` / `Makefile` | `README.md` Installation says `See [Development](docs/development.md)` |
| Malformed existing `README.md` during merge | Best-effort parse; append missing sections at end |
| `--auto` with existing `README.md` | Default to **Skip** (non-destructive) |
| User picks Re-explore in Step 2 | Re-run Step 1 with a focused exploration target, then return to Step 2 |
## What NOT to Do
- Don't regenerate without explicit user confirmation (unless `--auto`)
- Don't silently replace an existing `README.md`
- Don't generate `domain.md` for purely technical projects
- Don't create module `AGENTS.md` files for simple modules — be conservative
- Don't skip Step 4 validation — it catches the most common generation failures
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.