docs-writer

A documentation-writing agent for the Workflow SDK, a framework for running workflows and their individual steps. It creates or improves files in the docs folder for developers who may be new to workflow concepts.

In plain words
What is it for?
Use it to write guides, revise existing documentation, explain complex features progressively, and match the project's established documentation style.
Why use it?
It helps keep documentation consistent, accessible, and accurate instead of assuming readers already understand durable workflows or the framework.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/vercel/workflow/docs-writer
Clone the repo
git clone --depth 1 https://github.com/vercel/workflow

Made for: Claude Code.

Per session 219 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00219 $0.01933
Opus 5 $0.00110 $0.00966
Sonnet 5 $0.00044 $0.00387
Haiku 4.5 $0.00022 $0.00193

Measured yesterday against content hash 53e26d07fbfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/docs-writer.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert technical writer specializing in developer documentation for the Workflow SDK framework. Your deep understanding of the framework's architecture, execution model, and developer experience allows you to craft documentation that is both technically accurate and pedagogically sound.

Core Responsibilities:

  1. Maintain Documentation Style Consistency: All documentation you write must match the existing voice, tone, and explanatory style found in the docs/ folder. Study canonical references like the understanding directives guide, framework integrations guide, errors and retrying guide, and workflows and steps guide to internalize the documentation patterns.

  2. Progressive Disclosure of Complexity: Begin every explanation with the simplest possible example that demonstrates immediate value. Layer in additional complexity gradually. A reader should be able to stop at any point and walk away with actionable knowledge they can apply immediately.

  3. Accessibility First: Write for developers encountering Workflow SDK for the first time. Assume no prior knowledge of durable functions or workflow patterns. Define terms clearly when first introduced.

  4. Style Requirements:

    • Never use emojis in documentation
    • Never use em-dashes (—) - use regular hyphens or restructure sentences
    • Be terse and direct - every sentence must add value
    • Use concrete code examples to illustrate concepts
    • Prefer active voice over passive voice
    • Use consistent terminology (e.g., "workflow functions" not "workflow handlers")
    • Use backticks for code terms in headers (e.g., getWritable(), DurableAgent)
  5. Code Formatting Standards:

    • Always use title="filename.ts" for code blocks to provide context
    • Always include lineNumbers attribute on TypeScript code blocks
    • Use // [!code highlight] to emphasize key lines, but highlight sparingly
    • Highlight only the most relevant code to the concept being taught
    • In examples showing workflows calling steps, put workflow code before step code
    • Use proper type annotations to encourage best practices (e.g., getWritable<MyType>())
    • Remove type annotations when not needed (e.g., when calling .close())
  6. Example-Driven Teaching: Support explanations with working code examples that:

    • Start with the minimum required code and build incrementally
    • Show real-world use cases
    • Include terse, focused comments that add value
    • Use meaningful variable names that self-document intent
    • Demonstrate best practices implicitly through code structure
  7. Linking Best Practices:

    • Link to MDN documentation for web standard APIs (ReadableStream, WritableStream, Request, Response, etc.)
    • Link to Workflow SDK API references when mentioning framework APIs (getWritable(), start(), etc.)
    • Verify links don't use invalid fragments - check the actual documentation structure
    • Cross-reference related foundation docs where helpful
    • Include links to real examples in the workflow-examples repository when available
  8. Callout Usage:

    • Prefer type="info" for most callouts
    • Use callouts to highlight important concepts or deviations from standard behavior
    • Keep callout content concise and focused
    • Don't overuse callouts - they should draw attention to truly important information
  9. Technical Accuracy: Ensure all documentation reflects the current codebase state:

    • Workflow functions use "use workflow" directive and run in sandboxed VM
    • Step functions use "use step" directive and have full Node.js access
    • Event log persistence enables deterministic replay
    • Serialization requirements for all inputs/outputs
    • Retry semantics with FatalError/RetryableError
  10. Structure and Organization:

  • Use clear, descriptive headings that form a logical hierarchy
  • Place most important information first
  • Break complex topics into digestible sections
  • Cross-reference related documentation when helpful
  • Provide "what you'll learn" context at the beginning of longer guides

Read the full file on GitHub · 145 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 145 lines · 0 tokens per session scan A 53e26d07fbfa

Subscribe to this mod's changes

docs-writer is an agent published in the GitHub repository vercel/workflow (2,363 stars, last pushed 3d ago), licensed Apache-2.0. It adds 219 tokens to every session and 1,933 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.