跳到主内容
智客 ZICQ

技能库 智客分类:文档办公 backend-to-frontend-handoff-docs

前端 Handoff 文档的后端

为前端开发者创建 API 交接文档. 当后端工作完成并需要记录前端集成时使用,或者用户说"创建交接","文件API","前端交接",或者"API文档".

749 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

为前端开发者创建 API 交接文档

何时用

页:1 完成后端 API 工作后, DTO 、 验证、 商业逻辑 运行此模式生成交接文档

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:API Handoff Mode、Goal、Inputs、Workflow、Output Format、API Handoff: [Feature Name]。 其中含规范建议的小节:分步指令。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'.

API Handoff ModeGoalInputsWorkflowOutput FormatAPI Handoff: [Feature Name]Business ContextEndpoints[METHOD] /path/to/endpointData Models / DTOsEnums & ConstantsValidation Rules

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
backend-to-frontend-handoff-docs
description
Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「backend-to-frontend-handoff-docs」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-8ea26d1e09d2b5e9-%E5%89%8D%E7%AB%AF-Handoff-%E6%96%87%E6%A1%A3%E7%9A%84%E5%90%8E%E7%AB%AF.html
请存为 .cursor/skills/backend-to-frontend-handoff-docs/SKILL.md 或 .claude/skills/backend-to-frontend-handoff-docs/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/softaworks/agent-toolkit' --list

npx skills add 'https://github.com/softaworks/agent-toolkit' --skill 'backend-to-frontend-handoff-docs'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: backend-to-frontend-handoff-docs description: Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'. --- # API Handoff Mode > **No Chat Output**: Produce the handoff document only. No discussion, no explanation—just the markdown block saved to the handoff file. You are a backend developer completing API work. Your task is to produce a structured handoff document that gives frontend developers (or their AI) full business and technical context to build integration/UI without needing to ask backend questions. > **When to use**: After completing backend API work—endpoints, DTOs, validation, business logic—run this mode to generate handoff documentation. > **Simple API shortcut**: If the API is straightforward (CRUD, no complex business logic, obvious validation), skip the full template—just provide the endpoint, method, and example request/response JSON. Frontend can infer the rest. ## Goal Produce a copy-paste-ready handoff document with all context a frontend AI needs to build UI/integration correctly and confidently. ## Inputs - Completed API code (endpoints, controllers, services, DTOs, validation). - Related business context from the task/user story. - Any constraints, edge cases, or gotchas discovered during implementation. ## Workflow 1. **Collect context** — confirm feature name, relevant endpoints, DTOs, auth rules, and edge cases. 2. **Create/update handoff file** — write the document to `.claude/docs/ai//api-handoff.md`. Increment the iteration suffix (`-v2`, `-v3`, …) if rerunning after feedback. 3. **Paste template** — fill every section below with concrete data. Omit subsections only when truly not applicable (note why). 4. **Double-check** — ensure payloads match actual API behavior, auth scopes are accurate, and enums/validation reflect backend logic. ## Output Format Produce a single markdown block structured as follows. Keep it dense—no fluff, no repetition. --- ```markdown # API Handoff: [Feature Name] ## Business Context [2-4 sentences: What problem does this solve? Who uses it? Why does it matter? Include any domain terms the frontend needs to understand.] ## Endpoints ### [METHOD] /path/to/endpoint - **Purpose**: [1 line: what it does] - **Auth**: [required role/permission, or "public"] - **Request**: ```json { "field": "type — description, constraints" } ``` - **Response** (success): ```json { "field": "type — description" } ``` - **Response** (error): [HTTP codes and shapes, e.g., 422 validation, 404 not found] - **Notes**: [edge cases, rate limits, pagination, sorting, anything non-obvious] [Repeat for each endpoint] ## Data Models / DTOs [List key models/DTOs the frontend will receive or send. Include field types, nullability, enums, and business meaning.] ```typescript // Example shape for frontend typing interface ExampleDto { id: number; status: 'pending' | 'approved' | 'rejected'; createdAt: string; // ISO 8601 } ``` ## Enums & Constants [List any enums, status codes, or magic values the frontend needs to know. Include display labels if relevant.] | Value | Meaning | Display Label | |-------|---------|---------------| | `pending` | Awaiting review | Pending | ## Validation Rules [Summarize key validation rules the frontend should mirror for UX—required fields, min/max, formats, conditional rules.] ## Business Logic & Edge Cases - [Bullet each non-obvious behavior, constraint, or gotcha] - [e.g., "User can only submit once per day", "Soft-deleted items excluded by default"] ## Integration Notes - **Recommended flow**: [e.g., "Fetch list → select item → submit form → poll for status"] - **Optimistic UI**: [safe or not, why] - **Caching**: [any cache headers, invalidation triggers] - **Real-time**: [websocket events, polling intervals if applicable] ## Test Scenarios [Key scenarios frontend should handle—happy path, errors, edge cases. Use as acceptance criteria or test cases.] 1. **Happy path**: [brief description] 2. **Validation error**: [what triggers it, expected response] 3. **Not found**: [when 404 is returned] 4. **Permission denied**: [when 403 is returned] ## Open Questions / TODOs [Anything unresolved, pending PM decision, or needs frontend input. If none, omit section.] ``` --- ## Rules - **NO CHAT OUTPUT**—produce only the handoff markdown block, nothing else. - Be precise: types, constraints, examples—not vague prose. - Include real example payloads where helpful. - Surface non-obvious behaviors—don't assume frontend will "just know." - If backend made trade-offs or assumptions, document them. - Keep it scannable: headers, tables, bullets, code blocks. - No backend implementation details (no file paths, class names, internal services) unless directly relevant to integration. - If something is incomplete or TBD, say so explicitly. ## After Generating Write the final markdown into the handoff file only—do not echo it in chat. (If the platform requires confirmation, reference the file path instead of pasting contents.)

相关技能

文档办公

肿瘤Ontology

为结构化的代理内存和可堆肥技能所打入的知识图. 在创建/征服实体(Person, project, Task, Evention, Document)时使用,链接相关对象,强制约束,规划多步动作作为图变,或技能需要共享状态时使用. 触发到"记住","我知道什么","链接X到Y",…

文档办公

纳诺PdfNano Pdf

使用纳米-pdf CLI编辑带有自然语言指令的PDF.

文档办公

单词 / DOCXWord / DOCX

创建,检查,并编辑有可靠样式的Microsoft Word文档和DOCX文件,编号,跟踪更改,表格,章节,并进行相容性检查. 当 (1) 任务涉及 Word 或 ".docx " 时使用; (2) 文件包括跟踪的更改,评论,字段,表格,模板,或页面布局限制; (3) 文档必须在不…

文档办公

百度搜索Baidu Search

使用Baidu AI搜索引擎(BDSE)搜索网页. 用于实时信息、文件或研究专题.