Use when the user asks what keeps going wrong, after a session where the agent needed repeated correction, or before hardening the environment, to mine past OpenCode sessions in this repository for recurring corrections.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Past corrections are a materialized process. They are the spec for what the environment should have prevented.
From any worktree of this repository:
python3 .agents/skills/mine-agent-transcripts/scan.py --days 30
python3 .agents/skills/mine-agent-transcripts/scan.py --days 90 --corrections--corrections narrows to user turns that look like a correction. --full keeps
long messages intact. The script is read-only, resolves the project root through
git rev-parse --git-common-dir, and matches every session and worktree of the
project.
Set OPENCODE_DB to read another OpenCode database. The script covers OpenCode
sessions only, not Claude Code or Cursor history.
Group the turns by what the agent kept getting wrong. A cluster needs at least two turns and the same underlying shape:
Write one line per cluster with links to the turns. Ignore preferences that appear once and never again; they are noise, not process.
Pass the cluster list to harden-environment. Each cluster becomes one constraint,
at the cheapest layer that makes the mistake impossible. If no constraint is
possible, the cluster is a judgment call: write the rule once, with the why, and
stop repeating it.
dwojtaszek/zipper
5b08822
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.