cchistory  by badlogic

CLI tool for analyzing Claude Code prompt and tool evolution

Created 8 months ago
335 stars

Top 82.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Summary

This utility extracts and compares system prompts and tool definitions across different versions of Claude Code. It targets developers and researchers needing to track prompt evolution, understand tool availability changes, and debug prompt-related issues in Claude Code deployments. The primary benefit is providing a clear, versioned record of Claude Code's internal configurations.

How It Works

The tool employs two main operational modes. In the standard approach, it downloads a specified Claude Code version from npm, modifies its internal version check to bypass automatic updates, and then executes it using claude-trace. A single test haiku request is made to trigger an API interaction, allowing the tool to intercept and parse the system prompt, user message format, and available tools. These extracted details are then saved into version-specific Markdown files. Alternatively, the Custom Binary Mode allows direct execution of a user-supplied Claude Code binary via --binary-path, bypassing the npm download and patching steps while still leveraging claude-trace for extraction.

Quick Start & Requirements

  • Installation: npm install -g @mariozechner/cchistory
  • Prerequisites: Active login session with Claude Code is mandatory for all operational modes.
  • Notes: Each version processed will trigger a single haiku request to Claude, potentially incurring costs for users on pay-per-token plans.
  • Links: Usage examples are provided within the README, but no direct links to official documentation, demos, or community pages are present.

Highlighted Details

  • Supports extracting prompts for a single specified version or a range from a given version up to the latest published release.
  • Facilitates testing of local modifications or forks of Claude Code via the --binary-path option, enabling direct comparison with released versions.
  • The --claude-args parameter allows passing custom arguments to the Claude Code execution, such as MCP configurations or enabling verbose logging, with robust safety measures preventing command injection through shell-quote.

Maintenance & Community

The provided README does not contain information regarding notable contributors, sponsorships, community channels (e.g., Discord, Slack), or project roadmaps.

Licensing & Compatibility

The README does not specify the software license or provide details on compatibility for commercial use or linking with closed-source projects.

Limitations & Caveats

Requires users to be authenticated with Claude Code. The process involves API calls that may incur costs. The tool's functionality is strictly limited to extracting prompts and tools from Claude Code versions.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
130 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.