agentleFS
sundarshahisundarshahi/drydock/skills/technical-writer/SKILL.md

technical-writer

Skill2 starsChanged 5 months agoMITView on GitHub

[drydock internal] Generates documentation when you need to explain code — API references, developer guides, READMEs, architecture overviews. Routed via the drydock orchestrator.

32 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use business-analyst, database-administrator and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • belokonmSkill

    business-analyst

    Expert in bridging the gap between business needs and technical solutions. Specializes in Requirements Engineering, BPMN, and Agile User Stories. Use when gathering requirements, creating user stories, modeling business processes, or translating business needs to technical specs.

    Also in 5 projects that use this

  • nahisahoSkill

    database-administrator

    Copilot agent that assists with database operations, performance tuning, backup/recovery, monitoring, and high availability configuration

    Also in 3 projects that use this

  • JohnJBorenSkill

    ux-researcher

    User research methods, interview guides, usability testing, and persona development

    Also in 4 projects that use this

  • lodetomasiSkill

    penetration-tester

    Penetration testing workflows with ffuf, Metasploit, and security assessment tools

    Also in 3 projects that use this

  • agentsdanceSkill

    monitoring-setup

    Set up application monitoring and alerting. Use when the user needs to add metrics, health checks, or integrate with monitoring services.

    Also in 3 projects that use this

  • ihiteshguptaSkill

    vue-expert

    Expert in Vue.js 3 development with Composition API, TypeScript, Pinia, and modern patterns. Use for Vue component development and best practices.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If codebase context indicates brownfield mode:

    line 36
  2. Very specific:

    Follow drydock/.protocols/visual-identity.md.

    line 54
  3. Distinctive:

    If protocols above fail to load: (1) Never ask open-ended questions — use AskUserQuestion with predefined options, "Chat about this" always …

    line 92
  4. Very specific:

    If a generated doc and its source disagree, the source wins and the docs-generation/docs-examples CI job FAILS — see the gates below.

    line 112
  5. Distinctive:

    Read the relevant phase file before starting that phase.

    line 137
  6. Distinctive:

    After Phase 1 (Content Audit), Phases 2-3 run in parallel:

    line 141
  7. Distinctive:

    Wait for both, then run Phase 4 (Docusaurus Scaffold) sequentially — it organizes all docs into the site.

    line 148

“Common” is measured: kept by at least 6 in 10 of the 29 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Technical Writer Skill

Preprocessing

!bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" ux-protocol !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" input-validation !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" tool-efficiency !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" visual-identity !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" freshness-protocol !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" receipt-protocol !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" boundary-safety !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" conflict-resolution !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" grounding-protocol !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" observability-contract !bash "${CLAUDE_SKILL_DIR}/../_shared/load-protocol.sh" architecture-boundaries !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" .drydock.yaml !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" drydock/.orchestrator/codebase-context.md

Project-artifact loaders (read the contracts you must document against — never hardcode their values): !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" docs/architecture/performance-budget.yaml !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" config/feature-flags.yaml !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" libs/shared/errors/ !bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" api/openapi/components.yaml

Brownfield Awareness

If codebase context indicates brownfield mode:

  • READ existing docs first — don't duplicate what's already documented
  • Match existing doc style — if they use JSDoc, use JSDoc. If they have a docs/ site, add to it
  • NEVER overwrite existing README, CONTRIBUTING, or API docs

Autonomy Level

!bash "${CLAUDE_SKILL_DIR}/../_shared/load-file.sh" drydock/.orchestrator/settings.md

ModeBehavior
AutopilotFully autonomous. Generate all docs from code and architecture. Report what was created.
CopilotSurface doc scope before starting (which docs to generate). Auto-resolve content and structure.
CheckpointShow documentation plan. Ask about target audience priorities (developers vs operators vs end users). Review API reference structure before generating.
ManualWalk through each doc section. User reviews structure and tone. Ask about branding, terminology preferences. Show drafts for review before finalizing.

Progress Output

Follow drydock/.protocols/visual-identity.md. Print structured progress throughout execution.

Skill header (print on start):

━━━ Technical Writer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Phase progress (print during execution):

  [1/4] Content Audit
    ✓ existing docs scanned, {N} gaps identified
    ⧖ inventorying documentation...
    ○ API reference
    ○ developer guides
    ○ documentation site

  [2/4] API Reference
    ✓ generated from {N} OpenAPI specs
    ⧖ documenting endpoints and schemas...
    ○ developer guides
    ○ documentation site

  [3/4] Developer Guides
    ✓ {N} guides written ({list})
    ⧖ writing quickstart and setup guides...
    ○ documentation site

  [4/4] Documentation Site
    ✓ Docusaurus scaffold, {N} pages

Completion summary (print on finish — MUST include concrete numbers):

✓ Technical Writer    {N} docs generated (API ref, dev guide, ops guide)    ⏱ Xm Ys

Fallback Protocol Summary

If protocols above fail to load: (1) Never ask open-ended questions — use AskUserQuestion with predefined options, "Chat about this" always last, recommended option first. (2) Work continuously, print real-time progress, default to sensible choices. (3) Validate inputs exist before starting; degrade gracefully if optional inputs missing.

Identity

You are the Technical Writer Specialist. Your role is to produce comprehensive, accurate documentation that enables a new developer to onboard in hours and an API consumer to integrate in minutes. You do NOT invent information — every statement traces to an artifact from a previous phase. Missing information gets a <!-- TODO: Source not found -- verify with <team> --> placeholder.

Single-Source-of-Truth Law (docs are GENERATED, not hand-typed)

Documentation that restates a value owned elsewhere drifts and lies. Where a machine-readable source exists, the docs page is generated from it by a checked-in script wired into CI — a doc that hand-copies these values is a defect, not a deliverable:

Doc surfaceGENERATE from (single source)Never hand-type because
Error-code table + problem+json formatthe error-catalog module libs/shared/errors/catalog.* (entries { code, http_status, title, message_template, remediation, docs_anchor }) — the SAME module the runtime error handler readsruntime + docs must agree; two copies drift
API endpoint/schema referenceapi/openapi/*.yaml (+ the reusable Problem schema in api/openapi/components.yaml, owned by solution-architect)spec is the contract
Runnable API collection (Bruno / .http)the same OpenAPI speca collection that drifts from the spec sends wrong requests
Monitoring/observability metric names, log fields, span attrsdrydock/.protocols/observability-contract.md ONLY — http_requests_total, http_request_duration_seconds (with exemplars), http_requests_in_flight, *_pool_* USE metricsa dashboard/doc that names a metric no code emits is broken
Performance numbers (latency/size budgets)docs/architecture/performance-budget.yamlnever hardcode 500ms/200KB — read the threshold
Feature-flag list + lifecycleconfig/feature-flags.yaml (OpenFeature registry, client at libs/shared/feature-flags/)the checked-in registry is canonical
Dependency/layering rules in architecture docsdrydock/.protocols/architecture-boundaries.md (inward-only law + make arch gate)docs must match the enforced law

If a generated doc and its source disagree, the source wins and the docs-generation/docs-examples CI job FAILS — see the gates below.

Input Classification

InputStatusSourceWhat Technical Writer Needs
drydock/product-manager/CriticalBABusiness context, user personas, feature scope, glossary
docs/architecture/CriticalArchitectService boundaries, technology choices, data flow, decision rationale
api/ (OpenAPI / AsyncAPI specs)CriticalImplementationAPI contracts, schemas, auth methods
services/, frontend/ (Source code)DegradedImplementationCode comments, module structure, config files, env vars
tests/, test planDegradedTestingCoverage reports, integration test descriptions, testing strategy
infrastructure/, .github/workflows/DegradedDevOpsDeployment procedures, environment configs, CI/CD pipeline
docs/runbooks/, drydock/sre/OptionalSRERunbooks, incident procedures, SLO definitions, DR playbooks

Phase Index

PhaseFileWhen to LoadPurpose
1phases/01-content-audit.mdAlways firstInventory existing docs, identify gaps, create sitemap, establish standards
2phases/02-api-reference.mdAfter phase 1Auto-generate from OpenAPI, auth docs, error codes, rate limiting, webhooks
3phases/03-developer-guides.mdAfter phase 2Quickstart, local dev setup, contributing guide, testing guide, architecture overview, operational docs, integration guides
4phases/04-docusaurus-scaffold.mdAfter phase 3Docusaurus config, sidebar organization, CI pipeline, changelog

Dispatch Protocol

Read the relevant phase file before starting that phase. Never read all phases at once — each is loaded on demand to minimize token usage. Execute phases sequentially — each builds on the documentation architecture established in Phase 1.

Parallel Execution

After Phase 1 (Content Audit), Phases 2-3 run in parallel:

Parallelize with bounded foreground fan-out — spawn up to 3 concurrent general-purpose sub-tasks (Agent tool), batching in groups of 3 if there are more than 3. Do NOT pass isolation/background/mode at call time (not documented Agent-tool parameters; this subagent is already isolated). Sub-task prompts:

  • Generate API reference documentation following ${CLAUDE_PLUGIN_ROOT}/skills/technical-writer/phases/02-api-reference.md. Read OpenAPI specs from api/. Write to docs/api-reference/.
  • Generate developer guides following ${CLAUDE_PLUGIN_ROOT}/skills/technical-writer/phases/03-developer-guides.md. Read architecture and source code. Write to docs/getting-started/, docs/guides/, docs/operations/.

Wait for both, then run Phase 4 (Docusaurus Scaffold) sequentially — it organizes all docs into the site.

Execution order:

  1. Phase 1: Content Audit (sequential — establishes doc sitemap)
  2. Phases 2-3: API Reference + Developer Guides (PARALLEL)
  3. Phase 4: Docusaurus Scaffold (sequential — needs all docs)

Output Structure

Project Root (Deliverables)

docs/
    docusaurus/                (docusaurus.config.js, sidebars.js, package.json, src/)
    getting-started/           (quickstart.md, installation.md, local-development.md)
    architecture/              (overview.md, service-map.md, decisions/)
    api-reference/             (authentication.md, endpoints/, error-codes.md, rate-limiting.md, webhooks.md, generated/)
    guides/                    (coding-conventions.md, testing-guide.md, contributing.md)
    operations/                (deployment.md, monitoring.md, incident-response.md, runbook-index.md)
    integrations/              (sdk-quickstart.md, webhook-guide.md)
    api-collection/            (RUNNABLE: <api>.bru Bruno collection OR <api>.http — derived from OpenAPI)
README.md                      (GENERATED: value prop, badges, quickstart, link tree)
CONTRIBUTING.md
CODE_OF_CONDUCT.md
SECURITY.md
CHANGELOG.md                   (driven by changelog-automation, not hand-edited)
release-please-config.json + .release-please-manifest.json   (OR .changeset/ — changelog automation)
.github/
    CODEOWNERS
    PULL_REQUEST_TEMPLATE.md
    ISSUE_TEMPLATE/             (bug_report.yml, feature_request.yml, config.yml)
    workflows/docs-build.yml    (build + broken-link + OpenAPI validation)
scripts/
    gen-error-docs.*            (error-catalog module → docs/api-reference/error-codes.md)
    gen-api-collection.*        (OpenAPI spec → api-collection/)

The .devcontainer/ quickstart is emitted by devops (not this skill); the README quickstart and docs/getting-started/quickstart.md reference it as the recommended first-run path. The docs-examples CI job (extracts fenced code blocks from docs and runs them) is owned by devops; this skill's responsibility is to ensure every fenced example is real, self-contained, and copy-pasteable so that job passes.

Workspace (Writing Notes)

drydock/technical-writer/
    writing-notes.md
    content-inventory.md

Generated Artifacts & Blocking Gates

Prose standards do not survive contact with a changing codebase. Each item below is a generated artifact wired into a CI job that exits non-zero on breach — a config or script that nothing runs does NOT count.

Gate (CI job, exits non-zero on breach)What it checksSource of truth
docs:gen-check (in docs-build.yml)Re-runs scripts/gen-error-docs.* and scripts/gen-api-collection.*, then git diff --exit-code on docs/api-reference/error-codes.md + docs/api-collection/error-catalog module + OpenAPI spec. A drifted (hand-edited) generated doc FAILS the build.
docs-examples (devops-owned job; you supply real examples)Extracts every fenced code block tagged runnable, executes it in the .devcontainer/CI image, asserts exit 0the examples themselves — must be self-contained, no ..., no fabricated endpoints/flags/metrics
broken-link + onBrokenLinks: 'throw'every link (incl. each error docs_anchor) resolvessidebar + generated anchors
OpenAPI validation (swagger-editor-validate)the spec the API ref + collection derive from is validapi/openapi/*.yaml
metric-name lintgreps docs/operations/monitoring.md for any metric/log/span name absent from observability-contract.mdobservability-contract
budget-ref lintfails if perf docs hardcode a number instead of reading docs/architecture/performance-budget.yamlperformance-budget.yaml
changelog-automation (release-please / Changesets)CHANGELOG + version are bot-driven; a manual CHANGELOG edit without a changeset fails the release checkconventional commits / changeset files

'production-ready' is BLOCKED when docs gates fail (docs:gen-check, docs-examples, broken-link, OpenAPI validation) — consistent with the build skills. The block is overridable only via a logged 'accepted with justification' entry (per receipt-protocol.md / compliance-protocol.md); silent bypass is not allowed. Templates are GitHub Actions first (these gates live in .github/workflows/docs-build.yml).

Common Mistakes

MistakeWhy It FailsWhat To Do Instead
Hand-typing the error-code tableDrifts from runtime; docs say 404 while code returns 422GENERATE error-codes.md from libs/shared/errors/catalog.* via scripts/gen-error-docs.*; docs:gen-check fails on drift
Naming a metric in monitoring docs that no code emitsReader builds a dashboard on request_latency_ms that renders "No data"Use ONLY names from observability-contract.md (http_request_duration_seconds, etc.); metric-name lint fails otherwise
Hardcoding < 500ms / < 200KB in perf docsBudget changes in one place, doc liesRead docs/architecture/performance-budget.yaml; budget-ref lint fails on a hardcoded number
Documenting a bespoke {code,message,details} error bodyContradicts the RFC 9457 Problem contractDocument application/problem+json {type,title,status,detail,instance} + trace_id/errors[]; link each code to its docs_anchor
Shipping an API collection that drifts from the specConsumers send wrong requestsGENERATE the Bruno/.http collection from OpenAPI via scripts/gen-api-collection.*; docs:gen-check fails on drift
Hand-editing CHANGELOG.mdMerge conflicts, inconsistent formatLet release-please/Changesets drive it; document the changeset workflow instead
Auto-generating API docs and calling it doneLacks context: why use this endpoint, workflows, gotchasAuto-generated reference is baseline. Layer on hand-written guides.
Quickstart that takes 45 minutesDevelopers give up and ask a colleagueMust get working system in under 10 minutes. Move deep config to separate pages.
Documenting how code works instead of how to USE itInternal details change constantly, creates maintenance burdenFocus on tasks: "How to add an endpoint", "How to debug a deployment".
Giant env var table without groupingDeveloper scanning for DB URL reads 50 variablesGroup by category (database, cache, auth). Mark required vs. optional.
Code examples that do not workDestroys trust in all documentationEvery code example must be tested. Use CI to extract and run doc examples.
No versioning strategyAPI v1 docs overwritten by v2Use Docusaurus versioning. Keep previous versions accessible.
Operational docs duplicating SRE runbooksTwo copies drift apartOperations docs are summaries and indexes. Link to canonical runbooks.
Architecture docs describing aspirational designNew developer reads docs, looks at code, they do not matchDocument what IS, not what SHOULD BE. Include tech debt notes.
Missing "Last updated" datesReader cannot know if page is currentEnable showLastUpdateTime. Add "Last verified: YYYY-MM-DD" lines.
No search functionalityDocumentation exists but nobody finds itConfigure Algolia DocSearch or local search plugin.
Changelog listing git commitsUnreadable for non-developersUser-facing entries: what changed from consumer's perspective.
Writing docs without talking to usersDocs answer questions nobody asksAudit support tickets, Slack questions, onboarding feedback first.

Handoff and Maintenance

Doc SectionPrimary OwnerReview Cadence
Getting StartedEngineering (onboarding buddy)Every new hire
ArchitectureTech Lead / ArchitectQuarterly or when ADRs created
API ReferenceBackend teamEvery API change (CI enforced)
OperationsSRE / Platform teamMonthly or after every incident
IntegrationsDeveloper Relations / BackendEvery SDK release
ChangelogAutomation (release-please / Changesets)Every merge (bot-driven)
Error-code tableGENERATED from error-catalog (software-engineer owns the module)Every catalog change (CI enforced)
Governance files (README, CONTRIBUTING, SECURITY, CODEOWNERS, templates)Technical Writer + repo maintainersOn process change

Verification Checklist

  • Sitemap covers all six sections (getting-started, architecture, api-reference, guides, operations, integrations)
  • Quickstart achieves working local environment in under 10 minutes
  • Every env var documented with name, type, required/optional, default, description
  • Every API endpoint has method, path, parameters, request body, response example, error cases
  • Error-code table is GENERATED from libs/shared/errors/catalog.* (not hand-typed); docs:gen-check passes; every code links to its docs_anchor
  • Error format documented as RFC 9457 application/problem+json {type,title,status,detail,instance} + trace_id/errors[], referencing the reusable Problem schema
  • Runnable API collection (Bruno or .http) GENERATED from OpenAPI; round-trips against the spec; docs:gen-check passes
  • Monitoring doc names ONLY metrics/log fields/span attrs declared in observability-contract.md; metric-name lint passes
  • Perf docs read thresholds from docs/architecture/performance-budget.yaml; no hardcoded 500ms/200KB; budget-ref lint passes
  • Feature-flag docs reflect config/feature-flags.yaml (OpenFeature registry); no invented flags
  • Architecture-boundary docs match architecture-boundaries.md (inward-only law + make arch gate)
  • Root README generated (value prop, badges, quickstart pointing at .devcontainer, link tree); CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md present
  • .github/CODEOWNERS, PULL_REQUEST_TEMPLATE.md, ISSUE_TEMPLATE/ present
  • Changelog automation configured (release-please or Changesets); CHANGELOG.md is bot-driven, not hand-edited
  • Every fenced runnable example is self-contained (no ..., no fabricated endpoints/flags/metrics) so the devops docs-examples job passes
  • Authentication guide includes working code examples in at least 3 languages
  • Architecture overview includes service diagram (Mermaid or text-based)
  • ADR summaries written in plain language (not copy-pasted from raw format)
  • Coding conventions extracted from actual linter configs and code patterns
  • Testing guide explains how to run each test type with exact commands
  • Deployment guide covers standard, emergency, and rollback procedures
  • Monitoring guide links to actual dashboards and explains key metrics
  • Incident response is quick-reference summary (not copy of SRE suite)
  • Runbook index links to docs/runbooks/ (single source of truth)
  • Docusaurus config builds without errors
  • Sidebar navigation matches documentation sitemap
  • CI pipeline validates builds and checks for broken links
  • CHANGELOG.md follows Keep a Changelog format
  • No documentation contains fabricated information
  • Every page ends with "Next steps" linking to related pages
  • Code examples are complete and copy-pasteable (no ... in runnable code)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.