Chat History Analyzer
by @austindixson
Extracts and analyzes Cursor IDE chat history to identify key discoveries, obstacles, and solutions, saving findings to the journal.
clawhub install chat-history-analyzerπ About This Skill
name: chat-history-analyzer displayName: Chat History Analyzer | OpenClaw Skill description: Extracts and analyzes Cursor IDE chat history to identify key discoveries, obstacles, and solutions, saving findings to the journal. version: 1.0.0
Chat History Analyzer | OpenClaw Skill
Description
Extracts and analyzes Cursor IDE chat history to identify key discoveries, obstacles, and solutions, saving findings to the journal.
Chat History Analyzer | OpenClaw Skill
Extracts chat history from Cursor IDE's local SQLite databases, analyzes the last hour of conversations for key discoveries, obstacles, and solutions, and saves structured findings to the OpenClaw journal directory.
Usage
# Combined log and chat history analysis (for cron jobs)
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.pyAnalyze last hour of chat history only
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.pyAnalyze last 2 hours
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.py --hours 2Output JSON format
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.py --json
What this skill does
/Users/ghost/.openclaw/journal/ as markdown filesIntegration as a Cron Job
This skill is designed to run hourly via OpenClaw cron. The analyze_logs.py script combines both log analysis and chat history analysis.
Example Cron Job Configuration:
{
"payload": {
"kind": "agentTurn",
"message": "Run analyze_logs.py script to analyze the last hour of logs and Cursor chat history, saving findings to journal.",
"model": "openrouter/google/gemini-2.5-flash",
"thinking": "low",
"timeoutSeconds": 180
},
"schedule": {
"kind": "cron",
"cron": "0 * * * *"
},
"delivery": {
"mode": "announce"
},
"sessionTarget": "isolated",
"name": "Chat History & Log Analysis"
}
Or run directly via shell script:
# Add to crontab (crontab -e)
Run every hour at minute 0
0 * * * * /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.py --json >> /Users/ghost/.openclaw/logs/analyze_logs.log 2>&1
Output Format
Findings are saved to /Users/ghost/.openclaw/journal/chat_analysis_YYYY-MM-DD_HHMMSS.md with sections for:
Requirements
How it works
1. Connects to Cursor's SQLite databases at ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb and workspace-specific databases
2. Extracts messages from the last N hours (default: 1 hour)
3. Analyzes message content using pattern matching for discoveries, obstacles, and solutions
4. Saves structured markdown report to the journal directory
π‘ Examples
# Combined log and chat history analysis (for cron jobs)
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.pyAnalyze last hour of chat history only
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.pyAnalyze last 2 hours
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.py --hours 2Output JSON format
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.py --json