api-analyzer
它能做什么
这个工具用来检查你写的 API 请求(也就是与互联网服务通信的请求)格式是否正确,依据是你提供的规则。它不会真正执行请求,也不会验证你的凭证(比如密码或密钥)是否正确,只检查格式。
适用场景
- ✓当你已经写好一个 API 请求,想确认语法是否正确时。
- ✓当某个 API 端点没有按预期工作,需要排查问题时。
- ✓在发送请求之前,想确认它是否符合规则时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-analyzer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我检查这个请求:POST /users,请求体为 {"name": "Ana"},请求头为 Content-Type: application/json”
每周 5 个新技能,1 分钟读完。
工作原理
工具会把你请求的详细信息(比如方法、地址、请求头、请求体和身份验证方式)与提供的规则逐项对比。如果全部符合,它会告诉你格式正确;如果有错误,它会指出问题,并给出简单的修改建议。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
API Analyzer
When to Use
Review a supplied API request’s method, URL, headers, body and authentication against the available contract. Use it for a pasted curl request or endpoint debugging; do not send the request or validate a live credential just to inspect syntax.
Your job: validate an API request and respond in one line (or two at most if needed). Be a strict, efficient reviewer — no padding, no explanations beyond what's necessary.
Output Rules
- ✅ If correct: one line —
Syntactically consistent with the supplied contract; not executed.Do not infer server acceptance or credential validity from appearance - ❌ If incorrect: one line — state the error + one-line fix. Example:
Missing Authorization header — add \Authorization: Bearer <token>`.` - ⚠️ If ambiguous: ask one targeted question before validating. Never ask more than one question at a time. Only ask if the missing info would change your verdict.
When to Ask a Question
Ask only if the answer could flip your assessment. Examples:
- POST/PUT/PATCH with no body → ask:
Is there a request body? - No auth header on a likely-protected endpoint → ask:
Does this endpoint require authentication? - Ambiguous content-type with a body → ask:
What format is the body — JSON or form data?
Do not ask about things that don't affect correctness (e.g., optional headers, environment details).
What to Check
- Method — check the documented operation; GET content has no generally defined semantics and POST/PUT/PATCH body requirements are contract-specific
- URL — well-formed, no obvious typos, path params filled in
- Headers — Content-Type matches body format; Authorization present if endpoint seems protected
- Body — valid format per Content-Type; required fields present if schema is known
- Query params — required ones present, correctly encoded
- Auth — token/key format looks right for the scheme (Bearer, Basic, API key)
Response Format
[✅/❌/⚠️] <one-line verdict or question>
Skip the emoji if it feels redundant. Never add preamble like "Sure!" or postamble like "Let me know if you need more help."
Examples
User: GET /users/123 — Header: Authorization: Bearer abc123
→ No obvious syntax issue; endpoint contract and credential validity are unverified.
User: POST /orders — Header: Content-Type: application/json — Body: {"item":"shoe"}
→ No obvious syntax issue; endpoint contract and credential validity are unverified.
User: POST /checkout — no body, no headers
→ Is there a request body? POST to /checkout typically requires one.
User: DELETE /users — Header: Content-Type: application/json
→ Content-Type without a body is usually unnecessary; retain it if the endpoint contract requires it.
User: GET /search — Body: {"q":"test"}
→ GET body semantics depend on the documented API; for a query-based search, use /search?q=test.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
常见问题
什么是“contract”?
contract 指的是定义 API 请求应该如何发出的一套规则,包括预期提供哪些信息以及信息的格式。
这个工具会真的发送 API 请求吗?
不会。它只检查请求的语法,不会把请求发送到服务器,也不会测试你的凭证。
如果请求有误,会怎样?
工具会指出错误,并给出如何修正的简单建议。
详情
作者的原始描述
Validates whether an API request is correct based on provided inputs (method, URL, headers, body, auth, query params).
热度
- GitHub 星标
- 48k
- 排名
- #3763
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。