跳到主要内容
SkillVault logo SkillVault
Pro Claude Code Cursor ChatGPT GPTs Dify LangGraph

API Documentation Writer

Generates developer-grade API references from code: endpoints, parameters, auth, errors and copy-paste request examples.

0 次下载 1 次浏览 更新于 Oct 16, 2026 v2.0.1
API Documentation Writer skill cover

下方技能配置(提示词、变量、安装步骤)保留英文原文。.aiskill 文件直接面向 AI 智能体,统一使用英文以确保跨平台行为一致。

概述

API Documentation Writer converts routes, handlers or OpenAPI fragments into documentation developers actually enjoy reading. It documents every endpoint with method, path, purpose, parameters, request/response schemas, auth requirements and error codes.

The skill writes in a consistent, minimal voice, includes ready-to-run curl and fetch examples, and flags undocumented or inconsistent behavior it notices in the code — such as params that are validated but never described.

It fits teams that keep docs drifting behind code: paste a handler, get a reference section that drops straight into README, docs sites or an OpenAPI description block.

系统提示词

预览已脱敏

定义智能体角色、规则与输出格式的指令块。

system-prompt.txt
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████

用户提示词模板

填充变量后发送,即可运行该技能: {{variables}}

user-template.txt
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████
████████████████████████████████████████████████████████████████

变量

名称 必填 说明 示例
{{code_sample}} 是 Route handler(s), controller(s) or OpenAPI fragment to document. —
{{framework}} 是 Framework and language, e.g. "Express + TypeScript" or "FastAPI". FastAPI + Python
{{audience}} 可选 Who reads the docs, e.g. "external API consumers". external API consumers

完整技能配置

脱敏预览

标准 .aiskill 文件,提供 JSON 与 YAML 两种格式。

api-docs-writer.aiskill (JSON)
{
  "format": "aiskill/v1",
  "skill": {
    "name": "API Documentation Writer",
    "slug": "api-docs-writer",
    "version": "2.0.1",
    "description": "Generates developer-grade API references from code: endpoints, parameters, auth, errors and copy-paste request examples.",
    "category": "Development",
    "tags": [
      "api",
      "documentation",
      "openapi",
      "technical-writing"
    ],
    "platforms": [
      "claude-code",
      "cursor",
      "chatgpt",
      "dify",
      "langgraph"
    ],
    "tested_environment": "GPT-5, Claude Sonnet 4.5; Express, FastAPI, Spring handlers",
    "license": "CC-BY-4.0"
  },
  "prompts": {
    "system": "████████████████████████████████████████████████████████████████████████████████████████████████",
    "user_template": "████████████████████████████████████████████████████████████████████████████████████████████████"
  },
  "variables": [
    {
      "name": "code_sample",
      "description": "Route handler(s), controller(s) or OpenAPI fragment to document.",
      "required": true
    },
    {
      "name": "framework",
      "description": "Framework and language, e.g. \"Express + TypeScript\" or \"FastAPI\".",
      "required": true,
      "example": "FastAPI + Python"
    },
    {
      "name": "audience",
      "description": "Who reads the docs, e.g. \"external API consumers\".",
      "required": false,
      "example": "external API consumers"
    }
  ],
  "install": {
    "steps": [
      {
        "title": "Copy the system prompt",
        "detail": "Copy the full system prompt from the skill page."
      },
      {
        "title": "Add to your platform",
        "detail": "Paste as a custom GPT instruction, a Cursor rule for docs files, or a Claude Code skill."
      },
      {
        "title": "Feed it a handler",
        "detail": "Paste one or more endpoint implementations into the user template with the framework name."
      },
      {
        "title": "Review and publish",
        "detail": "Check the \"Gaps noticed\" section, then merge the reference into your docs."
      }
    ]
  },
  "usage": {
    "steps": [
      "Paste the endpoint code and specify the framework and target audience.",
      "Send the template; you get a complete reference block per endpoint.",
      "Address the \"Gaps noticed\" list — those are real doc/code mismatches.",
      "Repeat per module and assemble the sections into your docs site."
    ]
  },
  "metadata": {
    "author": "SkillVault",
    "source": "https://skillvault.top/skills/api-docs-writer",
    "exported_at": "2026-11-03T07:42:09.404Z"
  }
}
api-docs-writer.aiskill (YAML)
format: aiskill/v1
skill:
  name: API Documentation Writer
  slug: api-docs-writer
  version: 2.0.1
  description: >-
    Generates developer-grade API references from code: endpoints, parameters, auth, errors and
    copy-paste request examples.
  category: Development
  tags:
    - api
    - documentation
    - openapi
    - technical-writing
  platforms:
    - claude-code
    - cursor
    - chatgpt
    - dify
    - langgraph
  tested_environment: GPT-5, Claude Sonnet 4.5; Express, FastAPI, Spring handlers
  license: CC-BY-4.0
prompts:
  system: ████████████████████████████████████████████████████████████████████████████████████████████████
  user_template: ████████████████████████████████████████████████████████████████████████████████████████████████
variables:
  - name: code_sample
    description: Route handler(s), controller(s) or OpenAPI fragment to document.
    required: true
  - name: framework
    description: Framework and language, e.g. "Express + TypeScript" or "FastAPI".
    required: true
    example: FastAPI + Python
  - name: audience
    description: Who reads the docs, e.g. "external API consumers".
    required: false
    example: external API consumers
install:
  steps:
    - title: Copy the system prompt
      detail: Copy the full system prompt from the skill page.
    - title: Add to your platform
      detail: Paste as a custom GPT instruction, a Cursor rule for docs files, or a Claude Code skill.
    - title: Feed it a handler
      detail: Paste one or more endpoint implementations into the user template with the framework name.
    - title: Review and publish
      detail: Check the "Gaps noticed" section, then merge the reference into your docs.
usage:
  steps:
    - Paste the endpoint code and specify the framework and target audience.
    - Send the template; you get a complete reference block per endpoint.
    - Address the "Gaps noticed" list — those are real doc/code mismatches.
    - Repeat per module and assemble the sections into your docs site.
metadata:
  author: SkillVault
  source: https://skillvault.top/skills/api-docs-writer
  exported_at: "2026-11-03T07:42:09.404Z"

安装指南

  1. 1

    Copy the system prompt

    Copy the full system prompt from the skill page.

  2. 2

    Add to your platform

    Paste as a custom GPT instruction, a Cursor rule for docs files, or a Claude Code skill.

  3. 3

    Feed it a handler

    Paste one or more endpoint implementations into the user template with the framework name.

  4. 4

    Review and publish

    Check the "Gaps noticed" section, then merge the reference into your docs.

使用方法

  1. Paste the endpoint code and specify the framework and target audience.
  2. Send the template; you get a complete reference block per endpoint.
  3. Address the "Gaps noticed" list — those are real doc/code mismatches.
  4. Repeat per module and assemble the sections into your docs site.

平台兼容性

Claude Code

Anthropic

将导出的 .aiskill JSON 保存为项目中的技能文件,或将系统提示词粘贴进 CLAUDE.md / 斜杠命令 Markdown 文件。

官方文档

Cursor

Anysphere

将系统提示词复制到 .cursor/rules/*.mdc(或设置中的 Project Rules),并在智能体提示词中引用用户模板。

官方文档

ChatGPT GPTs

OpenAI

将系统提示词粘贴到 GPT 的「Instructions」字段,并把用户模板作为起始消息使用。

官方文档

Dify

LangGenius

新建一个智能体/应用,将系统提示词粘贴到系统提示词面板,并把模板变量注册为输入字段。

官方文档

LangGraph

LangChain

将 JSON 配置加载进图状态:prompts.system 用作系统消息,prompts.user_template 作为可运行模板。

官方文档
API Documentation Writer previewAPI Documentation Writer preview

相关技能

llm-cost-optimizer AI agent skill cover
Pro
ChatGPT GPTs Claude Code Cursor

llm-cost-optimizer

Use proactively whenever LLM API costs come up -- or should. Triggers include: 'my AI costs are too high', 'optimize token usage', 'which model should I use', 'LLM spend is out of control', 'implement prompt caching', 'we're about to launch an AI feature', 'build me an AI endpoint'. Don't wait for an explicit cost complaint -- if someone is building an AI feature, designing an LLM endpoint, or choosing between models, cost architecture belongs in the conversation. Apply immediately when any of these are true: a system prompt appears that exceeds a few hundred tokens, all requests are hitting the same model, max_tokens is not set, or no per-feature cost logging exists. NOT for RAG pipeline design (use rag-architect). NOT for improving prompt quality or effectiveness (use senior-prompt-engineer).

#ai-agents#llm#rag
0 2 v1.0.0
mcp-server-builder AI agent skill cover
Pro
ChatGPT GPTs Claude Code Cursor

mcp-server-builder

Design and ship production-ready MCP (Model Context Protocol) servers from OpenAPI contracts instead of hand-written tool wrappers. Python and TypeScript support, schema validation, safe evolution. Use when exposing an existing API as an MCP server, building tool integrations for Claude or Codex or Cursor, or scaffolding an MCP project from scratch.

#ai-agents#mcp#python
1 16 v1.0.0
api-design-reviewer AI agent skill cover
免费
ChatGPT GPTs Claude Code Cursor

api-design-reviewer

Comprehensive REST API design review with automated linting, breaking-change detection, and design scorecards. Catches inconsistent conventions, missing versioning, and design smells before APIs ship. Use when reviewing a PR that adds or changes API endpoints, auditing an existing API for v2 migration, or establishing API standards for a team.

#dev-workflow#api
0 0 v1.0.0