api-test-create
当用户需要根据接口规格生成API测试分析文档时使用此技能。接受OpenAPI/Swagger文档、简化接口定义或自然语言描述,基于140个常见API测试陷阱输出全面的测试分析文档,涵盖参数校验、业务逻辑、响应验证和安全测试分析点。
Skill by LeoYeAI
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/leoyeai-api-test-create
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-test-create
What's inside
- Skill name
api-test-create- Description
- 当用户需要根据接口规格生成API测试分析文档时使用此技能。接受OpenAPI/Swagger文档、简化接口定义或自然语言描述,基于140个常见API测试陷阱输出全面的测试分析文档,涵盖参数校验、业务逻辑、响应验证和安全测试分析点。
- License
- MIT
- Instructions
- 532 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: "api-test-create" does not match folder "apitestcreate"
- body: 532 lines (spec recommends under 500)
Files (13)
- QUICKSTART.md
- README.md
- README_EN.md
- SKILL.md
- _meta.json
- openapi-example.yaml · examples/
- simple-example.md · examples/
- common-pitfalls.md · references/
- test-case-design.md · references/
- requirements.txt
- generate-checklist.py · scripts/
- utils.py · scripts/
- test_generator.py · tests/
SKILL.md (first lines)
---
name: api-test-create
description: 当用户需要根据接口规格生成API测试分析文档时使用此技能。接受OpenAPI/Swagger文档、简化接口定义或自然语言描述,基于140个常见API测试陷阱输出全面的测试分析文档,涵盖参数校验、业务逻辑、响应验证和安全测试分析点。
---
# API测试分析文档生成器
## 目的
根据接口规格定义生成全面的API测试分析文档。将API定义转换为结构化的测试分析,确保覆盖参数校验、业务逻辑、响应验证和常见陷阱的测试点分析。
## 使用时机
在以下情况下使用此技能:
- 为新API端点设计测试策略时
- 审查API测试覆盖完整性时
- 需要测试分析文档供团队评审时
- 针对常见陷阱审计API质量时
- 生成测试方案和测试点清单时
## 工作流程
### 步骤1:解析接口定义
从输入中提取:
1. **基本信息**:端点路径、HTTP方法、描述
2. **请求参数**:名称、类型、约束、必填/可选
3. **返回字段**:名称、类型、描述
4. **业务规则**:校验规则、状态转换、权限
支持的输入格式:
- OpenAPI/Swagger JSON/YAML
- 简化接口定义(Markdown格式)
- 自然语言描述
### 步骤2:生成参数校验测试点分析
为每个参数基于类型生成测试点分析:
| 参数类型 | 测试点分析维度 |
|----------|----------------|
| string | 正常值、边界长度、空值、null、特殊字符、SQL注入风险、XSS风险、Unicode字符、编码问题 |
| integer | 正常值、最小/最大边界、零值、负数、小数(类型错误)、溢出、精度问题 |
| number | 正常值、精度、科学计数法、边界值、NaN、Infinity |
| enum | 所有有效值、无效值、大小写敏感、null、空字符串、数字枚举 |
| boolean | true/false、字符串转换、数字转换、null、其他值 |
| array | 空数组、单元素、多元素、最大元素数、重复元素、无效元素、嵌套数组 |
| object | 完整对象、缺少必填字段、额外字段、空对象、嵌套对象深度 |
| datetime | 当前时间、过去时间、未来时间、闰年、无效日期、时区、格式错误、时间精度 |
### 步骤3:生成业务逻辑测试点分析
识别规则模式并生成测试分析场景:
| 规则模式 | 测试点分析 |
|----------|------------|
| 存在性校验 | 数据存在、不存在、已删除、逻辑删除、缓存不一致 |
| 唯一性校验 | 首次创建、重复尝试、并发创建、大小写敏感、特殊字符 |
| 状态转换 | 合法转换、非法转换、循环状态、终态、初始状态 |
| 权限校验 | 已授权、未授权、未登录、权限变更、角色变更、越权访问 |
| 关联校验 | 关联数据存在、不存在、已删除、外键约束、级联操作 |
| 数量限制 | 达到上限、超过上限、低于下限、批量操作限制、分页限制 |
| 时间窗口 | 有效期内、已过期、即将过期、时区影响 |
### 步骤4:生成响应验证测试点分析
| 接口类型 | 验证点分析 |
|----------|------------|
| 列表查询 | 结构完整性、分页字段、字段类型、空列表返回[]、null处理、排序 |
| 详情查询 | 必填字段存在、字段类型正确、404处理、null字段、关联数据完整性 |
| 创建 | 返回新ID、数据库验证、默认值、时间戳、返回字段完整性、状态码 |
| 更新 | 成功状态、数据变更验证、未变更字段保持原值、部分更新、全量更新 |
| 删除 | 成功状态、记录删除验证、软删除/硬删除、后续查询返回404、级联删除 |
| 文件上传 | 文件大小限制、文件类型、空文件、超大文件、文件名、多文件 |
| 文件下载 | 内容类型、文件名、文件完整性、断点续传、大文件分片 |
### 步骤5:生成安全测试点分析
**必须包含的安全测试分析**:
- **SQL注入**:参数拼接、特殊字符转义、ORM框架使用、存储过程
- **XSS攻击**:输入过滤、输出转义、富文本处理、CSP策略
- **认证安全**:Token强度、Token过期、Refresh机制、会话管理、暴力破解防护
- **授权安全**:越权访问、水平越权、垂直越权、权限继承、权限缓存
- **敏感数据**:密码加密存储、身份证号脱敏、日志脱敏、传输加密
- **CSRF防护**:Token验证、Referer检查、SameSite Cookie、双重提交
- **信息泄露**:错误信息、堆栈跟踪、调试模式、敏感接口暴露
- **速率限制**:IP限流、用户限流、接口限流、突发流量、熔断降级
### 步骤6:生成性能测试点分析
**适用时的性能测试分析**:
- **响应时间阈值**:P95、P99、平均响应、最大响应、超时设置
- **大数据量处理**:分页深度、批量操作、大数据返回、内存占用
- **并发访问**:锁竞争、死锁、连接池、线程池、异步处理
- **资源消耗**:CPU、内存、磁盘IO、网络IO、文件句柄
- **缓存策略**:缓存命中率、缓存穿透、缓存雪崩、缓存一致性
- **数据库性能**:慢查询、索引使用、连接数、事务、锁等待
### 步骤7:对照常见陷阱检查
最终确定前,验证Top 20必检项的覆盖:
| 类别 | 必检项 | 分析重点 |
|------|--------|----------|
| 参数 | 缺少必填、类型/格式错误、边界值 | 验证是否考虑完整 |
| 权限 | 未认证访问、未授权访问 | 权限矩阵是否覆盖 |
| 安全 | SQL注入、XSS、敏感数据暴露 | 安全场景是否分析 |
| 业务 | 幂等性、唯一性、状态转换 | 业务规则是否完整 |
| 响应 | 状态码一致、字段完整、空结果 | 响应契约是否验证 |
| 性能 | 响应阈值、分页限制、批量限制 | 性能指标是否定义 |
参考 `references/common-pitfalls.md` 获取完整的140点清单。
## 输出格式
### 单接口测试分析格式
```markdown
## API: {接口名称}From LeoYeAI/openclaw-master-skills, MIT.
More from LeoYeAI/openclaw-master-skills
- 0.734score
audit-website
squirrelscan
Audit websites for SEO, performance, security, technical, content, and 15 other issue cateories with 230+ rules using the squirrelscan CLI.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.734score
arista-device-health
network-security-skills-suite
Arista EOS device health check and triage procedure.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.733score
analyticscli-ts-sdk
wotaso
Use when integrating or upgrading the AnalyticsCLI TypeScript SDK in web, TypeScript, React Native, or Expo apps.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.731score
ai-headshot-generation
eachlabs
Generate professional AI headshots from casual photos using each::sense AI.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.731score
acl-rule-analysis
network-security-skills-suite
Vendor-agnostic ACL and firewall rule analysis with shadowed rule detection, overly permissive rule identification, unused rule discovery, redundant rule…
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.729score
agentic-street
agentic-street
Earn yield on USDC by investing in AI-managed DeFi funds, or launch your own fund and build a public track record on Base.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.728score
aureus-arena
aureus-arena
Build and operate autonomous AI agents that compete in Aureus Arena, a fully on-chain Colonel Blotto game on Solana.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.728score
agent-bom
msaad00
Open security platform for agentic infrastructure — broad scanning plus MCP discovery, CVEs, blast radius, SBOMs, CIS benchmarks (AWS, Azure, GCP, Snowflake)…
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.727score
aster-futures
Aster
Aster Futures request using the Aster API.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.725score
anvevoice
AnveVoice
Add AI voice assistants to your website.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.724score
anima
animaapp
Turns ideas into live, full-stack web applications with editable code, built-in database, user authentication, and hosting.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.719score
xaut-trade
aurehub
Buy or sell XAUT (Tether Gold) on Ethereum.
SkillCFreshness: C★ 2.2KClaude Code +9
Signals
- Stars
- 2,168
- Forks
- 325
- Open issues
- 13
- Last commit (this folder)
- Jun 15, 2026 (4 months ago)
- Last release
- Jul 20, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- myclaw.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from LeoYeAI
- 0.552score
aavegotchi-gbm-skill
LeoYeAI
View, create, cancel, bid, and claim Aavegotchi GBM auctions on Base mainnet (8453).
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.552score
aqara-open-api
LeoYeAI
Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON).
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.552score
aawp
LeoYeAI
AAWP (AI Agent Wallet Protocol) — the only crypto wallet protocol built exclusively for AI Agents on EVM-compatible blockchains.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.552score
ai-task-hub
LeoYeAI
AI task hub for image analysis, background removal, speech-to-text, text-to-speech, markdown conversion, and async execute/poll/presentation orchestration.
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.552score
animation-shader
LeoYeAI
READ this skill when implementing or configuring animation-style shaders (Toon/Cel Shaders) — including outlines, rim lighting, toon shading, MatCap…
SkillCFreshness: C★ 2.2KClaude Code +9 - 0.552score
adaptive-learning-playbook
LeoYeAI
World-Class Adaptability & Learning Playbook.
SkillCFreshness: C★ 2.2KClaude Code +9
Cite this page
api-test-create skill. Agent Mart. https://agentmart.dev/skills/leoyeai-api-test-create (last updated 2026-10-24)