// the find
badlogic/cchistory
Extract and compare system prompts and tools from different Claude Code versions
A CLI that downloads specific npm versions of Claude Code, patches out the auto-update check, and intercepts the actual API request sent to Anthropic to extract the system prompt, tool definitions, and message format. Useful for people reverse-engineering or tracking how Anthropic's own agent harness evolves release to release.
Extracts ground truth by intercepting the real outgoing API request (via claude-trace) instead of guessing from source or docs, so it reflects exactly what the model sees. Supports testing custom/local binaries alongside published versions, which is handy for comparing a fork or dev build against a release. Reasonable test coverage per module (cli-patcher, content-extractor, jsonl-parser, output-formatter, request-filter, version-utils all have their own test files). Took the injection risk in --claude-args seriously enough to use shell-quote and filter shell operators rather than hand-rolling escaping.
Every version you test fires a real haiku request against your Claude account, so a bulk --latest run burns API calls/cost and requires you to be logged in - not something you can run in CI without a live account. Output is just a markdown dump per version (prompts-{version}.md); there's no actual diffing tool, so 'compare different versions' in the description really means 'open two files and read them yourself'. The whole approach is brittle by construction: it depends on patching a specific version-check function and parsing claude-trace's intercepted JSONL, so any upstream change to how Claude Code is packaged or how it talks to the API can silently break extraction. No handling visible for rate limits or auth failures mid-run across many versions, which matters since --latest implies looping over potentially dozens of releases.