Find the corrections you keep making to Claude,
and fix them for good.
go install github.com/rossedman/sminer/cmd/sminer@latest
The problem
You correct Claude for the same things across repos and weeks: test style, lockfile edits, naming conventions. Each correction costs a turn and some attention, and every one of them is already written down in your session transcripts. Nobody reads them.
sminer reads them. It finds the pushback, interrupts, rewinds and repeated instructions, groups them by the rule underneath, and ranks them by how often they happen and across how many repos.
From friction to fix
When a rule can be checked mechanically, sminer proposes a hook. When it needs judgment, a CLAUDE.md line. When you keep re-explaining a procedure, a skill. Anything you already have is left out.
A PreToolUse script for your hooks directory, plus the settings.json entry that registers it.
if grep -Eq '(^|/)package-lock\.json$'; then
echo 'Blocked: run npm install' >&2
exit 2
fi
A diff appending the rule to the repo's CLAUDE.md, or the global one when it spans repos.
## Learned conventions
+- Write table-driven tests with the
+ standard library, not testify.
A draft SKILL.md with the steps you typed out in session after session, ready to edit.
---
name: pre-commit
description: Before any commit
---
1. make lint 2. make test
3. conventional commit
Why sminer
Corrections, interrupts, rejected tool calls, rewinds, repeated instructions, hook blocks, failure loops and manual fix-ups. Cheap heuristics first; the model only confirms candidates.
Secrets are redacted before anything is stored, and transcripts are never copied. --offline keeps everything local; otherwise only about 2 KB per candidate goes to the classifier.
Each run reads only what's new since the last one. Ninety days of transcripts take well under thirty seconds on a laptop; a repeat run takes a few.
Accepting a finding writes a patch file. You review it and apply it. sminer never touches your CLAUDE.md, settings or hooks.
sminer finding trend splits each finding's weekly rate at the day you adopted the fix, so you can see the correction stop happening.
--json on every command, data on stdout and logs on stderr, documented exit codes, and shell completion of live finding IDs.
Quick start
sminer is a single Go binary with no cgo and no setup: it finds Claude Code's transcripts in ~/.claude/projects on its own. Start offline, then add an API key for sharper results.
$ go install github.com/rossedman/sminer/cmd/sminer@latest
Nothing leaves your machine. The report goes to stdout, or a file with -o.
$ sminer run --offline -o report.md
$ export ANTHROPIC_API_KEY=...
$ sminer run -o report.md
$ sminer finding accept Fc72cc0 --preview
$ sminer finding accept Fc72cc0 # prints the patch path
Commands
Every command has --help with examples, --json for scripts, and errors that tell you what to run next.
--preview to look firstDocumentation