Technical documentation
Create accurate, useful, and accessible technical documentation. Follow
project-specific writing rules first, then this skill, then the Google developer
documentation style guide.
Start with a documentation contract
Before drafting, determine the following information from the request and the
available project context:
- Audience and assumed technical knowledge
- Reader's goal or question
- Document type
- Product, API, or software version
- Prerequisites and environment
- Scope and explicit exclusions
- Evidence that the reader succeeded
Ask a focused question only when a missing answer would materially change the
document. Otherwise, make the smallest reasonable assumption and state it
briefly.
Ground the content
Inspect the relevant source code, API schema, commands, tests, user interface,
configuration, and existing documentation before writing. Prefer primary
sources and behavior that you can verify.
Never invent any of the following details:
- Commands, flags, parameters, endpoints, or configuration keys
- Default values, limits, permissions, or compatibility claims
- Output, error messages, side effects, or recovery behavior
- Version support, deprecation status, or security guarantees
If a detail cannot be verified, label it as an assumption or omit it. Preserve
important project terminology even when a different term might sound better.
Choose the document type
Use the structure that matches the reader's need:
- Tutorial: help a learner complete a guided, end-to-end experience.
- How-to guide: help a reader complete one practical goal.
- Concept: explain how or why something works.
- Reference: provide precise facts that readers can scan and look up.
- Troubleshooting guide: connect symptoms to causes, diagnostics, and
recovery steps.
- README: explain the project's purpose and provide the shortest path to a
working result.
- Release note: explain a user-visible change, its impact, and any required
action.
For ready-to-use outlines, read
document patterns.
Draft for task completion
Lead with what the document helps the reader do or understand. Put critical
information before background details.
For task-oriented documents:
- State the outcome.
- List prerequisites before the procedure.
- Present steps in the order that the reader performs them.
- Include commands and code where they are needed.
- Explain how to verify success.
- Add troubleshooting only for likely or costly failures.
- End when the reader has achieved the stated outcome.
For conceptual and reference documents, organize information around reader
questions and lookup tasks, not the internal structure of the implementation.
Apply the writing rules
Use these defaults unless project-specific guidance requires otherwise:
- Write in a conversational, respectful, and direct tone.
- Address the reader as "you." Use imperative verbs for instructions.
- Prefer active voice and present tense.
- Use simple, precise words and consistent terminology.
- Keep sentences focused. Aim for fewer than 26 words when practical.
- Give each paragraph one main idea and put that idea first.
- Remove throat-clearing, repetition, filler, and unnecessary background.
- Define unfamiliar abbreviations on first use.
- Avoid idioms, jokes, slang, buzzwords, and culture-specific references.
- Avoid claims such as "easy," "simple," "obvious," or "just."
- Avoid placeholder phrases such as "please note" and "at this time."
- Use inclusive language and examples that work for a global audience.
Read Google style guidance when you need
detailed rules or source links.
Write headings and structure
- Use sentence case for titles and headings.
- Use a unique level-1 heading for the page title.
- Keep the heading hierarchy logical; don't skip levels.
- Start task headings with a bare verb, such as "Create an API key."
- Use noun phrases for conceptual headings, such as "API key lifecycle."
- Use
Optional: at the start of an optional section heading.
- Avoid links, sequence numbers, and unnecessary punctuation in headings.
- Add content between a parent heading and its first child heading.
Make the page scannable with short sections, informative headings, lists, and
tables only where those structures improve comprehension.
Write procedures
- Use a numbered list when order matters.
- Start every step with an imperative verb.
- Put the location or context before the action.
- Keep one main action in each step.
- Put a goal before its action and a result after its action.
- Start optional steps with
Optional:.
- Use bullets instead of a numbered list for a single-step procedure.
- Keep list items parallel in grammar, capitalization, and punctuation.
- Don't repeat a procedure when a precise link can reuse it safely.
Include enough context for the reader to act, but don't explain obvious UI
gestures or implementation details that don't affect the task.
Present code and technical elements
- Introduce every code sample and explain its purpose.
- Prefer minimal, runnable examples over fragments that hide required context.
- Follow the project's code style and use a language identifier on fenced code
blocks.
- Keep commands copyable. Separate commands from their output.
- Explain placeholders immediately after the sample.
- Use uppercase snake case for placeholders, such as
PROJECT_ID.
- Use code font for commands, filenames, paths, methods, fields, and literal
values.
- Use bold for visible UI labels, such as Save.
- Don't use screenshots for code, terminal output, or essential text.
- Verify examples when the environment permits it.
Create useful links
- Use short, descriptive link text that makes sense out of context.
- Link to the most specific relevant page or section.
- Provide brief context locally instead of sending the reader elsewhere for a
small fact.
- Avoid vague link text such as "click here," "this page," or raw URLs.
- Explain downloads, new windows, or other unexpected link behavior.
- Avoid duplicate links unless distant sections need separate entry points.
Make the document accessible and global
- Don't rely on color, position, size, or images alone to convey meaning.
- Provide meaningful alt text for informative images and empty alt text for
decorative images.
- Use semantic headings, lists, tables, and HTML elements.
- Use descriptive labels and link text that remain clear to screen-reader users.
- Avoid directional references such as "above," "below," or "on the right."
- Use unambiguous dates, times, units, and examples.
- Avoid figurative, violent, ableist, and unnecessarily gendered language.
- Don't encode essential information only in a table, image, audio file, or
video.
Review in separate passes
Review the draft in this order:
- Technical accuracy: verify behavior, names, versions, commands, and
examples against primary sources.
- Task completion: confirm that the reader can reach and verify the stated
outcome.
- Structure: check the document type, information order, headings, and
navigation.
- Clarity: remove ambiguity, passive voice, excessive words, and undefined
terminology.
- Accessibility and inclusion: check links, images, semantic structure,
language, and global usability.
- Consistency: check terminology, formatting, capitalization, and list
structure.
For a detailed final pass, read the
documentation review checklist.
Deliver the result
When writing or rewriting documentation, return the publication-ready content
unless the user requests commentary. Preserve valid project conventions and
explain only material assumptions, unresolved accuracy gaps, or intentional
departures from local style.
When reviewing documentation, prioritize findings that affect correctness,
task completion, safety, accessibility, or comprehension. Cite the exact
section and propose a concrete replacement. Don't report subjective preferences
as defects.
Source hierarchy
Apply sources in this order:
- Project-specific style, terminology, and templates
- Verified product behavior and primary technical sources
- This skill
- Google developer documentation style guide
- Relevant language or publishing standards
Depart from a style recommendation when doing so makes the content clearer or
more accurate for the intended reader. Apply that departure consistently.
1---2name: technical-documentation3description: Use this skill when the user wants to write, rewrite, structure, or review technical documentation for software developers. Covers READMEs, tutorials, how-to guides, concepts, API references, troubleshooting guides, release notes, and documentation audits. Trigger for requests to document a feature, improve docs, explain an API, create setup instructions, or review documentation quality, even when the user does not name a style guide.4license: Apache-2.05---67# Technical documentation89Create accurate, useful, and accessible technical documentation. Follow10project-specific writing rules first, then this skill, then the Google developer11documentation style guide.1213## Start with a documentation contract1415Before drafting, determine the following information from the request and the16available project context:1718- Audience and assumed technical knowledge19- Reader's goal or question20- Document type21- Product, API, or software version22- Prerequisites and environment23- Scope and explicit exclusions24- Evidence that the reader succeeded2526Ask a focused question only when a missing answer would materially change the27document. Otherwise, make the smallest reasonable assumption and state it28briefly.2930## Ground the content3132Inspect the relevant source code, API schema, commands, tests, user interface,33configuration, and existing documentation before writing. Prefer primary34sources and behavior that you can verify.3536Never invent any of the following details:3738- Commands, flags, parameters, endpoints, or configuration keys39- Default values, limits, permissions, or compatibility claims40- Output, error messages, side effects, or recovery behavior41- Version support, deprecation status, or security guarantees4243If a detail cannot be verified, label it as an assumption or omit it. Preserve44important project terminology even when a different term might sound better.4546## Choose the document type4748Use the structure that matches the reader's need:4950- **Tutorial**: help a learner complete a guided, end-to-end experience.51- **How-to guide**: help a reader complete one practical goal.52- **Concept**: explain how or why something works.53- **Reference**: provide precise facts that readers can scan and look up.54- **Troubleshooting guide**: connect symptoms to causes, diagnostics, and55 recovery steps.56- **README**: explain the project's purpose and provide the shortest path to a57 working result.58- **Release note**: explain a user-visible change, its impact, and any required59 action.6061For ready-to-use outlines, read62[document patterns](references/document-patterns.md).6364## Draft for task completion6566Lead with what the document helps the reader do or understand. Put critical67information before background details.6869For task-oriented documents:70711. State the outcome.722. List prerequisites before the procedure.733. Present steps in the order that the reader performs them.744. Include commands and code where they are needed.755. Explain how to verify success.766. Add troubleshooting only for likely or costly failures.777. End when the reader has achieved the stated outcome.7879For conceptual and reference documents, organize information around reader80questions and lookup tasks, not the internal structure of the implementation.8182## Apply the writing rules8384Use these defaults unless project-specific guidance requires otherwise:8586- Write in a conversational, respectful, and direct tone.87- Address the reader as "you." Use imperative verbs for instructions.88- Prefer active voice and present tense.89- Use simple, precise words and consistent terminology.90- Keep sentences focused. Aim for fewer than 26 words when practical.91- Give each paragraph one main idea and put that idea first.92- Remove throat-clearing, repetition, filler, and unnecessary background.93- Define unfamiliar abbreviations on first use.94- Avoid idioms, jokes, slang, buzzwords, and culture-specific references.95- Avoid claims such as "easy," "simple," "obvious," or "just."96- Avoid placeholder phrases such as "please note" and "at this time."97- Use inclusive language and examples that work for a global audience.9899Read [Google style guidance](references/google-style-guide.md) when you need100detailed rules or source links.101102## Write headings and structure103104- Use sentence case for titles and headings.105- Use a unique level-1 heading for the page title.106- Keep the heading hierarchy logical; don't skip levels.107- Start task headings with a bare verb, such as "Create an API key."108- Use noun phrases for conceptual headings, such as "API key lifecycle."109- Use `Optional:` at the start of an optional section heading.110- Avoid links, sequence numbers, and unnecessary punctuation in headings.111- Add content between a parent heading and its first child heading.112113Make the page scannable with short sections, informative headings, lists, and114tables only where those structures improve comprehension.115116## Write procedures117118- Use a numbered list when order matters.119- Start every step with an imperative verb.120- Put the location or context before the action.121- Keep one main action in each step.122- Put a goal before its action and a result after its action.123- Start optional steps with `Optional:`.124- Use bullets instead of a numbered list for a single-step procedure.125- Keep list items parallel in grammar, capitalization, and punctuation.126- Don't repeat a procedure when a precise link can reuse it safely.127128Include enough context for the reader to act, but don't explain obvious UI129gestures or implementation details that don't affect the task.130131## Present code and technical elements132133- Introduce every code sample and explain its purpose.134- Prefer minimal, runnable examples over fragments that hide required context.135- Follow the project's code style and use a language identifier on fenced code136 blocks.137- Keep commands copyable. Separate commands from their output.138- Explain placeholders immediately after the sample.139- Use uppercase snake case for placeholders, such as `PROJECT_ID`.140- Use code font for commands, filenames, paths, methods, fields, and literal141 values.142- Use bold for visible UI labels, such as **Save**.143- Don't use screenshots for code, terminal output, or essential text.144- Verify examples when the environment permits it.145146## Create useful links147148- Use short, descriptive link text that makes sense out of context.149- Link to the most specific relevant page or section.150- Provide brief context locally instead of sending the reader elsewhere for a151 small fact.152- Avoid vague link text such as "click here," "this page," or raw URLs.153- Explain downloads, new windows, or other unexpected link behavior.154- Avoid duplicate links unless distant sections need separate entry points.155156## Make the document accessible and global157158- Don't rely on color, position, size, or images alone to convey meaning.159- Provide meaningful alt text for informative images and empty alt text for160 decorative images.161- Use semantic headings, lists, tables, and HTML elements.162- Use descriptive labels and link text that remain clear to screen-reader users.163- Avoid directional references such as "above," "below," or "on the right."164- Use unambiguous dates, times, units, and examples.165- Avoid figurative, violent, ableist, and unnecessarily gendered language.166- Don't encode essential information only in a table, image, audio file, or167 video.168169## Review in separate passes170171Review the draft in this order:1721731. **Technical accuracy**: verify behavior, names, versions, commands, and174 examples against primary sources.1752. **Task completion**: confirm that the reader can reach and verify the stated176 outcome.1773. **Structure**: check the document type, information order, headings, and178 navigation.1794. **Clarity**: remove ambiguity, passive voice, excessive words, and undefined180 terminology.1815. **Accessibility and inclusion**: check links, images, semantic structure,182 language, and global usability.1836. **Consistency**: check terminology, formatting, capitalization, and list184 structure.185186For a detailed final pass, read the187[documentation review checklist](references/review-checklist.md).188189## Deliver the result190191When writing or rewriting documentation, return the publication-ready content192unless the user requests commentary. Preserve valid project conventions and193explain only material assumptions, unresolved accuracy gaps, or intentional194departures from local style.195196When reviewing documentation, prioritize findings that affect correctness,197task completion, safety, accessibility, or comprehension. Cite the exact198section and propose a concrete replacement. Don't report subjective preferences199as defects.200201## Source hierarchy202203Apply sources in this order:2042051. Project-specific style, terminology, and templates2062. Verified product behavior and primary technical sources2073. This skill2084. [Google developer documentation style guide](https://developers.google.com/style)2095. Relevant language or publishing standards210211Depart from a style recommendation when doing so makes the content clearer or212more accurate for the intended reader. Apply that departure consistently.