A Claude Code plugin that logs every prompt and the code diff it produces. Built for analyzing Claude Code's response accuracy.
Every time you send a prompt to Claude Code that results in code changes, this plugin records:
- Your exact prompt text
- The git diff of all code changes (committed + uncommitted + new files)
- Timestamps (prompt submitted, Claude stopped)
- Files changed list and count
- Git HEAD before and after
Prompts that don't produce code changes are skipped.
# Add as a marketplace source
/plugin marketplace add your-github-username/prompt-tracker-plugin
# Install the plugin
/plugin install prompt-trackerOr test locally:
claude --plugin-dir /path/to/prompt-tracker-pluginThe plugin works automatically in the background. Just use Claude Code normally in any git repo.
Use the slash command:
/prompt-tracker:view-log # today's entries
/prompt-tracker:view-log 2026-04-21 # specific date
/prompt-tracker:view-log --all # all entries
/prompt-tracker:view-log --stats # summary statistics
/prompt-tracker:view-log --json # raw JSONL for scripting
Logs are stored as JSONL at ~/.prompt-tracker/logs/YYYY-MM-DD.jsonl (or in the plugin data directory if installed via marketplace).
Each line is a JSON object:
{
"session_id": "abc123",
"prompt": "add error handling to the upload function",
"prompt_timestamp": "2026-04-21T14:30:00Z",
"stop_timestamp": "2026-04-21T14:31:15Z",
"cwd": "/home/user/my-project",
"head_before": "a1b2c3d4",
"head_after": "e5f6g7h8",
"diff": "--- a/upload.js\n+++ b/upload.js\n...",
"files_changed": ["upload.js"],
"file_count": 1,
"new_files": []
}jq(for JSON processing)git(diffs are git-based)- Only works inside git repositories
Two hooks:
UserPromptSubmit— fires when you send a prompt. Snapshots the git state (HEAD rev, baseline diff, untracked files).Stop— fires when Claude finishes. Computes the diff between the snapshot and current state, subtracts any pre-existing changes, and logs the entry.
MIT