By douglance
Run SQL queries against Claude Code/Codex CLI history and Git repository data to analyze productivity patterns, session insights, commit correlations, and tool usage.
Query your AI coding history to become a better prompter.
DevSQL lets you analyze your Claude Code and Codex CLI conversations alongside your Git commits. Find your most productive prompts, identify patterns in successful coding sessions, and learn what actually works for you.
Your ~/.claude/ and ~/.codex/ folders contain a goldmine of data: every prompt you've written, every tool used, every conversation that led to shipped code. DevSQL turns that into queryable insights.
Ask questions like:
# See which prompts preceded commits
devsql "SELECT h.display as prompt, COUNT(c.id) as commits_after
FROM history h
LEFT JOIN commits c ON DATE(datetime(h.timestamp/1000, 'unixepoch')) = DATE(c.authored_at)
GROUP BY h.display
HAVING commits_after > 0
ORDER BY commits_after DESC
LIMIT 20"
# High prompt count + few commits = struggling
devsql "SELECT
DATE(datetime(h.timestamp/1000, 'unixepoch')) as day,
COUNT(*) as prompts,
COUNT(DISTINCT c.id) as commits,
CAST(COUNT(*) AS FLOAT) / MAX(1, COUNT(DISTINCT c.id)) as struggle_ratio
FROM history h
LEFT JOIN commits c ON DATE(datetime(h.timestamp/1000, 'unixepoch')) = DATE(c.authored_at)
GROUP BY day
ORDER BY struggle_ratio DESC
LIMIT 10"
# What tools correlate with productivity?
ccql "SELECT tool_name, COUNT(*) as uses
FROM transcripts
WHERE type = 'tool_use'
GROUP BY tool_name
ORDER BY uses DESC"
Tell Claude Code to query your history:
"Use devsql to find my 10 most effective prompts from the past month—the ones that led to commits the same day. Then analyze what they have in common."
"Query my Claude history to find sessions where I used many prompts but made few commits. What was I struggling with?"
"Find patterns in my successful refactoring sessions using devsql."
Install the plugin to use devsql directly within Claude Code:
/plugin marketplace add douglance/devsql
/plugin install devsql@devsql
Restart Claude Code to load the plugin. The plugin auto-installs the devsql binary on first use.
Usage:
/devsql:query SELECT * FROM history LIMIT 10 - Direct SQL queries/devsql:query SELECT * FROM jhistory LIMIT 10 - Codex CLI prompt historybrew install douglance/tap/devsql
Download from GitHub Releases for macOS or Linux.
git clone https://github.com/douglance/devsql.git
cd devsql && cargo install --path crates/devsql
| Tool | What It Queries |
|---|---|
ccql | Your Claude Code + Codex CLI data (~/.claude/, ~/.codex/) |
vcsql | Your Git repositories |
devsql | Both together—join conversations with commits |
Claude Code: history (your prompts), transcripts (full conversations), todos (tasks)
Codex CLI: jhistory (prompt history from history.jsonl), codex_history (alias)
Git: commits, branches, tags, diffs, diff_files, blame
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub douglance/devsql --plugin devsqlScreenshot annotation tool that bridges human visual thinking with AI comprehension
LLM protection hook - blocks secrets, dangerous commands, and data exfiltration
Meta-Cognition tool for Claude Code: session history analysis, workflow optimization, and 21 MCP tools for deep session insights.
Persistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Superpowers Plus core skills library for Claude Code: planning, execution routing, TDD, debugging, and collaboration workflows
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.