rackyun

Local Agent Schemathesis — Development skill for Claude Code

Development community

本地 Agent + Schemathesis 工作流设计 这是一套完全自托管、零许可成本的方案,适合替代 Keploy / Karate Agent.

How to install Local Agent Schemathesis

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rackyun/local-agent-schemathesis and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Local Agent Schemathesis does

本地 Agent + Schemathesis 工作流设计 这是一套完全自托管、零许可成本的方案,适合替代 Keploy / Karate Agent。核心思路是: Schemathesis 负责从 OpenAPI 自动生成海量属性测试(正例、边界、负例、状态机) 本地 Agent(Claude Code / Cursor / Continue + 本地模型)负责补全业务规则、分析失败、生成自定义检查、维护 Schema

Alternatives in Development

  • Coding Agent Session Search — Unified TUI and CLI to index and search your local coding agent session history across 11+ providers (Codex, C 708 ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
  • Premiere Pro MCP — Adobe Premiere Pro MCP — independent, local-first server for supported workflows 292 ★

README

local-agent-schemathesis

这是一个供本地 Agent(如 Codex、Claude Code 或 Cursor)使用的 API 测试 skill。它把接口契约检查、业务流程验证和失败分析放进同一套工作流,帮助发现实现与 OpenAPI 或业务规则的偏差。

  • Schemathesis 契约测试根据 OpenAPI 运行示例并生成边界用例和正负例,检查请求和响应是否符合规范。
  • Agent 多接口场景测试根据技术设计和测试目标整理业务断言。场景 YAML 确认后生成独立的 pytest 测试,例如验证建单后能按返回的 ID 查到同一笔订单。
  • 联合测试用一份计划统一两类测试的范围、规模和覆盖目标。离线 HTML 报告汇总运行状态、覆盖缺口、失败明细及本轮证据。

快速开始

  1. 准备 OpenAPI 和可写入测试数据的环境。验证多接口场景时,再提供可读取的技术设计和测试目标。
  2. 安装技能后,在被测项目中打开 Agent,按目标选一条示例提示词。
  3. 执行后打开被测项目下的 test-reports//index.html。

安装技能

在**被测项目根目录**执行下面的命令。示例使用 Codex 的项目目录。使用 Claude Code 或 Cursor 时,只需把 `SKILLS_DIR` 的值替换为表中对应的目录。

Agent 项目技能目录
Codex .agents/skills
Claude Code .claude/skills
Cursor .cursor/skills
SKILLS_DIR=.agents/skills
mkdir -p "$SKILLS_DIR" &&
  git clone https://github.com/rackyun/local-agent-schemathesis.git "$SKILLS_DIR/local-agent-schemathesis"

安装整包,确保 `SKILL.md`、`references/`、`scripts/` 和脚本依赖的 `evals/` 位于同一个 `local-agent-schemathesis` 目录。在被测项目中打开 Agent,在对话里明确说「使用 `local-agent-schemathesis`」。如果 Agent 不自动发现技能,请它读取本地克隆目录中的 `SKILL.md` 并按其工作流操作。

生成测试用例

将示例中的文件路径和接口换成项目实际值,再把对应提示词发给 Agent。

**单接口 OpenAPI 契约测试**

使用 local-agent-schemathesis,读取 openapi.yaml,为 POST /orders 准备 Schemathesis 契约测试。覆盖规范示例、字段边界及有效和无效输入,列出检查项和运行命令,先不运行。

Schemathesis 在运行时按 OpenAPI 生成契约用例。如果规范声明了可用的 `links`,也可用 `stateful` 阶段按契约串联请求。跨步骤的业务断言由下面的场景测试验证。

**多接口业务场景**

使用 local-agent-schemathesis,读取 openapi.yaml 和技术设计 docs/order-flow.md。验证建单后能按返回的 ID 查到同一笔订单,并清理本轮创建的数据。先给我场景 YAML 草稿,确认后再生成 pytest,先不运行。

**Schemathesis + Agent 联合测试**

使用 local-agent-schemathesis,读取 openapi.yaml 和技术设计 docs/order-flow.md,为订单创建和查询生成契约测试与多接口场景。先给统一测试计划,再生成 Schemathesis 配置和场景 YAML。等我确认 YAML 后生成 pytest,先不运行。

**只做规划**

使用 local-agent-schemathesis,读取 openapi.yaml 和技术设计 docs/or