tsd
This skill should be used when the user asks to "write a TSD", "create a TSD", "write a Technical Specification Document", "document an API", "spec out an API", "write an API spec", "document a data model", "write a technical spec", "create interface documentation", or needs a comprehensive technical specification covering API endpoints, data models, interface contracts, error handling, and versioning (5-20 pages).
What this skill does
# TSD Skill Create Technical Specification Documents (5-20 pages) that comprehensively define APIs, data models, interface contracts, error handling, versioning strategies, and technical implementation details. **Key principle**: All information comes from the user. Do NOT scan the codebase to discover APIs or schemas. The `Read` tool is only for reading user-provided context files (existing specs, API definitions, tickets) that the user explicitly shares. ## When to Use a TSD - Defining new API endpoints or modifying existing ones - Documenting data models and database schemas - Specifying interface contracts between services - Documenting integration points with external systems - Capturing technical implementation details before or after development ## Workflow ### Phase 1: Gather Context Parse what the user already provided in their initial request. Extract: - **Scope**: What API, service, or data model is being specified? - **Purpose**: What does this system do? - **Consumers**: Who/what will use this API? - **Constraints**: Auth, versioning, backward compatibility **Only ask for what's genuinely missing.** **Essential questions** (use `references/question-bank.md` patterns, ask only if not already provided): 1. **System overview**: "What does this service/API do? What problem does it solve?" 2. **API endpoints** (for APIs): "Walk me through the endpoints — what operations does it support? (e.g., CRUD, streaming, webhooks)" 3. **Data models**: "Describe the main data entities and their key fields. Any relationships between them?" 4. **Authentication/Authorization**: "How do clients authenticate? Are there different permission levels?" 5. **Error handling**: "What errors can occur? How should errors be communicated to consumers?" 6. **Versioning**: "How will this API be versioned? How will breaking changes be handled?" 7. **Performance requirements**: "Any latency, throughput, or SLA requirements?" 8. **Related context** (optional): "Existing specs, OpenAPI definitions, or service contracts I should reference?" **If user seems uncertain about design choices**: Offer research assistance via `agent:web-research-specialist` for industry patterns (REST vs GraphQL, pagination approaches, etc.). **Rich context** (accept at any point): - OpenAPI/Swagger specs → use `Read` tool to load - Existing service code → user should paste key interfaces - Pasted schema definitions → incorporate directly ### Phase 2: Generate & Iterate Once sufficient context is gathered, generate the **complete TSD draft** using the template from `assets/templates/template.md`. **Content generation rules:** - Use section headings from `template.md` exactly - Format API endpoints consistently: `METHOD /path` with request/response examples - Use code blocks for JSON schemas, request/response bodies - Use tables for field definitions (field, type, required, description) - Use italicized placeholders for missing info: *Define error codes* - Do NOT include checkboxes, HTML comments, guidance questions, or quality criteria in output **After presenting the full draft:** 1. Internally validate against `assets/templates/quality-checklist.md` — never show to user 2. Ask targeted follow-ups for gaps (e.g., "Should I add example requests and responses for each endpoint?") 3. Iterate based on feedback 4. Save in requested format ## Document Structure Key sections (from `assets/templates/template.md`): | Section | Purpose | |---------|---------| | Abstract | Executive summary | | Overview | Purpose, scope, system context | | API Endpoints/Methods | Detailed specs per endpoint | | Data Models/Schemas | Entity definitions and relationships | | Interface Contracts | Inputs, outputs, preconditions, postconditions | | Error Handling | Error types, codes, formats, retry logic | | Versioning Strategy | Version scheme and backward compatibility | | Security Considerations | Auth, encryption, data protection | | Performance Requirements | Latency, throughput, SLAs | | Testing Requirements | Unit, integration, contract testing | | Examples | Complete request/response examples | | References | Related docs and standards | | Change Log | Version history | ## Quality Principles - Every endpoint needs: method, path, description, request schema, response schema, error codes - Field definitions must include: name, type, required/optional, description, validation rules - Use concrete examples — abstract specs are hard to implement against - Document what happens on errors, not just the happy path - Be explicit about backward compatibility guarantees ## Visual Aids System context and data flow diagrams help consumers understand integration. When requested: 1. Ask what the diagram should show (system context, entity relationships, sequence flows) 2. Invoke `common-engineering:mermaid` skill 3. Integrate into Overview or relevant section ## Integration Points | Capability | When to Use | |-----------|-------------| | `agent:web-research-specialist` | Research API design patterns, industry standards | | `common-engineering:mermaid` | System context, ER diagrams, sequence diagrams | | `document-skills:docx` | Export to Word format | | `document-skills:pdf` | Export to PDF format | ## Reference Files | File | Purpose | |------|---------| | `references/writing-guidelines.md` | Technical writing best practices | | `references/question-bank.md` | AskUserQuestion patterns for this skill | | `assets/templates/template.md` | Document structure (use for output) | | `assets/templates/guidance.md` | Section-by-section guidance (read, never copy to output) | | `assets/templates/quality-checklist.md` | Internal validation (never show to user) | | `assets/templates/examples.md` | Completed examples for quality reference |
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.