Chat History Analyzer

v1.0.5

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

1· 480·5 current·5 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description claim to extract and analyze Cursor IDE chat history; the packaged Python scripts explicitly open Cursor's local SQLite files under the user's home directory, parse messages, analyze them with pattern matching, and save markdown reports to the OpenClaw journal directory — this is coherent and proportional to the stated purpose.
Instruction Scope
SKILL.md and the scripts instruct the agent to read Cursor's local storage (global and workspace state.vscdb), parse recent messages, and write reports to ~/.openclaw/journal. These actions are within scope but involve reading potentially sensitive chat content from a user's machine; SKILL.md includes example hard-coded paths (e.g., /Users/ghost/...) that are just examples but could confuse users if copied verbatim. There are no instructions that read unrelated system areas or send data to external endpoints.
Install Mechanism
There is no external install/download step (instruction-only skill with embedded Python scripts). No network downloads, package installs, or archive extraction are used. The code relies on Python and sqlite3 which are typical on target systems.
Credentials
The skill declares no required environment variables, credentials, or config paths beyond standard user-home locations. It does import a sibling 'self-optimizer' module (via sys.path manipulation) — that dependency is reasonable for combined log analysis but means the overall behavior depends on the code of that other skill.
Persistence & Privilege
always is false and the skill is user-invocable; SKILL.md suggests running it as an hourly cron job (expected for periodic analysis). Autonomous agent invocation is allowed by default (not flagged here), so if the agent is permitted to schedule or run this skill it will read local chat data on each run — this is a privacy consideration rather than a code-level privilege escalation.
Assessment
This skill appears to do what it says: reading Cursor's local SQLite chat storage, scanning recent messages for discoveries/obstacles/solutions, and writing reports to your OpenClaw journal. Before installing, consider the following: - Privacy: the skill reads local chat history files that may contain sensitive secrets or private content. Only install if you trust the skill and want those chats processed and stored in ~/.openclaw/journal. - Review code: the repository includes Python scripts; inspect them (and the referenced self-optimizer skill) if you have privacy or security concerns. The skill imports a sibling 'self-optimizer' module via sys.path — that dependency influences runtime behavior. - Cron examples: SKILL.md contains example absolute paths with a specific username (e.g., /Users/ghost/...); adjust paths to your environment rather than copying them verbatim. - Limit execution scope: if you plan to schedule it, consider running manually first or restricting the cron to run under a user account with appropriate access. Monitor the journal directory for files the skill creates. - If you need higher assurance: run the scripts in a sandbox or examine runtime logs to confirm no outbound network activity occurs. If you cannot review the code, treat the skill as sensitive because it accesses private chat data.

Like a lobster shell, security has layers — review code before you run it.

latestvk979zdbwnmgjve9z6zhk2kd6k982hyyc
480downloads
1stars
6versions
Updated 1mo ago
v1.0.5
MIT-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
# 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:

{
  "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:

  • 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

Comments

Loading comments...