Programming · Testing
api-debugger
/api-debugger
当用户要测试或调试 REST / GraphQL 接口、验证响应格式、对比接口文档与实际行为、生成 Mock 数据时使用。
For whom
Assessment and security
86/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 13.06.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
当用户要测试或调试 REST / GraphQL 接口、验证响应格式、对比接口文档与实际行为、生成 Mock 数据时使用。
Original author description
当用户要测试或调试 REST / GraphQL 接口、验证响应格式、对比接口文档与实际行为、生成 Mock 数据时使用。
How it works
- 适用场景
- 不适用场景
- 工作流(按场景分流)
- 详细参考
Original SKILL.md headings · 42 lines, 168 words
SKILL.md preview
---
name: api-debugger
description: 当用户要测试或调试 REST / GraphQL 接口、验证响应格式、对比接口文档与实际行为、生成 Mock 数据时使用。
version: 2.1.0
metadata:
zhiwei:
tags:
- api
- rest
- graphql
- curl
- http
- testing
- mock
suggested_tools:
- shell_exec
- code
- file_read
- file_write
---
# API 调试指南
`curl` / Python `requests` 测试 REST / GraphQL 接口,验证响应格式、对比文档与实际行为。
## 适用场景
- REST API 请求测试(GET / POST / PUT / DELETE / PATCH)
- GraphQL 查询和变更测试
- 响应格式与状态码分析
- 接口文档对比实际返回(找出文档过期 / 行为异常)
- Mock 数据生成(造测试请求体)
- 批量接口测试(一组端点跑一遍)
## 不适用场景
- 浏览器端交互测试 → browser-automation
- 代码级单元测试 → code-assistant
- 简单单次 curl → 直接 `shell_exec`
## 工作流(按场景分流)
| 场景 | 路径 |
|---|---|
| 单端点测一次 | curl 模板(GET/POST/认证/GraphQL) |
| 验响应格式 | curl + jq / `python -m json.tool` 看结构 |
| 对比文档 vs 实际 | 调一次 → 跟文档逐字段对,输出差异表 |
| 批量测一组 | 先验单个 → 再 shell 循环或 python `requests` |
| Mock 数据 | 按 schema 造请求体(用户给字段约束就照填,没给就给典型值) |
各路径要点:
- **同时看状态码 + 响应体**:单看 200 不够,body 可能是错误结构("success":false)
- **敏感信息走变量**:Token / API Key 用 `$TOKEN` / `${API_KEY}`,不写明文;写入文件时不带 token
- **批量先试单个**:批量执行前先跑一个验证格式,再 shell 循环或 python 批跑
- **结果落盘**:批量测试结果 `file_write` 写 `api-test-report.md`,含端点 / 状态 / 响应摘要 / 差异
- **`-k` 仅限测试环境**:跳 SSL 证书校验只在 dev / staging 用,给用户结果时注明
## 详细参考
- curl 模板 / 响应分析 / 批量测试 / Mock 生成 / 常见错误:`{skill_dir}/references/curl-recipes.md`
Files in this package (2)
- SKILL.md 2 KB
- references/curl-recipes.md 1 KB
Versions
The database has no other skills named api-debugger.
Database snapshot: 13.11.2026 · package version 15034741051e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100design-api
Design REST and GraphQL APIs: naming, versioning, error shapes, auth. Use when "design an API", "create endpoints", "REST vs GraphQL", or "API contract". - 100api-and-interface-design
指导稳定的 API 和接口设计。设计 API、模块边界或任何公共接口时使用。创建 REST 或 GraphQL endpoint、定义模块之间的类型契约,或建立前后端边界时使用。 - 100uw-analyze-api
Use when analyzing REST/GraphQL API endpoints, contracts, authentication, and client-facing interfaces - 96ditz-api
Use when designing or reviewing REST/GraphQL endpoints. - 100create-api-design
Design a REST or GraphQL API from a feature specification when the user asks to design an API, create endpoints, define an API contract, or plan API resources - 100api-design
Design REST/GraphQL/OpenAPI contracts before implementation — API-first approach. Use when: API, endpoint, REST, GraphQL, OpenAPI, API contract, API design, HTTP endpoint, grpc, soap.