api-testing

API testing checks a software service directly through its endpoints, using OpenAPI or Swagger documentation or automated test cases. It can produce and run scripts that test requests and responses.

In plain words
What is it for?
Use it to create and run automated API tests, including checks for access control, repeated operations, concurrent requests, and expected errors.
Why use it?
It helps find problems in parameters, limits, authentication, duplicate requests, concurrent writes, error responses, and data consistency without testing the website's screens.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fishzjp/qa-skills/api-testing
Any agent
npx skills add fishzjp/qa-skills --skill api-testing
Clone the repo
git clone --depth 1 https://github.com/fishzjp/qa-skills

Made for: Claude Code, Codex.

Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00095 $0.02734
Opus 5 $0.00048 $0.01367
Sonnet 5 $0.00019 $0.00547
Haiku 4.5 $0.00010 $0.00273

Measured 3d ago against content hash f5305844cd5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-testing/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API 测试(api-testing)

接口级测试——E2E 之外的另一条执行路径。

  • 输入:API 文档(OpenAPI/Swagger)、用例 Schema 中 execution_model 可自动化的接口用例、被测环境信息(base URL、账号/Token)
  • 输出(落盘):API 测试脚本(pytest + requests,或项目既定技术栈)+ 运行结果(报告条目按 ../core/report-template.md 对齐)
  • 边界:Web UI 流程 → automated-e2e-testing;接口手动用例设计 → test-case-writing;性能压测 → 专项工具(k6/locust,见 test-strategy 的 handoff)

When to Use

  • 给定 OpenAPI/Swagger 文档,需要产出并运行接口自动化测试
  • 从用例 Schema 中筛出接口级可自动化用例,转换为 API 脚本执行
  • 需要覆盖鉴权/越权、幂等、并发写、错误响应等接口层专项

When NOT to Use

  • Web UI 交互流程(点击 / 页面状态)→ automated-e2e-testing
  • 编写接口的手动测试用例 → test-case-writing
  • 端到端流水线 → qa 编排
  • 接口压测 / 限流摸底 → k6 / locust 专项
  • Mock Server 搭建 → 开发协作事项,不在本 skill 范围

脚手架(默认 pytest + requests,可替换为项目既定栈)

api-tests/
├── conftest.py            # fixture:base_url、会话/Token、环境配置(读 .env,不硬编码)
├── common/
│   └── client.py          # 统一请求封装:日志、超时、鉴权头、断言辅助
├── test_{模块}_{接口}.py   # 一个接口一个文件,test 名沿用 TC 编号
└── requirements.txt
# common/client.py —— 统一请求封装(requests.Session 不支持 base_url,必须显式拼接)
class Client:
    def __init__(self, base_url: str, token: str):
        self.base_url = base_url.rstrip("/")
        self.s = requests.Session()
        self.s.headers.update({"Authorization": f"Bearer {token}"})

    def request(self, method: str, path: str, **kwargs):
        url = f"{self.base_url}/{path.lstrip('/')}"
        kwargs.setdefault("timeout", 10)
        return self.s.request(method, url, **kwargs)

    def get(self, path, **kw):  return self.request("GET", path, **kw)
    def post(self, path, **kw): return self.request("POST", path, **kw)
    # put / delete / patch 同理扩展

def login(user: str, password: str) -> str:
    """按项目实际登录接口实现(如 POST /login 换 token)——占位,勿直接照抄"""
    raise NotImplementedError("按项目登录接口实现")
# conftest.py 关键 fixture
@pytest.fixture(scope="session")
def client():
    base_url = os.environ["API_BASE_URL"]          # 环境与账号不硬编码,走环境变量
    token = login(os.environ["API_USER"], os.environ["API_PASSWORD"])
    return Client(base_url, token)

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 137 lines · 95 tokens per session scan A f5305844cd5f

Subscribe to this mod's changes

api-testing is a skill published in the GitHub repository fishzjp/qa-skills (17 stars, last pushed 4d ago), licensed MIT. It adds 95 tokens to every session and 2,734 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

defect-analyzer

Use when someone asks to analyze a defect report, analyze bug data, perform defect metrics analysis, review a defect log, or upload a defect file for quality insights.

ukkuru/testmetry-skills · 38 tokens

test-case-writer

Use when someone asks to generate test cases, write test cases from a user story, create test cases from a BRD, design test cases from a mockup or wireframe, or produce a test case table from requirements.

ukkuru/testmetry-skills · 50 tokens

test-review

Ревью только что написанных или изменённых автотестов на соответствие best practices TypeScript + Playwright (по официальной документации) и конвенциям вашего проекта. Используй по /test-review либо после написания/правки любого теста (UI E2E, API, UI+API, моки, visual, mobile) или Page Object/фикстуры/констант — до…

akovalion/paranoid-qa · 119 tokens

bug-report

Быстрый баг-репорт в Jira. Вызывай по /bug-report. Собирает данные, показывает превью, создает дефект в Jira после подтверждения.

akovalion/paranoid-qa · 41 tokens

interview

Структурированный сбор требований через серию вопросов. Используй, когда задача описана устно/неформально (не из тикета трекера) и перед началом работы нужно прояснить scope, AC и edge cases.

akovalion/paranoid-qa · 52 tokens

test-cases

Составление тест-кейсов по best practice QA с экспортом в CSV для импорта в Zephyr Scale (Option 1) или созданием напрямую через MCP вашей TMS. Используй, когда пользователь просит сгенерировать, составить или подготовить тест-кейсы, чек-листы или CSV для импорта в TMS.

akovalion/paranoid-qa · 76 tokens