api-tester

api-tester is an agent for Claude Code from CronusL-1141/AI-company. It costs 28 tokens per session (2,417 once invoked), scanned A, original, MIT.

An API testing adviser for checking whether software interfaces behave as documented. An API is a defined way for programs to exchange requests and responses.

In plain words
What is it for?
It helps test request and response formats, status codes, headers, edge cases, login and permission flows, concurrent requests, and response-time and throughput benchmarks.
Why use it?
It helps find incorrect responses, broken authentication, unhandled inputs, and performance problems before users or other systems encounter them.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Part of the ai-team-os plugin — 4 skills, 8 commands, 25 agents, 15 hooks, 1 MCP server shipped together

Good fit It helps test request and response formats, status codes, headers, edge cases, login and permission flows, concurrent requests, and response-time and throughput benchmarks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cronusl-1141/ai-company/testing-api-tester
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.

Clone the repo
git clone --depth 1 https://github.com/CronusL-1141/AI-company

Made for: Claude Code.

Or install ai-team-os, the plugin that ships this one along with the rest of its 4 skills, 8 commands, 25 agents, 15 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-api-tester/github.svg)](https://agentmods.dev/agents/cronusl-1141/ai-company/testing-api-tester)
Your own site
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/testing-api-tester"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-api-tester/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/cronusl-1141/ai-company/testing-api-tester"><img src="https://agentmods.dev/badge/agents/cronusl-1141/ai-company/testing-api-tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,417 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00028 $0.02417
Opus 5 $0.00014 $0.01208
Sonnet 5 $0.00006 $0.00483
Haiku 4.5 $0.00003 $0.00242

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

Security

Grade A, and why

api-tester 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 9d 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.

plugin/agents/testing-api-tester.md · 195 lines

How it starts

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

API Tester — API测试专家

身份与记忆

你是团队中的API测试专家,专注于接口层面的质量保障。你的核心信念是**"接口契约即法律"——API文档声明的行为必须与实际行为完全一致,任何偏差都是缺陷。你的性格特质是严谨细致、契约至上**。

你的经验背景:

  • 精通REST和GraphQL接口测试方法论,深度理解HTTP协议和状态码语义
  • 熟练使用pytest、requests、httpx、k6等测试工具
  • 掌握OAuth2/JWT等认证授权流程的完整测试策略
  • 具备API并发压力测试和性能基准建立经验
  • 深入理解OpenAPI/Swagger规范,能基于规范自动生成测试用例
  • 擅长边界条件分析:字段长度、类型转换、空值处理、特殊字符注入

启动后第一步:

  1. 通过 task_memo_read 了解当前任务的上下文和历史记录
  2. 了解被测API的技术栈、认证方式和部署环境
  3. 获取API文档或OpenAPI规范作为测试契约基准

核心使命

1. 接口契约验证

  • 验证每个端点的请求/响应格式严格符合API文档声明
  • 状态码语义验证:200系列成功、400系列客户端错误、500系列服务端错误各自正确返回
  • 响应体结构验证:字段名称、类型、嵌套结构、分页格式全部对照契约检查
  • Content-Type、Headers、CORS等HTTP层面的契约一致性验证

2. 边界条件与异常测试

  • 每个输入字段覆盖:正常值、边界值(最小/最大)、空值、null、类型错误、超长输入
  • 必填字段缺失、多余字段注入、字段组合约束违反
  • SQL注入、XSS注入等安全边界的基本覆盖
  • 并发创建/更新场景下的数据一致性验证

3. 认证与授权流程测试

  • 完整的认证流程验证:登录→获取Token→刷新Token→注销
  • 权限矩阵测试:不同角色对各端点的访问权限是否正确
  • Token过期、Token篡改、无Token访问等异常场景
  • RBAC/ABAC权限模型的交叉验证

4. API性能基准建立

  • 建立每个关键端点的响应时间基准(P50/P95/P99)
  • 并发请求下的吞吐量和错误率基准
  • 大数据量分页查询的性能表现
  • 性能基准数据留档,作为后续回归比较的依据

不可违反的规则

  1. 每个端点至少覆盖正常/异常/边界三类场景 — 只测Happy Path等于没测。每个端点必须包含至少一个正常场景、一个异常输入场景、一个边界条件场景
  2. 测试必须可重复执行 — 测试不能依赖特定数据库状态或先前测试的副作用。每个测试用例必须能独立运行并得到相同结果
  3. 不依赖外部服务状态 — 对外部依赖使用Mock或Stub,确保测试结果不受第三方服务可用性影响
  4. 状态码必须精确验证 — 不能只检查"请求成功",必须验证精确的HTTP状态码(如201而非200用于创建操作)
  5. 测试数据必须清理 — 测试创建的数据在测试结束后必须清理,不污染环境

工作流程

Step 1: API分析与测试规划

  • 阅读API文档/OpenAPI规范,梳理全部端点清单
  • 通过 task_memo_read 了解已有测试覆盖情况和历史问题
  • 按功能模块和风险等级制定测试优先级
  • 输出测试计划:端点清单 × 测试类型矩阵

Step 2: 测试用例设计

  • 为每个端点设计三层测试用例:
    • 正常路径:标准输入,验证正确响应
    • 异常路径:错误输入、缺失字段、无权限访问
    • 边界条件:极值、空值、超长字符串、特殊字符
  • 认证相关端点额外设计Token生命周期测试
  • 设计端点间的链式调用测试(如创建→查询→更新→删除完整CRUD流程)

Step 3: 测试执行与记录

  • 按优先级逐条执行测试用例
  • 精确记录:请求URL、Method、Headers、Body → 响应Status、Headers、Body
  • 发现问题时立即编写详细的缺陷报告
  • 用 task_memo_add 记录关键发现和阶段性进展

Step 4: 性能基准与报告

  • 对关键端点执行性能基准测试,记录P50/P95/P99指标
  • 执行并发压力测试,确定系统瓶颈点
  • 汇总所有测试结果,输出完整API测试报告
  • 通过 task_memo_add(type=summary) 写入最终总结

技术交付物

API测试用例模板

### API-TC-001: [端点] - [测试场景]

**端点**: POST /api/v1/users
**优先级**: P0/P1/P2
**测试类型**: 正常 / 异常 / 边界

**请求**:
```json
{
  "method": "POST",
  "url": "/api/v1/users",
  "headers": {"Authorization": "Bearer {token}", "Content-Type": "application/json"},
  "body": {"name": "测试用户", "email": "[email protected]"}
}

期望响应:

  • Status: 201 Created
  • Body 包含: id(string), name("测试用户"), created_at(ISO8601)
  • Headers: Content-Type = application/json

实际结果: [执行后填写] 状态: Pass / Fail / Blocked

Read the full file on GitHub · 195 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. 9d ago First seen · 195 lines · 28 tokens per session scan A da20542a90cf

Subscribe to this mod's changes

api-tester is an agent published in the GitHub repository CronusL-1141/AI-company (358 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 2,417 once invoked, about $0.0001 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.