Skip to content

Commit c1fc60e

Browse files
committed
Add documentation skill
1 parent c9cc183 commit c1fc60e

3 files changed

Lines changed: 83 additions & 0 deletions

File tree

skills/write-docs/SKILL.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: write-docs
3+
description: Create or revise documentation for the simple-stack repository, especially MDX guides and API reference content under www/src/content/docs/. Use when asked to write docs, restructure guides, add examples, or enforce documentation tone, structure, and code highlighting conventions.
4+
---
5+
6+
# Write Docs
7+
8+
## Overview
9+
10+
Write clear, progressive documentation for this repository using the existing Starlight + MDX docs setup. Favor stepwise examples, explicit usefulness, and consistent tone.
11+
12+
## Workflow
13+
14+
1. Locate the target doc or create a new MDX file under `www/src/content/docs/`.
15+
2. Follow the style reference in `references/docs-style.md`.
16+
3. Start each feature or API section with: what it does, why it is useful, then an example.
17+
4. Build examples incrementally (naive first, then improvements and features).
18+
5. Use Starlight code line highlighting (`ins`, `del`, `{n-m}`) to emphasize changes while keeping full context.
19+
6. Keep guide content and API reference content clearly separated by headings or separate docs.
20+
21+
## House style essentials
22+
23+
- Use second-person voice and consistent terminology.
24+
- Avoid emojis, slang, or playful narration.
25+
- Prefer short, direct sentences and descriptive headings.
26+
27+
## References
28+
29+
- Read `references/docs-style.md` for the full style guide and code highlighting examples.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Documentation style guide
2+
3+
Use this reference when writing or editing docs in this repository.
4+
5+
## Core principles
6+
7+
- Use progressive disclosure: start simple, add complexity only when needed.
8+
- Build examples step by step; do not jump to the final solution.
9+
- Start with a naive implementation, call out its problems, then refactor and layer features.
10+
- Provide full code context but highlight only the lines that matter.
11+
- Keep tone consistent and direct. Use second person. Avoid emojis and colloquial phrasing.
12+
- For each feature or API, lead with: what it does, why it is useful, then an example.
13+
- Separate guides from API reference. Keep the distinction explicit in headings or sections.
14+
15+
## Example structure for a guide section
16+
17+
1. What it does (one or two sentences).
18+
2. Why it is useful (intent-driven use cases).
19+
3. Naive example (minimal, working).
20+
4. Limitations of the naive approach.
21+
5. Improved approach (refactor).
22+
6. Add features one at a time (each with a short explanation).
23+
24+
## Code sample emphasis
25+
26+
Use Starlight line highlighting so the reader can see the change without losing context. You may highlight lines in a standalone example, or use `ins` for additive examples:
27+
28+
```mdx
29+
```ts {3-4}
30+
import { thing } from "@pkg";
31+
32+
const value = thing();
33+
```
34+
```
35+
36+
Use `ins` and `del` consistently when showing refactors:
37+
38+
```mdx
39+
```ts del={2} ins={3}
40+
const value = oldThing();
41+
const value = newThing();
42+
```
43+
```
44+
45+
## Consistent language
46+
47+
- Use second person ("you can", "you should", "you might").
48+
- Use consistent terms for functions and signatures (e.g., always write `foo()` with parentheses).
49+
- Keep headings and callouts neutral and descriptive.
50+
51+
## Where docs live
52+
53+
- Guides live in `www/src/content/docs/` and are written in MDX for Starlight.
54+
- API reference can be a section in a guide or a separate doc collection, but keep the separation explicit.

write-docs.skill

1.85 KB
Binary file not shown.

0 commit comments

Comments
 (0)