MCPcopy Index your code
hub / github.com/badlogic/cchistory

github.com/badlogic/cchistory @v1.1.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.9 ↗ · + Follow
11 symbols 24 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cchistory

Extract and compare system prompts and tools from different Claude Code versions.

Prerequisites

  • Claude Code must be installed locally
  • You must be logged in to Claude Code
  • Note: Each version tested will send a single -p "hey" request to Claude, which may incur costs if you're on a pay-per-token plan instead of Claude Max

Installation

npm install -g @mariozechner/cchistory

Usage

cchistory <version> [--latest]

Examples:

# Extract prompts from a single version
cchistory 1.0.0

# Extract prompts from version 1.0.0 to latest
cchistory 1.0.0 --latest

How it works

  1. Downloads the specified Claude Code version from npm
  2. Patches the version check to prevent auto-updates
  3. Runs the patched version with claude-trace to intercept API requests
  4. Sends a single test message (-p "hey") to trigger an API call
  5. Extracts the system prompt, user message format, and available tools from the intercepted request
  6. Saves the results to prompts-{version}.md

Existing prompt files are automatically skipped to avoid redundant downloads and API calls.

Output Format

Each prompts-{version}.md file contains: - User Message: The format of user messages sent to Claude - System Prompt: The system instructions Claude receives - Tools: Available tools with their descriptions and input schemas (excluding MCP tools)

Extension points exported contracts — how you extend this code

CacheControl (Interface)
(no doc)
src/index.ts
InputSchema (Interface)
(no doc)
src/index.ts
RequestResponsePair (Interface)
(no doc)
src/index.ts

Core symbols most depended-on inside this repo

indentHeaders
called by 4
src/index.ts
parseVersion
called by 2
src/index.ts
compareVersions
called by 2
src/index.ts
processVersion
called by 2
src/index.ts
getLatestVersion
called by 1
src/index.ts
getAllVersionsBetween
called by 1
src/index.ts
getVersionReleaseDate
called by 1
src/index.ts
main
called by 1
src/index.ts

Shape

Function 8
Interface 3

Languages

TypeScript100%

Modules by API surface

src/index.ts11 symbols

For agents

$ claude mcp add cchistory \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact