Technical writing and deterministic verification skill
Produce high-density, scannable, mechanically verified technical writing across Markdown documentation, agent instructions, code comments, pull requests, issues, and Git commit messages.
Precedence over language-specific documentation skills
This skill governs prose diction, typography, Markdown AST structure, Diátaxis organization, pull requests, issues,
commit messages, and surface boundaries across README.md, CONTRIBUTING.md, AGENTS.md, .agents/, SKILL.md,
and llms.txt. When paired with a language skill such as golang-documentation, follow this skill for prose,
formatting, and file boundaries while delegating language-specific API comment syntax and testable ExampleXxx
functions to the language skill.
Core non-negotiable rules
- Ground every claim in code: Inspect CLI flag parsers, struct tags, configuration defaults, or
--helpoutput before documenting any behavior. Never document aspirational or unimplemented flags, environment variables, or paths. - Integrate holistically: Apply the Non-Accretion rule by reading the entire surrounding section before editing. Place changes into their proper architectural tier and reference table, and delete superseded prose rather than appending standalone notes or bullets to the bottom of a section.
- Dual representation: Represent interactive keybindings, CLI flags, subcommands, and environment variables both
conceptually in workflow prose and tabularly in a multi-column reference table. In multi-doc projects, place workflow
prose in user guides (
README.md,docs/*-guide.md) and consolidate lookup tables indocs/reference.md. Never use single-column tables. - Progressive user on-ramp (Diátaxis split): Keep
README.mdconcise, plain-English, and free of internal jargon. When a project outgrows ~200 lines or spans multiple subsystems, split user docs by intent:README.mdtutorial on-ramp,docs/How-to guides, unifieddocs/reference.md,CONTRIBUTING.md, anddocs/*-architecture.md. Relocate trimmed internals rather than dropping them. - One format per span and role discipline: Never stack bold, italics, inline code, or links on the same span.
Reserve backticks for literal code, commands, flags, paths, keys, and shortcuts; reserve
**...**for UI labels and run-in list headings followed by a colon (:); and reserve*...*for first-use term definitions and standalone work titles. Never bold first-column table cells in user or contributor docs. - Lead concise, list specifics (Inverted Pyramid): Open summaries and sections with one or two short sentences (one idea per sentence, roughly 15 to 25 words) stating the high-level takeaway. Extract embedded lists of three or more multi-word items into vertical bullets, and never repeat bullet details inside the lead paragraph.
- Clean typography and diction: Use sentence-case headings and table headers with no trailing punctuation. Wrap
tracked Markdown files at 120 columns, wrap VCS commit bodies at 72 columns, and leave web change-request and issue
prose unwrapped. Omit horizontal rules (
---), decorative emojis, ASCII or LaTeX arrows, prose slashes,&or+connectors, Latin abbreviations (e.g.,i.e.,etc.,vs.), optional plurals (file(s)), italic parenthetical asides, marketing buzzwords, preambles, and hardcoded personal paths.
Conditional reference loading
Load reference documents on demand rather than reading all files upfront:
| Task context | Reference file to load |
|---|---|
| Structuring tutorials, task guides, 4-tier architecture explanations, prose, or tables | style-guide.md |
Authoring or auditing README.md, CONTRIBUTING.md, AGENTS.md, SKILL.md, llms.txt, PRs, issues, or commits | surfaces.md |
Configuring .tw-lint.yaml, [OVERRIDE] or [WAIVE] rules, project vocabularies, or code-to-doc parity checks | overrides-and-sync.md |
Operational modes and deterministic verification
Resolve <skill-dir> as the directory containing this SKILL.md file, and invoke <skill-dir>/scripts/tw-lint from
any working directory. Run <skill-dir>/scripts/tw-lint doctor or setup when binaries or offline styles need
initialization.
Author and edit mode
-
Check the target repository's
AGENTS.md,.agents/rules/, and optional.tw-lint.yamlfor project overrides and domain terminology before editing. -
Verify all referenced commands, flags, keys, and paths against the codebase, then update all coupled surfaces such as
README.md,CONTRIBUTING.md,AGENTS.md,skills/, andllms.txtin the same changeset. -
Run deterministic verification on touched files and resolve every reported violation before finishing:
<skill-dir>/scripts/tw-lint docs README.md docs/ AGENTS.md -
If the target repository defines a local parity target (
make lintormake check), run it as well.
Audit and review mode
- Execute
<skill-dir>/scripts/tw-lint docs <target>first to collect deterministic Markdown AST,README.mdon-ramp (tw-readme-onramp), Vale prose, schema, and offline link findings. - Audit semantic compliance against style-guide.md and
surfaces.md: Diátaxis separation, beginner-friendly
README.mdon-ramp and jargon boundaries, Dual Representation across single- or multi-doc layouts, Non-Accretion cohesion, and code-verified accuracy. - Report findings grouped by severity:
- Blocking violations: Deterministic linter errors, inaccurate technical claims, or broken surface boundaries with path, line number, rule ID, and concrete fix.
- Non-blocking polish: Conciseness, structural flow, or clarity improvements prefixed with
Nit:. - Verified compliant areas: Summary of deterministic and semantic checks that passed.
Commit and change request mode
Validate every commit message (Chris Beams' 50/72 imperative rules) and change-request or pull-request title and
description before invoking git commit or submitting updates (such as gh pr create or gh pr edit). tw-lint pr
leaves prose unwrapped for web reflow while enforcing SentenceLength and EmbeddedListCommas as errors:
<skill-dir>/scripts/tw-lint commit --stdin <<'EOF'
Add offline anchor check to documentation linter
Validate intra-file and cross-file GitHub heading fragments via lychee
so renamed section headings fail CI before merge.
EOF
<skill-dir>/scripts/tw-lint pr --title "Add offline anchor check to documentation linter" --body-file pr-body.md