
apifox-workflow-api-lifecycle
Apifox API 生命周期工作流:从需求到接口设计、Schema、环境、Mock、测试用例、文档导出/发布和分支合并。用户要“创建一组 API 并补齐测试/Mock/文档”时使用。
- Installs
- 471
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/apifox/apifox-cli-skills --skill apifox-workflow-api-lifecycle- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads apifox-workflow-api-lifecycle automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
API 生命周期工作流
开始前必须读取
../apifox-cli/SKILL.md。若旧总入口与本 workflow 的领域规则冲突,以当前 CLI help 和本 workflow 为准。按步骤再读取apifox-branch、apifox-import-export、apifox-test-case;涉及复杂测试流程时读取apifox-test-scenario,涉及执行和 CI 时读取apifox-test-automation。
具体 endpoint、schema、environment、test-report 命令以当前 CLI help 为准。本流程用于从需求到 API 资产、测试、报告和分支合并的端到端交付,重点关注资源顺序、质量门禁和交付验证。Agent 执行时优先形成 help/schema -> get -> validate -> write -> run/report 闭环,不要仅凭旧文档或记忆写入。
适用场景
- 根据需求创建或更新一组接口。
- 导入 OpenAPI/Postman 后整理接口、Schema、目录和测试。
- 从代码库、PRD、需求文档、测试文档或讨论内容生成 API spec 后导入 Apifox。
- 给接口补 Mock、测试用例、文档和发布设置。
- 在 AI 分支完成 API 变更并准备合并。
工作流
确认项目/分支
-> 如需从代码/文档导入,先做 spec 生成和质量门禁
-> 设计接口和 Schema
-> 配置环境和变量
-> 配置 Mock
-> 创建接口测试用例
-> 运行测试并查看报告
-> 导出/发布文档
-> 合并或创建 MR
Step 1:确认上下文
按当前 CLI help 确认身份、项目、目标分支和是否需要 AI 分支。
- 用户要直接改主分支/迭代分支时,确认 AI 写入权限或走 AI 分支。
- 如果通过 AI 分支改已有资源,先用
branch pick-to导入源资源。
Step 2:设计 API 资源
按当前 CLI help 使用 endpoint、schema、response-component、security-scheme、folder 等 API 设计资源命令。
最小边界:endpoint 是接口定义,test-case 是接口下测试用例,不要混写;schema、response-component、security-scheme 等可复用资源应先创建,再由 endpoint 引用;环境变量不要写进 common-parameter。
如果任务是从代码库、PRD 或文档生成并导入 API spec,先读取 ../apifox-import-export/SKILL.md,完成生成器搜索、OpenAPI 指标校验、tags 分组和临时项目导入验证,再进入接口设计或测试补充。
- 先建
schema、response-component、security-scheme等可复用资源,再引用到 endpoint。 - 创建后必须
endpoint get验证真实保存结构。
Step 3:配置环境
按当前 CLI help 使用 environment、variables、database-connection、vault 等环境和运行上下文命令。
- 没有合适环境时创建或更新环境。
- 敏感变量不要出现在最终回复中。
- 运行测试和 CI 交付命令建议显式带
--environment,避免默认环境变化导致不可复现。
Step 4:补测试用例
读取 ../apifox-test-case/SKILL.md。
- 不要创建空壳 case。
- 创建后
test-case get验证步骤、断言、提取器被保存。
Step 5:验证和交付
- 测试报告异常先区分本地报告、云端上传和下载概要;必要时转
apifox-cli-checkup。 - 前端展示异常转
apifox-cli-checkup。 - 需要合并时转
apifox-branch。 - 如果新建 API 的测试运行返回 404 或断言失败,先检查 Mock/环境是否配置,不要直接判定 endpoint 或 test-case 创建失败。Mock 未配置导致运行失败是执行环境问题,不等于设计资产未保存。
不可违反规则
- 不要跳过 project/branch 确认。
- 不要直接在受保护主分支写入。
- 不要只创建接口不验证保存结构。
- 不要只创建空测试用例。
- 不要把测试失败当作接口创建失败;分别定位 API 定义、环境、测试用例和执行报告。
FAQ
What does the apifox-workflow-api-lifecycle skill do?
Apifox API 生命周期工作流:从需求到接口设计、Schema、环境、Mock、测试用例、文档导出/发布和分支合并。用户要“创建一组 API 并补齐测试/Mock/文档”时使用。
How do I install apifox-workflow-api-lifecycle?
Run npx skills add https://github.com/apifox/apifox-cli-skills --skill apifox-workflow-api-lifecycle in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/apifox-workflow-api-lifecycle/ (personal) or .claude/skills/apifox-workflow-api-lifecycle/ (project).
Which AI agents can use apifox-workflow-api-lifecycle?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is apifox-workflow-api-lifecycle safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains apifox-workflow-api-lifecycle?
It is published by apifox in apifox/apifox-cli-skills. It has 471 recorded installs.
More from apifox/apifox-cli-skills
apifox-cli
apifox/apifox-cli-skills
通过 Apifox CLI 管理 Apifox 项目资源。触发场景:运行接口自动化测试/测试套件,查询/创建/更新/删除接口、环境、Schema、Mock、分支等项目资源,导入导出 API 文档,查看测试报告,管理 Runner、定时任务、通知等 CI/CD 配置。CLI 输出为结构化 JSON,常含 agentHints.nextSteps;所有命令支持 --help。
apifox-test-case
apifox/apifox-cli-skills
Apifox 接口测试用例:test-case 与 test-data 的查询、创建、更新、删除、分类和运行;处理测试步骤、断言、提取变量、前后置处理器、数据集,以及“CLI 创建后前端测试步骤无法展示”等问题。
apifox-import-export
apifox/apifox-cli-skills
Apifox 导入导出与质量门禁:导入 OpenAPI/Postman/Apifox 原生格式,导出 OpenAPI/HTML/Markdown/Postman/Apifox 原生格式;导入前校验 spec 完整性、tags 分组、schema/body 覆盖率,导入后验证计数、模块和资源可见性。
apifox-cli-checkup
apifox/apifox-cli-skills
Apifox CLI 使用检查与版本确认:命令成功但页面没看到、创建后 list/get 找不到、测试运行失败、报告缺失、agentHints/help/实际行为不一致,或怀疑本机 CLI 版本不是最新时使用。
apifox-test-automation
apifox/apifox-cli-skills
Apifox 自动化测试执行、套件与 CI:test-suite、scheduled-task、runner、apifox run、执行参数、迭代数据、报告上传和 CI 回归。复杂 test-scenario 步骤建模请使用 apifox-test-scenario。
apifox-test-scenario
apifox/apifox-cli-skills
Apifox 测试场景建模:test-scenario 的查询、创建、更新、删除和运行;导入接口、单接口用例或其它场景步骤;添加场景引用步骤;复杂步骤编排、接口步骤/条件/循环/等待/脚本/数据库等步骤衔接、前后置操作、变量引用、断言、提取器和场景调试最佳实践。用户要创建或维护复杂自动化测试流程时使用。
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.