cc-trace
CommunityUnmask Claude Code's API calls, debug with ease.
System Documentation
What problem does it solve?
Claude Code's internal API interactions are often a black box. This Skill provides full transparency, allowing you to see exactly what prompts, tools, and data Claude Code sends to the API and what responses it receives. It simplifies the complex process of setting up and using an HTTPS proxy (mitmproxy) to intercept this traffic, turning a daunting technical task into a guided, interactive experience.
Core Features & Use Cases
- Deep API Insight: Intercept and inspect every Claude Code API request and response, revealing system prompts, tool definitions, and conversation context.
- Effortless Debugging: Quickly diagnose unexpected behavior, tool call failures, or API errors by examining the raw traffic, saving hours of guesswork.
- Performance Optimization: Analyze token usage patterns and identify opportunities to refine prompts and tool interactions for efficiency and cost savings.
- Use Case: If Claude Code is struggling with a complex task or a tool isn't working as expected, use this skill to capture the API calls. You can then inspect the exact system prompt, user messages, and tool parameters sent, allowing you to pinpoint the root cause of the issue and refine your approach.
Quick Start
To begin, ask me to guide you through the setup of cc-trace. I will interactively assist you with installing mitmproxy, configuring its security certificate, and setting up your shell environment to intercept Claude Code's API traffic.
Dependency Matrix
Required Modules
Components
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: cc-trace Download link: https://github.com/alexfazio/cc-trace/archive/main.zip#cc-trace Please download this .zip file, extract it, and install it in the .claude/skills/ directory.