一键导入
一键导入
Generate and compare multiple implementation variants with benchmarking and scoring
Advanced browser automation for AI agents with snapshot-ref interaction pattern - navigate, snapshot interactive elements with refs, click/fill/select by refs, manage sessions, and extract structured data
Design RESTful APIs with best practices, conventions, and OpenAPI specs
Generate API documentation from code - produce OpenAPI/Swagger specs, Markdown API references, request/response examples, and interactive documentation from source code analysis
Universal API gateway - connect to 100+ APIs with a unified interface, manage API keys, and chain API calls
双阶段架构模式 - 先规划后编辑,分离推理与代码修改,提升多文件编辑准确率
| name | api-tester |
| display-name | API Tester |
| description | API测试技能 - IPC处理器发现、测试生成、健康检查、回归测试 |
| version | 1.0.0 |
| category | testing |
| user-invocable | true |
| tags | ["api","test","ipc","rest","health-check","regression","mock"] |
| capabilities | ["ipc-discovery","test-generation","health-check","regression-testing","mock-injection"] |
| tools | ["file_reader","file_writer","code_analyzer"] |
| handler | ./handler.js |
| instructions | Use this skill to discover, test, and validate IPC handlers and REST API endpoints. Scan source code for ipcMain.handle() registrations, generate test stubs with appropriate mocks, run health checks against all registered channels, and perform regression testing. This is complementary to test-generator which focuses on unit tests for source functions, while api-tester focuses on interface-level testing. |
| examples | [{"input":"/api-tester --discover src/main/","output":"Discovered 200+ IPC handlers across 20 modules: audit (18), marketplace (22), skills (17)..."},{"input":"/api-tester --generate src/main/audit/audit-ipc.js","output":"Generated 18 test cases for audit IPC handlers with mock EventEmitter and DB stubs"},{"input":"/api-tester --health-check all","output":"Health check: 195/200 handlers responding, 5 handlers require initialization"}] |
| os | ["win32","darwin","linux"] |
| author | ChainlessChain |
自动发现和测试 IPC 处理器及 REST API 端点。扫描源代码中的 ipcMain.handle() 注册,生成测试用例,执行健康检查和回归测试。
/api-tester [操作] [目标路径] [选项]
/api-tester --discover src/main/
扫描所有源文件,提取:
ipcMain.handle('channel', handler) 注册ipcMain.on('channel', handler) 监听器/api-tester --generate src/main/audit/audit-ipc.js
为每个发现的处理器生成:
/api-tester --health-check all
对所有已注册的 IPC 通道执行:
/api-tester --regression src/main/marketplace/marketplace-ipc.js
基于已有测试用例:
IPC Handler Discovery Report
=============================
Total handlers: 200+
By module:
audit-ipc.js: 18 handlers
marketplace-ipc.js: 22 handlers
skills-ipc.js: 17 handlers
...
生成可直接运行的 Vitest 测试文件:
describe("audit-ipc handlers", () => {
it("audit:get-logs should return paginated logs", async () => {
// ...
});
});
发现所有 IPC 处理器:
/api-tester --discover src/main/
为特定模块生成测试:
/api-tester --generate src/main/hooks/hooks-ipc.js
运行全局健康检查:
/api-tester --health-check all