/sir-albert:retrofrom Sir Albert
Use when running a self-improvement loop over recent sessions to surface skill edits — new trigger phrases, description tweaks, skill merges, new-skill candidates — as a draft for approval. Triggers on "/retro", "retro", "self-improve skills", "what should the OS learn", "review recent corrections", or "skill trigger fixes". Never auto-applies changes.
Ships in Sir Albert. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Boot from os/PREAMBLE.md — load USER identity + active rules + anti-slop / use-the-skill contract before proceeding.
Announce at start: "Running /sir-albert:retro — scanning sessions for skill-improvement signals."
PRIMARY (always present, zero external deps): the raw Claude Code transcripts at ~/.claude/projects/<project-hash>/*.jsonl — every session's full text (corrections, re-explained context, missed triggers). Retro works from these alone — proven. This is the Claude-Code-native data source; it needs nothing installed.
OPTIONAL (metrics enhancement): axcli analytics — ~/.claude/analytics.duckdb. Adds structural cuts (skill-firing counts, AskUserQuestion rejections, slash commands). Requires duckdb; if it's not installed, SKIP §2 entirely and work from transcripts.
The three layers:
~/.claude/projects/<hash>/*.jsonl. The only place actual corrections / re-explains live. Always read these.~/.claude/analytics.duckdb (DuckDB). Skip if duckdb absent. No prompt text (privacy: metadata only).~/.claude/sir-albert-sessions.jsonl (the session-record.sh hook): session_id, project, git_branch/head/dirty. Maps a session → git context. Nice-to-have.First: command -v duckdb >/dev/null || { echo "duckdb absent — skipping structural pass, using transcripts only"; } and skip the rest of §2 if it's missing. Otherwise ensure the analytics DB is fresh, then query it:
DB="$HOME/.claude/analytics.duckdb"
if [ ! -f "$DB" ] || [ $(( $(date +%s) - $(stat -f %m "$DB" 2>/dev/null || stat -c %Y "$DB") )) -gt 3600 ]; then
INGEST=$(find "$HOME/.claude/plugins/cache/agentic-builders-hub/axcli" -name ingest.py 2>/dev/null | head -1)
[ -n "$INGEST" ] && python3 "$INGEST" # ~10-30s; reads all session JSONL
fi
MANDATORY before writing SQL: read **/axcli/knowledge/semantic-layers.md (Glob) for exact columns/joins. Then run structural cuts over the last 7d (duckdb "$DB" -markdown -c "..."), filtering is_agent = false:
tool_uses where tool_name='Skill': which sir-albert skills fired, how often, in which projects. A skill that never fires despite relevant work = a trigger/description gap.AskUserQuestion rejections (proxy: I asked and Gal redirected) → flag those session_ids for a transcript read in §3.history where display LIKE '/%': what Gal invokes by hand that a skill could auto-trigger.(Join to session_meta.project_path for readable project names.)
For sessions flagged in §2 (rejections / high-activity-no-skill), locate the raw transcript by session_id and read it for:
| Signal | Examples |
|---|---|
| Explicit corrections | "did you use the skill?", "use X instead", "that's not how X works" |
| Missed triggers | a skill's trigger words appeared but the skill didn't fire |
| Slop / quality | "too verbose", "cut the fluff", repeated anti-slop nudges |
| Re-explained context | the same background re-stated across ≥2 sessions → rule/skill candidate |
| Naming drift | a variant phrase no existing trigger catches |
Scope it: only read transcripts the structural pass flagged (or the last few in the window) — never read every transcript every run.
RECOMMENDED: <skill-name or "new skill">
type: trigger-phrase | description-tweak | skill-merge | new-skill
signal: <what was observed, with session id/date + source layer>
proposed change: <exact diff or new text>
rationale: <one sentence>
rules/autonomy.md).Retro handles the long tail of trigger misses + quality drift. Hard gates (consent, naming, safety) stay in dedicated guardrails — retro doesn't touch those.
TODO(gal): run the backfill once (heavy). First pass = one big axcli query over ALL history (skill adoption + rejection hotspots across the ~3,853 prompts) + a transcript sweep of the top-flagged sessions. Large separate run — not part of a normal retro.
Append this as the third element of the existing SessionEnd array in ~/.claude/settings.json.
WARNING: APPEND — do NOT replace the array, or you break token-optimizer (measure.py collect) and axcli (_session-end). Keep all three entries.
{ "hooks": [ { "type": "command", "command": "bash /Users/galta/Development/sir_albert/plugins/sir-albert/hooks/session-record.sh" } ] }
Full resulting array for reference:
"SessionEnd": [
{ "hooks": [ { "command": "python3 /Users/galta/.claude/token-optimizer/skills/token-optimizer/scripts/measure.py collect --quiet", "type": "command" } ] },
{ "hooks": [ { "command": "/Users/galta/.local/bin/axcli _session-end", "type": "command" } ] },
{ "hooks": [ { "type": "command", "command": "bash /Users/galta/Development/sir_albert/plugins/sir-albert/hooks/session-record.sh" } ] }
]
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gal-tab/sir_albert --plugin sir-albert42 skills in this plugin
/board-of-advisorsAssemble a virtual "Board of Advisors" offering 4 distinct perspectives on a problem, decision, or strategy. Use when the user asks for "board of advisors", "multiple perspectives", "evaluate this decision from different angles", or "4 points of view"./brainstormUse when exploring angles, sharpening thinking, attacking a plan, running a panel of advisors, drilling an idea with relentless questions, zooming out on context, designing a solution, or receiving a context dump asking for your opinion or a recommendation. Triggers on: "brainstorm this", "grill this", "attack this", "zoom out", "play devil's advocate", "let's design this", "board of advisors", "sharpen this", "stress test this", "find holes in this", "fresh perspective", "4 perspectives", "want to build X", "want to understand what's happening", "look at this and advise", "what's really going on here", "here's the situation"./buildOther plugins' skills for the same job