一键导入
docs-worker
Writes package documentation from code analysis — READMEs, pattern guides, API docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Writes package documentation from code analysis — READMEs, pattern guides, API docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Patterns for @outfitter/daemon including lifecycle management, IPC communication, health checks, and PID files. Use when building background services, daemons, or when "daemon", "IPC", "health check", "background service", or "@outfitter/daemon" are mentioned.
Creates handlers, CLI commands, MCP tools, and daemon services following Outfitter Dev Kit conventions. Use when adding new components to a project, scaffolding code, or when "create handler", "new command", "add tool", or "daemon service" are mentioned.
Deep patterns for @outfitter/mcp including tool registration, Zod schemas, resources, and server configuration. Use when building MCP servers, registering tools, defining resources, or when "MCP server", "MCP tool", "registerTool", or "@outfitter/mcp" are mentioned.
Generates patterns, templates, and guides for @outfitter/* packages. Covers transport-agnostic handler systems, Result types, error taxonomy, and package APIs. Use when working with @outfitter/*, Result types, Handler contract, error taxonomy, or when Result, Handler, ValidationError, NotFoundError, OutfitterError, or package names like contracts, cli, mcp, schema, tui, daemon, config, logging are mentioned.
Verify Outfitter compliance in a codebase. Scans for anti-patterns (throws, console, hardcoded paths) and produces a severity-ranked compliance report. Use for pre-commit checks, code review, or migration validation.
Submit feedback to the Outfitter team via GitHub issues. Use after discovering bugs, missing features, unclear docs, or improvement opportunities in @outfitter/* packages.
| name | docs-worker |
| description | Writes package documentation from code analysis — READMEs, pattern guides, API docs. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features that involve writing or updating documentation:
packages/<pkg>/docs/AGENTS.md for mission boundaries, key source files, and conventions..factory/library/architecture.md for cross-package patterns.This is the most critical step. Documentation MUST match actual code, not assumptions.
package.json exports field to understand available subpath imports.Anti-pattern: Do NOT document APIs that don't exist (phantom APIs). Verify every function name, every parameter, every type before writing about it. Use grep to confirm:
rg "export.*functionName" packages/<pkg>/src/
docs/ files).error-handling-patterns.md, cli-patterns.md).After writing, verify every claim in the doc:
rg "export.*<name>" packages/<pkg>/src/)package.json exportspackage.json# Lint (do NOT use 'bun run check', 'bun run format:check', or 'bun run format:fix' — the formatter has a pre-existing crash)
bun run lint
# Type safety
bun run typecheck
# Ensure no test breakage
bun run test
Commit with conventional commit format:
docs(contracts): add error handling patterns guide [OS-338]
Documentation-only changes to docs/ directories do not need changesets unless they modify the package README.
{
"salientSummary": "Wrote error handling patterns doc at packages/contracts/docs/error-handling-patterns.md covering: error boundary guidance (Results for domain, throws for protocol), MCP boundary rule (always return Result from tool handlers), taxonomy visibility (link to error category table), and adaptHandler() bridge pattern with code example. Cross-referenced all function names against source — all verified.",
"whatWasImplemented": "New documentation file packages/contracts/docs/error-handling-patterns.md (~120 lines). Covers 4 topics from the issue spec: error boundaries, MCP boundary rule, taxonomy visibility, adaptHandler() use case. All code examples verified against actual source signatures.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "test -f packages/contracts/docs/error-handling-patterns.md",
"exitCode": 0,
"observation": "File exists"
},
{
"command": "rg 'export.*adaptHandler' packages/mcp/src/",
"exitCode": 0,
"observation": "Confirmed adaptHandler export in types.ts"
},
{
"command": "rg 'export.*OutfitterError' packages/contracts/src/",
"exitCode": 0,
"observation": "Confirmed OutfitterError export"
},
{ "command": "bun run lint", "exitCode": 0, "observation": "Clean" },
{
"command": "bun run test",
"exitCode": 0,
"observation": "3280 tests passed"
},
{
"command": "bun run typecheck",
"exitCode": 0,
"observation": "No errors"
}
],
"interactiveChecks": []
},
"tests": {
"added": []
},
"discoveredIssues": []
}