By douglance
Query Claude Code and Codex CLI history with SQL, joined with Git commit data, to analyze productivity patterns, session insights, 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 devsqlSkill-centric SDLC. Each software lifecycle phase is a skill that routes to a specialized subagent: feasibility-analysis, requirements-gathering, planning, design, visual-design, implementation, testing, quality, maintenance, deployment, operations, documentation.
Screenshot 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 with 22 MCP tools for session history analysis, error tracking, quality scanning, work patterns, timelines, and bug detection. Focused, fast, and data-driven.
Harness-native ECC operator layer - 67 agents, 278 skills, 94 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.
v9.54.1 — Reliability wave: tangle contextual review correction loop with hard round ceiling, progress-supervised review rounds (per-agent stall watch, descendant-tree kills), council diversity and agy pin fixes, marketplace generator source-of-truth fix, provider troubleshooting runbook and cost-expectations docs. Run /octo:setup.
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.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques