Skip to content
Back to skills

Chat History Analyzer

ASecurity

Extracts and analyzes Cursor IDE chat history to identify key discoveries, obstacles, and solutions, saving findings to the journal.

  • 21 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
researchpythongoshellbashsqldatabase

Works with

  • cursor

Security analysis

A93/100
  • highCreates or modifies cron jobs for persistent execution

Pro scans all 5 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill chat-history-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Chat History Analyzer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Chat History Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-chat-history-analyzer/badge)](https://www.skillsdirectory.com/skills/modbender-chat-history-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

- As a scheduled cron job to continuously track insights from chat history
- Manually to analyze recent chat activity
- To identify recurring patterns, problems, or solutions in your workflow

```bash
# Combined log and chat history analysis (for cron jobs)
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.py

# Analyze last hour of chat history only
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.py

# Analyze last 2 hours
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/chat_history_analyzer.py --hours 2

# Output JSON format
python3 /Users/ghost/.openclaw/workspace/skills/chat-history-analyzer/scripts/analyze_logs.py --json
```


## What this skill does

- **Extracts** chat history from Cursor's SQLite databases (global and workspace-specific)
- **Analyzes** the last hour of messages for patterns indicating discoveries, obstacles, and solutions
- **Saves** structured findings to `/Users/ghost/.openclaw/journal/` as markdown files
- **Runs** automatically via cron job every hour


## Integration 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:**

```json
{
  "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:**

```bash
# 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:

- **Key Discoveries**: Successful findings, realizations, and implementations
- **Obstacles Encountered**: Errors, failures, and blockers
- **Solutions Found**: Fixes, workarounds, and resolutions


## Requirements

- Cursor IDE installed with chat history stored locally
- SQLite3 available (usually pre-installed on macOS)
- OpenClaw journal directory writable


## 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

Files in this skill

  • README.md1.2 KB
  • SKILL.md3.7 KB
  • scripts/analyze_logs.py4.8 KB
  • scripts/chat_history_analyzer.py14.9 KB
  • scripts/combined_analysis.py4.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in research →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.