cchistory tracks and retrieves your Claude Code session history, enabling quick access to previous commands and outputs. Operations teams benefit from faster debugging and workflow continuity. Integrates with Claude Code CLI, enhancing terminal-based development workflows.
git clone https://github.com/eckardt/cchistory.gitcchistory retrieves all Bash commands Claude Code has executed across your projects, making them searchable and reusable. When Claude Code runs commands via the Bash tool, they normally don't appear in your shell history, making it difficult to re-run useful commands or learn from Claude's patterns. This tool streams through Claude Code's conversation logs stored in ~/.claude/projects/, extracts executed commands, and displays them in a numbered format compatible with standard Unix tools like grep, tail, and awk. Developers and operations teams use cchistory to debug faster, document command sequences, rebuild previous workflows, and analyze command patterns Claude uses across multiple projects.
[{"step":"Identify the session or task. Use `cc history list` in the Claude Code CLI to list recent sessions, or specify a session ID if you know it.","tip":"Use `cc history list --filter \"error\"` to quickly find sessions with errors."},{"step":"Retrieve the history. Run `cc history get [SESSION_ID_OR_NAME]` to fetch the full session data, or use the prompt template above to summarize it directly.","tip":"For large sessions, use `cc history get [SESSION_ID] --limit 50` to limit the output to the most recent commands."},{"step":"Analyze the output. Look for patterns in errors, failed commands, or repeated operations. Use the summary table to identify key issues or successes.","tip":"Focus on timestamps to correlate commands with external events (e.g., deployments, API changes)."},{"step":"Take action. Based on the summary, either rerun commands, fix errors, or document the findings for your team.","tip":"Use `cc history export [SESSION_ID] --format json` to save the session data for further analysis or sharing."}]
Retrieve and re-run useful commands Claude Code executed in past sessions
Search for specific command patterns across all projects using grep
Debug workflows by reviewing command sequences from previous work
Document command sequences for reproducible processes and team knowledge
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/eckardt/cchistoryCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Retrieve and summarize the Claude Code session history from [SESSION_NAME_OR_ID]. Focus on commands related to [SPECIFIC_TASK_OR_ERROR]. Extract key outputs, errors, and timestamps for debugging. Format the summary as a markdown table with columns: Timestamp, Command, Output/Error, and Notes.
Here’s a summary of your Claude Code session history for **Session ID: cc-20240515-1422** (focused on debugging a Python API integration issue): | Timestamp | Command | Output/Error | Notes | |--------------------|----------------------------------|------------------------------------------------------------------------------|--------------------------------| | 2024-05-15 14:23:12 | `pip install requests` | Successfully installed requests-2.31.0 | Dependency resolved | | 2024-05-15 14:25:07 | `python api_client.py test` | `KeyError: 'API_KEY'` | Missing environment variable | | 2024-05-15 14:27:45 | `export API_KEY=your_key_here` | Environment variable set | Fixed in next run | | 2024-05-15 14:29:10 | `python api_client.py test` | `200 OK` with mock response | Integration test passed | | 2024-05-15 14:31:22 | `git commit -m "Fix API auth"` | `On branch main: [new commit] Fix API auth (#123)` | Change tracked | **Key Findings:** 1. The initial error was due to a missing `API_KEY` environment variable. 2. After setting the variable, the API integration test passed successfully. 3. The fix was committed to the repository as commit `#123`. **Recommended Next Steps:** - Add `API_KEY` to your `.env` file for persistence. - Run the integration test again to confirm the fix in a clean environment. - Share this summary with your team for context on the debugging process.
AI assistant built for thoughtful, nuanced conversation
Secure bash execution for AI agents
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan