From neohive
Use when the user says "generate docs", "build out documentation", "document this codebase", "design our doc standard", or "NeoHive should help with docs". Multi-phase orchestrator that designs a documentation standard tailored to the codebase through Socratic dialogue (audience, depth, reference vs tutorial, per-boundary vs per-subservice), saves it to NeoHive as a reusable convention, generates 2-3 sample pages to validate the approach, then hands off to a fresh session for full generation. Output is the agreed standard plus validated samples, not a complete doc set.
How this skill is triggered — by the user, by Claude, or both
Slash command
/neohive:design-codebase-docsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You orchestrate a documentation design + sample-generation workflow. This skill's output is NOT a complete set of docs; it is an **agreed-upon standard plus 2 to 3 validated sample pages**, after which the user starts a fresh session to actually generate the bulk of the docs. This split exists because generating a full doc set in one session causes context rot and produces inconsistent output.
You orchestrate a documentation design + sample-generation workflow. This skill's output is NOT a complete set of docs; it is an agreed-upon standard plus 2 to 3 validated sample pages, after which the user starts a fresh session to actually generate the bulk of the docs. This split exists because generating a full doc set in one session causes context rot and produces inconsistent output.
Mental model: you're acting like /using-superpowers for docs — you drive the user through phases, dispatch sub-agents for heavy lifting, and save the outcome to NeoHive so a future session can pick up where you left off.
Call memory_context with this exact task description:
"documentation standards and golden standard for this codebase"
Report what came back. If a prior gold standard is already stored, skip to Phase 4 and ask the user if they want to use it as-is, tweak it, or start over.
Dispatch the explore-neohive agent (or fall back to Explore if no NeoHive index is available) to survey existing documentation. Brief the agent like this:
"Survey all documentation in this repo. Report:
- README files (location, length, primary audience — infer from content)
/docsdirectory layout if present (tree, top-level sections)- Inline doc density — pick 3 representative source files and estimate docstring/comment coverage
- Doc generators in use — look for mkdocs.yml, docusaurus.config.*, sphinx conf.py, typedoc.json, rustdoc settings
- Cross-references — grep for broken links like
](./paths and report count- Identify the codebase's primary logical boundaries (subservices, packages, apps) — give me a flat list
Report as structured markdown. Under 600 words. Do not propose any changes yet."
Take the agent's report. Summarize it back to the user in 5–8 lines, then stop for acknowledgement.
Based on the discovery, propose 2–3 ways to split the docs. Use AskUserQuestion:
(Recommended) By subservice/package — matches the repo's apparent boundariesBy audience — separate tracks for users, developers, opsBy topic — guides, reference, tutorials, ADRs as parallel treesFlat — one bucket per logical area, cross-linkedAfter they pick, ask one follow-up if needed: "Within each , do you want guides first, reference first, or both at equal weight?"
This is the heart of the skill. You ask questions one at a time, each building on the last, until you have a clear, write-downable standard. Don't skip questions even if you think you know the answer.
Ask these in order (one AskUserQuestion per question):
New hires / developers joining the codebase (Recommended), External users / customers, Product managers / non-technical stakeholders, Ops / SRENobody — optimize only for primary.(Recommended) The ability to run the code and extend it in an obvious way, A mental model of the architecture, A list of every public API they can call, Answers to the top 3 support questions(Recommended) 70% tutorial, 30% reference — lead with concepts, 50/50, 30% tutorial, 70% reference — assume reader can read code, Reference only — prose lives in commit messages(Recommended) Every concept gets a runnable example, Examples only for non-obvious patterns, Examples as footnotes, linked separately, No inline examples — link to /examplesThis is open-ended — use AskUserQuestion with Other to let them type.
Onboarding / getting started, API reference completeness, Architecture / 'why' explanations, Error messages and troubleshootingLine length 80/100, Second-person ("you") not third-person, No emojis, American English, Present tense for behavior, past for decisionsAssemble all 7 answers into a single document called docs/DOC_STANDARD.md (or similar — ask the user). Structure:
# Documentation Standard
_Generated by /neohive:design-codebase-docs on <date>. Edit freely; rerun to regenerate samples._
## Audience
- Primary: <answer>
- Secondary: <answer>
## Goals
<from 3.3: what a 10-minute read delivers>
## Structure
- Top-level split: <from Phase 2>
- Within each unit: <from follow-up>
- Tutorial/reference balance: <from 3.4>
## Page template
Every page includes, in this order:
1. One-line purpose
2. <...derived from the above answers...>
## Code examples
<from 3.5>
## Style
<from 3.7>
## Known gap focus
<from 3.6 — the first 3 pages generated should prioritize this>
Write this file. Show it to the user. Ask via AskUserQuestion:
(Recommended) Yes, save to NeoHive and generate samples, Tweak a section — I'll tell you which, Start over — the audience/goals are wrongIf "tweak": ask what section, rewrite, re-preview.
Call list_hives. Ask which hive (default to the one matching the repo). Then memory_store with:
hive: chosen hivetype: conventioncontent: the full DOC_STANDARD.md contents (this is the canonical reference for future sessions)tags: ["documentation", "standard", "gold-standard", <repo-name>, <primary-audience-keyword>]importance: 9metadata: {"source": "design-codebase-docs", "file": "docs/DOC_STANDARD.md"}Confirm the store succeeded. Report the memory ID.
Pick target pages that stress-test the standard:
For each, either:
Agent with subagent_type: general-purpose) per page, giving it the full DOC_STANDARD.md as context + the specific topic. Do these in parallel (single message with N Agent tool calls) if there are no dependencies.Ask once:
(Recommended) Parallel, One-at-a-timeAfter generation, present each page to the user. For each, ask:
Yes, keep as-is, Good but tweak X, Miss — regenerate with more emphasis on Y, The standard is wrong — fix the standardIf the standard needs fixing, loop back to Phase 4. Every tweak is a learning — store it in NeoHive as an insight memory referencing the standard's memory ID.
This is critical. Do NOT attempt to generate the rest of the docs in this session. Tell the user, verbatim:
✓ Gold standard saved to NeoHive (id: ) ✓
docs/DOC_STANDARD.mdwritten ✓ sample pages validatedNow start a fresh Claude session. Generating the full doc set in this conversation would cause context rot — the model loses precision as the session grows. In the new session, run:
/neohive:load-context generating docs per DOC_STANDARD.mdThat will pull your gold standard out of NeoHive and Claude can generate page-by-page with a clean context per batch. If you want to keep going anyway in this session, say "keep going" and I will — just know quality may drift.
If the user says "keep going", acknowledge the risk and proceed, but work in batches of 5 pages with a context-check between each batch.
AskUserQuestion call. Even if two questions feel related, keep them separate — users process decisions better one at a time.insight type, importance 6-7, linked to the standard.Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub neohiveai/neohiveclaude --plugin neohive