Skip to content
Star

Technical writing

Write documentation readers can use and trust, from a first install to the exact API contract.

Technical writing teaches an agent how to research, write and review documentation for your own component set. Use the same skill for Ghost maintenance, custom components and open-source contributions. Verify the content and executable examples first; layout and visual examples support the explanation.

Install and use

terminal

Ask your agent to use technical-writing with the current implementation, public types and the page you want to write. For example: “Document our saved-filter component’s actual API and one working example; explain who owns saving and what happens on failure.”

See Skills for agent selection and manual installation, or download the complete SKILL.md. Use Component design to build or review the component itself.

Match the page to the task

A setup guide starts with prerequisites, steps and a way to confirm success. A concept guide explains decisions and tradeoffs. An API reference gives exact inputs, outputs and behavior. Library guides teach installation, data, state and integration, linking component pages for appearance.

The component-page sequence below applies to components. It is not a template for every guide. Use a visual only when it helps explain appearance, anatomy or interaction; installation instructions and API contracts must remain usable as text and code.

Write for a capable reader

Write only what helps the reader choose, build or troubleshoot. Remove repetition and explanations the preview already provides. Start with the reader's task. Use familiar words, consistent names and a small working example. Explain an unfamiliar term once or link its definition. Keep the common path easy to scan and deeper contracts easy to find. Avoid “simply”, “obviously” and unsupported claims such as “fully accessible”.

A reader may know design and be new to React, or know React and be new to this interaction. Show the result, then explain how to change it. Precision and friendliness can coexist.

Research before drafting

Read the current public source, styles, direct demos and registry/package metadata. Inventory real parts, prop values/defaults, labels, state ownership and dependencies. Compare the closest Ghost alternatives. Consult current upstream behavior documentation where relevant; another library's API does not prove Ghost supports it.

Give each section one job

Use this sequence for a component page. Keep useful old anchor links when a heading changes.

  1. Preview: show one recognizable working task so the reader can decide whether this is the right component.
  2. Design guidance, when useful: explain consequential alternatives, composition and caller accessibility decisions.
  3. Installation: name the actual item, common setup and unusual dependencies.
  4. Basic usage: give the smallest usable import/composition, including labels and necessary state or data.
  5. Structures: show valid public nesting, required/optional parts and caller-owned content.
  6. Examples: teach one meaningful decision or state with a working result and exact source.
  7. API reference: state exact types, defaults, requiredness, callback payloads and state ownership.

Design guidance

Write a decision aid, not praise. “Use Checkbox for independent choices; use RadioGroup when one option must be chosen; use Switch for an immediate setting” helps a reader choose. “A flexible, accessible component” does not.

Compare alternatives only when a plausible caller could confuse them. Explain accessible naming, error association or focus composition where the caller must make the choice. Keep exhaustive props in the API reference. Omit this section when there is no useful additional decision.

Structures

Show the actual public anatomy and parent/child relationship. Explain which parts are required, which are optional and what content the caller supplies. A leaf can use one sentence. A compound component needs its useful nesting, including portal/context distinctions when they matter.

Structures is not a repository file tree or a flat export list. Do not invent a Root part or require optional wrappers merely to make pages look uniform.

Use one fully named public part per node: Dialog.Title, AudioPlayer.PlayPause, or ComposerInput. Keep the source API's naming style. Put optionality in parentheses, and show alternative parts as separate nodes.

For a prop-only component, use a capitalized component-prefixed slot label such as BannerTitle (title prop). Mark it as a plain structural label, not a code identifier or extra export. Clearly identify caller-owned content and native wrappers.

Examples

An example can demonstrate a component, pattern, block or template. A pattern explains a reusable solution. A block supplies a concrete task. Keep one source for each example and link to it from related pages. See UI architecture for the shared definitions.

Admit an example when it teaches a new caller decision, state or composition. Group ordinary values such as sizes into one comparison; give distinct behavior its own example. Show combinations only when they expose a concrete risk. A different business title does not make a new variant.

Use behavior-based headings such as “Multiple selection” or “With a description”. Keep realistic content inside the demo. A full ecommerce workflow belongs in a block or template. Preview source must reproduce the rendered configuration and include necessary state, data and example CSS.

Read each example heading outside its parent section. Prefer “Progress clock states” or “Progress circle composition” to repeated “States” or “Composition”. Keep specific task headings concise. Preserve the old anchor when changing a heading. Heading levels describe nesting; every documentation heading must be at least as large as the surrounding description.

API reference

Verify every stated value and default against source. Explain callback payloads and who owns the resulting state. Distinguish controlled values from initial defaults, approval from execution and pending work from success. Describe native attributes, refs and render composition only where the current owner supports them.

Per-component checklist

The author and reviewer own these six judgments. Resolve unclear guidance, incorrect anatomy, redundant examples and unsupported API claims before accepting a page. npm run docs:check protects that work by checking names, summaries, links, executable snippets and review freshness. Changes to the page, reviewed owner/demos or writing rules invalidate the recorded review.

Library guides instead teach setup, data, state/operations and API contracts. Link the component page for styling.

Review

Check meaning and source accuracy first; remove repetition second. Compile executable snippets in their declared language, resolve links and confirm install identities. Keep CSS, shell commands and TSX in separate code blocks. A working example must include its imports, helpers, data and necessary styles; do not make a placeholder renderer look copyable.

Read the result on a narrow screen as well as a desktop. Short alternatives and ordered steps usually work better as prose or lists. Keep tables for real comparisons, and make the values readable without forcing unnecessary sideways scrolling. Use diagrams for relationships and previews for appearance or interaction; a decorative image adds no technical explanation.

The installable skill includes the section decisions, editing examples and verification method in one file. The approach draws on Google Technical Writing and Diátaxis; the component section order is Ghost’s convention.

Note callouts

Use a note callout (also called an admonition) for useful context that readers can skip without losing the main instructions. The documentation composition is CharacterLegend: it uses Banner with role="note", a transparent ghost surface, and a friend with the existing gentle idle motion. Motion pauses offscreen and in hidden tabs, and respects reduced-motion preferences. Keep required setup and warnings in the main explanation.

Use Hex for alternate names and reference details, Lumi for ideas, Gosh for tips, Ember for a next step, and Jack for credits. On devices with a fine pointer and hover support, each Spirit callout uses its light or dark palette as the hovered background and switches the friend to outline. Leaving restores the transparent surface and filled character. Write the meaning in text; the character is decorative. A custom title names the note without creating a table-of-contents heading.

For alternate names, use “Also known as” as the note title. Put the aliases together in the first paragraph, then explain partial matches or capability limits in a separate paragraph. Keep the canonical name for imports and installation. Register discovery aliases in the shared component alias catalogue so search and alternate page URLs agree with the note.