# Chat2api Tool Client Replay

> Chat2api Tool Client Replay is an Agent Skill for testing & quality published in the xiaoY233/Chat2API repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when replaying sanitized client tool-calling fixtures against Chat2API with client-specific pass/fail rules.

- Skill name: `chat2api-tool-client-replay`
- Category: [Testing & Quality](https://www.openparable.com/skill/testing-quality/1)
- Source: https://github.com/xiaoY233/Chat2API/blob/HEAD/skills/chat2api-tool-client-replay/SKILL.md
- Repository: xiaoY233/Chat2API (1,294 GitHub stars when collected)

## SKILL.md

# 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

```bash
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.

---

Source: https://www.openparable.com/skill/testing-quality/chat2api-tool-client-replay (OpenParable). Cite the canonical URL above.
