docs-writer-reference
БесплатноБез исполняемых скриптовНе проверенReference page structure, templates, and writing patterns for src/content/reference/. For components, see /docs-components. For code examples, see…
от reactjs★ 11 862 звезды на GitHubОб этом скилле
Reference Page Writer
Quick Reference
Page Type Decision Tree
- Is it a Hook? Use Type A (Hook/Function)
- Is it a React component (
<Something>)? Use Type B (Component) - Is it a compiler configuration option? Use Type C (Configuration)
- Is it a directive (
'use something')? Use Type D (Directive) - Is it an ESLint rule? Use Type E (ESLint Rule)
- Is it listing multiple APIs? Use Type F (Index/Category)
Component Selection
For component selection and patterns, invoke /docs-components.
Voice & Style
Voice: Authoritative technical reference writer Tone: Precise, comprehensive, neutral
For tone, capitalization, jargon, and prose patterns, invoke /docs-voice.
Do:
- Start with single-line description: "
useStateis a React Hook that lets you..." - Include Parameters, Returns, Caveats sections for every API
- Document edge cases most developers will encounter
- Use section dividers between major sections
- Include "See more examples below" links
- Be assertive, not hedging - "This is designed for..." not "This helps avoid issues with..."
- State facts, not benefits - "The callback always accesses the latest values" not "This helps avoid stale closures"
- Use minimal but meaningful names -
onEventoronTickoveronSomething
Don't:
- Skip the InlineToc component
- Omit error cases or caveats
- Use conversational language
- Mix teaching with reference (that's Learn's job)
- Document past bugs or fixed issues
- Include niche edge cases (e.g.,
thisbinding, rare class patterns) - Add phrases explaining "why you'd want this" - the Usage section examples do that
- Exception: Pitfall and DeepDive asides can use slightly conversational phrasing
Page Templates
Type A: Hook/Function
When to use: Documenting React hooks and standalone functions (useState, useEffect, memo, lazy, etc.)
---
title: hookName
---
<Intro>
`hookName` is a React Hook that lets you [brief description].
```js
const result = hookName(arg)
Reference {/reference/}
hookName(arg) {/hookname/}
Call hookName at the top level of your component to...
[signature example with annotations]
Parameters {/parameters/}
arg: Description of the parameter.
Returns {/returns/}
Description of return value.
Caveats {/caveats/}
- Important caveat about usage.
Usage {/usage/}
Common Use Case {/common-use-case/}
Explanation with Sandpack examples...
Troubleshooting {/troubleshooting/}
Common Problem {/common-problem/}
How to solve it...
---
### Type B: Component
**When to use:** Documenting React components (Suspense, Fragment, Activity, StrictMode)
```mdx
---
title: <ComponentName>
---
<Intro>
`<ComponentName>` lets you [primary action].
```js
<ComponentName prop={value}>
<Children />
</ComponentName>
Reference {/reference/}
<ComponentName> {/componentname/}
[Component purpose and behavior]
Props {/props/}
propName: Description of the prop...- optional
optionalProp: Description...
Caveats {/caveats/}
- [Caveats specific to this component]
**Key differences from Hook pages:**
- Title uses JSX syntax: `<ComponentName>`
- Uses `#### Props` instead of `#### Parameters`
- Reference heading uses JSX: `` ### `<ComponentName>` ``
---
### Type C: Configuration
**When to use:** Documenting React Compiler configuration options
```mdx
---
title: optionName
---
<Intro>
The `optionName` option [controls/specifies/determines] [what it does].
</Intro>
```js
{
optionName: 'value' // Quick example
}
Reference {/reference/}
optionName {/optionname/}
[Description of the option's purpose]
Type {/type/}
'value1' | 'value2' | 'value3'
Default value {/default-value/}
'value1'
Options {/options/}
'value1'(default): Description'value2': Description'value3': Description
Caveats {/caveats/}
- [Usage caveats]
---
### Type D: Directive
**When to use:** Documenting directives like 'use server', 'use client', 'use memo'
```mdx
---
title: "'use directive'"
titleForTitleTag: "'use directive' directive"
---
<RSC>
`'use directive'` is for use with [React Server Components](/reference/rsc/server-components).
</RSC>
<Intro>
`'use directive'` marks [what it marks] for [purpose].
```js {1}
function MyComponent() {
'use directive';
// ...
}
Reference {/reference/}
'use directive' {/use-directive/}
Add 'use directive' at the beginning of [location] to [action].
Caveats {/caveats/}
'use directive'must be at the very beginning...- The directive must be written with single or double quotes, not backticks.
- [Other placement/syntax caveats]
Установить docs-writer-reference в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл docs-writer-reference?
Reference page structure, templates, and writing patterns for src/content/reference/. For components, see /docs-components. For code examples, see /docs-sandpack.
Как установить скилл docs-writer-reference?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docs-writer-reference запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic