skills/retro-notes-refactor/SKILL.md
Refactor an accumulated `l-lessons-*` skill (created by /retro-notes) when later entries partially supersede or extend earlier ones, so future planning agents see the cross-cutting wisdom first instead of having to read every dated entry. Use when (1) the user says "lessons refactor", "retro refactor", "retro-notes refactor", "refactor lessons", or "synthesize lessons", (2) a `/retro-notes` session just added a new dated entry that broadens / narrows / contradicts a claim in an earlier entry on the same area, (3) an `l-lessons-*/SKILL.md` has 5+ dated entries on the same problem area OR exceeds ~500 lines, (4) the next `/big-plan` run in that area would have to scan many entries to find the relevant pattern. Produces a top-of-file "Recurring patterns (synthesized)" section in Trigger/Action/See format, adds Caveat notes to entries whose claims were later widened, updates the frontmatter description with pattern keywords, and formats with mdx-formatter. Does NOT delete historical entries — they remain as terse drill-down postmortems. Pair with /retro-notes (which writes new entries) and /big-plan (which reads the synthesized section first).
npx skillsauth add takazudo/claude-resources retro-notes-refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Synthesize cross-cutting wisdom across the dated entries in an l-lessons-* skill so future planning agents can read patterns first and drill into history second.
The retro-notes skill writes one dated entry per dev session. Over time multiple entries on the same problem area accumulate, and later entries often extend or partially supersede earlier ones (e.g. R6's "structural fix subsumes R3/R5" claim was itself widened by R7's "the bug class survives at a different layer"). Future readers — primarily future /big-plan runs and other LLM planning agents — should not have to read every dated entry to find the relevant pattern.
Run this skill when ANY of these hold:
/retro-notes session just landed and the new entry's claims widen, narrow, or contradict a claim in an earlier entry on the same area.Skip when:
A refactored lessons file has this structure (top to bottom):
---
name: l-lessons-{area}
description: {...includes pattern keywords AND a hint that file starts with a synthesized section...}
last-updated: YYYY-MM-DD
---
# {Area} Lessons
{1-2 sentence intro}
---
## Recurring patterns (synthesized YYYY-MM-DD, post-{latest entry tag})
{1-paragraph note: "Read this first. Dated entries below are the chronological record."}
### P1 — {short pattern name}
**Trigger.** {Observable conditions that mean this pattern applies.}
**Action.** {Remedial action with concrete tool calls / methodology refs.}
**See.** {Dated entries this derives from, with short descriptors.}
### P2 — ...
...
---
## Quick decision rules ← include only when 5+ patterns
When in doubt, apply these in order:
1. **{condition}?** → P{n} ({short reminder}).
2. ...
---
## YYYY-MM-DD — {original first dated entry title} ← unchanged
{...original entry body, possibly with a "Caveat (added YYYY-MM-DD by R{n} closeout)" section at end...}
## YYYY-MM-DD — {second dated entry title} ← unchanged
...
## YYYY-MM-DD R{latest} — {latest entry title} ← unchanged
Dated entries are NEVER deleted. They may receive a ### Caveat (added YYYY-MM-DD by R{n} closeout) appendix when a later entry widened or narrowed their claim.
Lessons files live at <repo>/.claude/skills/l-lessons-{area}/SKILL.md (project scope) or $HOME/.claude/skills/l-lessons-{area}/SKILL.md (personal scope).
Read the whole file. If it's >25 000 tokens, read in chunks via the Read tool's offset + limit — but read every byte. Pattern synthesis requires complete coverage.
While reading, capture three lists:
Before writing, confirm:
/retro-notes session is mid-write risks merge conflict. If a retro was just written, wait for that file change to settle (usually fine immediately after; just confirm git status shows the file's recent change is committed or that you'll write on top of it).{file} now? It has {N} entries; I see {threads} as patterns." Don't ask permission for every detail — just the go/no-go.For each cross-cutting thread, draft a pattern with this template:
### P{n} — {short pattern name, ≤8 words}
**Trigger.** {1-3 sentences. Use concrete observable conditions: file paths, test outcomes, symptom phrases. Avoid hand-wave like "when something feels off".}
**Action.** {1-3 sentences. Include specific tool calls or methodology refs: "/headless-browser subagent", "ctx.getImageData pixel histogram", "dispatch a 1-hour Node prototype with inlined production math". Avoid vague "investigate carefully".}
**See.** {Comma-separated list of dated-entry refs with 3-6 word descriptors: "R3 (probe-feasibility spike); R4 (probe-surface vs paint-surface); R7 (resize-cycle pixel histogram)."}
Rules of thumb for the pattern list:
If you end up with 5+ patterns, also draft a "Quick decision rules" section: a numbered list of 5-8 triggers, each pointing at one pattern by number. The triggers are short — they're the index, not the explanation.
For each superseded claim identified in Step 1, draft a Caveat block to append at the END of the relevant dated entry (after its existing "Would-skip-if-redoing" or last sub-section):
### Caveat (added YYYY-MM-DD by R{n} closeout)
{1-3 sentences. State which claim of this entry was widened/narrowed, why, and point the reader at the pattern OR the dated entry that subsumes / extends it. Concrete language: "R6's claim '...' was correct for X but R7 surfaced Y at a different layer."}
Caveats are surgical. Don't rewrite the entry. Don't delete the original "Watch for next time" bullets. The Caveat is appended; the historical claim stays.
The frontmatter is what /big-plan and other planning agents see first. After refactoring, the description should:
last-updated: YYYY-MM-DD if the field exists. If it doesn't exist, don't add it — that's the existing skill's convention to respect.Order of edits:
old_string = the H1 intro's last line + immediate --- + first dated entry's ## header; new_string = same + the new patterns section + --- + first dated entry's ## header.old_string = the last line of the entry's "Would-skip-if-redoing" (or last sub-section).description: line with the updated version.Verify after each edit that the file still parses (head -5 SKILL.md shows valid YAML).
pnpm dlx @takazudo/mdx-formatter --write <path-to-SKILL.md>
This normalises bullet indentation, code-fence language tags, and trailing whitespace. Skips on network failure — proceed without if the formatter fails, the file is still valid markdown.
Spot-check:
wc -l SKILL.md — note the new line count. Patterns section typically adds 100-200 lines; that's normal.grep -E "^##|^### P" SKILL.md — should show patterns first, then dated entries in chronological order.head -1 SKILL.md — should still be --- (frontmatter intact).One short message:
git diff --stat)./big-plan runs touching {area} will now load the synthesized patterns first."Do NOT commit automatically. Per project git policy, commits happen only when the user asks. The file change is left staged-but-uncommitted (or unstaged) so the user can run /commits themselves.
name: field is the skill's identity and is referenced by /big-plan and other readers./retro-notes's job. Removing them is never anyone's job.references/ split unless the file exceeds ~800 lines after refactoring. A split adds discovery overhead for future readers. If the file is 600-700 lines after refactoring, keep it as one file.This skill was authored after refactoring l-lessons-ui-verification post-R7 (composerOutputSize ↔ fitDim storage-model divergence). The refactor added 12 patterns (P1-P12) and one Caveat (to R6, noting that R7 widened "asymmetric X is subsumed" to "asymmetric X moved up a layer"). File grew from 557 lines to 685 — within budget. Future /big-plan runs touching packages/pattern-gen-viewer now load the patterns first instead of scanning 10 dated entries.
That refactor is the canonical reference shape. If unsure how the output should look, read .claude/skills/l-lessons-ui-verification/SKILL.md in any pgen worktree.
tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.