diag-extract
Installation
SKILL.md
Diag Extract
Harvest finished diagnoses from session history into the vault. Two passes: a dry-run that lists every candidate with a verdict, then extraction one session at a time through /skill:diag-write.
Step 1 — Discover candidates
The invocation marker is the skill injection, not the string skill:diagnosing-bugs — that string appears inside other skills' injected bodies and produces false positives by the dozen:
rg -l '<skill name=\\"diagnosing-bugs\\"' ~/.pi/agent/sessions --glob '*.jsonl'
Note the backslash-escaped quotes: the injection lives inside a JSON string. Include subagent fork sessions (they carry the marker too when the diagnosis ran in a child).
Step 2 — Dry-run: triage every candidate
For each candidate, read the session's entries and assign a verdict — no vault writes in this pass: