Agent Skills
› xiaoY233/Chat2API
› chat2api-tool-client-replay
chat2api-tool-client-replay
GitHub用于重放经过清理的客户端工具调用夹具,针对Chat2API进行特定客户端的通过/失败规则验证。支持Cherry Studio、OpenAI兼容及HAR衍生客户端,可分别验证流式与非流式行为。
触发场景
需要验证特定客户端(如Cherry Studio)与Chat2API的工具调用兼容性
基于HAR记录或手动构造的夹具进行自动化回归测试
检查不同客户端配置下的协议期望和响应一致性
安装
npx skills add xiaoY233/Chat2API --skill chat2api-tool-client-replay -g -y
SKILL.md
Frontmatter
{
"name": "chat2api-tool-client-replay",
"description": "Use when replaying sanitized client tool-calling fixtures against Chat2API with client-specific pass\/fail rules."
}
Chat2API Tool Client Replay
Use this skill to replay fixture scenarios for clients such as Cherry Studio, generic OpenAI tools, or unknown HAR-derived clients.
Rules
- Preserve exact tool names.
- Validate stream and non-stream behavior separately.
- Use profiles for client-specific prompt-protocol expectations.
Commands
CHAT2API_API_KEY=sk_xxx \
node skills/chat2api-tool-client-replay/scripts/replay-client-fixture.mjs \
--fixture backup/har/cherry-studio-fixture.json \
--profile cherry-studio \
--model deepseek-v4-flash
Use --dry-run to check profile, model, and fixture selection without live requests. If the fixture file exists, dry-run parses the fixture schema and reports fixtureExists plus scenarioCount; if it is missing, dry-run still exits successfully with fixtureExists: false.
Profiles
cherry-studio: Cherry Studio headers and visible prompt-tool-use expectations.openai-tools: generic OpenAI-compatible tool-calling expectations.custom-har: empty client headers for replaying sanitized HAR-derived fixtures.
版本历史
- 59f03ab 当前 2026-07-05 20:17


