원클릭으로
test-real-claude-api-requests
Capture real Claude Code API traffic through the proxy and validate against Zod schemas
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Capture real Claude Code API traffic through the proxy and validate against Zod schemas
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | test-real-claude-api-requests |
| description | Capture real Claude Code API traffic through the proxy and validate against Zod schemas |
| user-invocable | true |
Capture live Claude Code traffic through the cc-proxy, sanitize it, and run schema validation tests.
Start the proxy server on port 25947:
bun --hot src/index.ts &
sleep 2
Run a Claude Code session routed through the proxy to generate multi-turn traffic (tool_use, tool_result, system blocks, streaming):
ANTHROPIC_BASE_URL=http://localhost:25947/proxy CLAUDECODE= claude --print --model claude-haiku-4-5-20251001 "Read the file package.json and tell me the project name."
Save captured logs from the in-memory store to logs/ in the standard format:
curl -s http://localhost:25947/api/logs
Write each log entry to logs/<id>.json with the {id, timestamp, request: {method, path, headers, body}, response: {...}} shape.
Stop the proxy server.
Run the sanitize script to strip personal data from all logs and generate deduplicated test fixtures:
rm -f src/proxy/__fixtures__/*.json
bun scripts/sanitize-logs.ts
This replaces all string values with "<string>" while preserving Zod schema discriminators (text, tool_use, tool_result, thinking, image, user, assistant). Fixtures are named by content hash (Bun.hash base-36) and duplicates are skipped.
Run the schema tests:
bun test src/proxy/schemas.test.ts
Report results: how many fixtures parsed, any failures, which content block types were covered.