skills/doc-best-practices/SKILL.md
Documentation standards for this project — file naming, structure, writing style, formatting, skill+doc pairs, placement, and maintenance. Use when creating, updating, reviewing, or auditing any Markdown doc in `/docs/`, `README.md`, or `CONTRIBUTING.md`. Also use when deciding whether a new topic needs a doc, a skill, or both. Do NOT use for in-code JSDoc/TSDoc comments — load code-comment-best-practices instead.
npx skillsauth add bkinsey808/songshare-effect doc-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Requires: file-read. No terminal needed unless validating after edits.
docs/doc-best-practices.md — load on demand for full formatting rules, ✅/❌ examples, rationale, and edge cases.
Preconditions:
docs/ai/rules.md for repo-wide constraints before proceeding.Clarifying questions:
/docs/
unless context suggests README or CONTRIBUTING./docs/ — let me
know if you meant to update an existing one."Output format:
Error handling:
Should I create new documentation?
Does this concept require more than 3 paragraphs of explanation?
├─ No → Add to an existing doc or inline code comments
└─ Yes → Is it a standalone topic?
├─ No → Expand existing doc with a new section
└─ Yes → Create a new doc
Where does this doc live?
├─ General project info (setup, contributing) → Root README.md
├─ Coding standards & patterns → /docs/*-best-practices.md
├─ Feature or architecture deep dive → /docs/[feature-name].md
├─ Code-level implementation details → Inline JSDoc/TSDoc comments
└─ Skill definitions for AI agents → /skills/[name]/SKILL.md
Do I need a skill too?
Is this a recurring task with clear patterns?
├─ No → Doc only is fine
└─ Yes → Will AI agents perform this task?
├─ No → Doc only
└─ Yes → Create both
├─ Write the doc first (comprehensive reference)
└─ Then write the skill (concise, with deep links to the doc)
Details: skill-and-doc-pairing
doc-best-practices.md ✅DocBestPractices.md ❌Details: file-naming
Every doc must have:
<a id="..."> anchors — for every heading in the ToC## See Also — at the bottom, linking to related docs (optional but preferred)Details: required-elements, anchor-links
#), Title Case, one blank line before/after,
unique names across the whole document-), 4-space indent for nesting, 1. for ordered```typescript)--- between major H2 sections onlyDetails: formatting-standards
Details: writing-style
react-best-practices.md, ../README.md)[Section Title](#anchor-id) using explicit <a id> anchorsDetails: links-and-references
| Skill | Doc |
| ------------------------------- | ------------------------------------ |
| unit-test-best-practices | unit-test-best-practices.md |
| unit-test-hook-best-practices | unit-test-hook-best-practices.md |
| react-best-practices | react-best-practices.md |
| typescript-best-practices | typescript-best-practices.md |
| zustand-best-practices | zustand-best-practices.md |
| code-comment-best-practices | code-comment-best-practices.md |
| lint-first-authoring | lint-best-practices.md |
| playwright-testing | playwright-best-practices.md |
| authentication-system | authentication-system.md |
| effect-ts-patterns | effect-implementation.md |
| deployment-strategies | devops/deploy.md |
| internationalization | internationalization-system.md |
| skill-best-practices | skill-best-practices.md |
| doc-best-practices | doc-best-practices.md |
<a id="..."> anchors match all ToC entries## See Also at bottom with links to related docsInput: "Create a doc for the Hono API patterns in this project"
Expected: Agent places draft in /docs/server/hono-best-practices.md, includes H1,
intro, ToC with anchors, formatted with hyphens/ATX/fenced code, ends with
See Also. Notes that a companion skill already exists at skills/hono-best-practices/SKILL.md.
Input: "Review docs/devops/deploy.md for standards compliance"
Expected: Agent reads the file, outputs Passes / Gaps report without
modifying anything.
Input: "Should I put this in a skill or a doc?" Expected: Agent walks through the decision tree above and gives a context-specific recommendation.
Input: "Add a new section to docs/lint-best-practices.md"
Expected: Agent reads the file, outputs only the new section as fenced code,
explains the addition in one sentence.
tools
Zustand state management patterns for this project — store creation, selectors, Immer middleware, async actions with loading states, devtools, persist, and testing. Use when authoring or editing Zustand stores (use*Store files) or components that subscribe to stores. Do NOT use for React component structure or TypeScript-only utilities.
testing
How to write, update, or split skill files in this repo. Use when creating a new SKILL.md, updating an existing one, or deciding whether to put content in a skill vs. docs/.
development
Complete guide for testing React hooks — renderHook, Documentation by Harness, installStore, fixtures, subscription patterns, lint/compiler traps, and pre-completion checklist. Read docs/testing/unit-test-hook-best-practices.md for the full reference.
development
Vitest unit test authoring for this repo — setup, mocking, API handler testing, and common pitfalls for non-hook code. Use when the user asks to add, update, fix, or review unit tests for utilities, components, API handlers, or scripts. Do NOT use for React hook tests — load unit-test-hook-best-practices instead.