skills/curated/lesson-learned/SKILL.md
Analyze recent code changes via git history and extract software engineering lessons. Use when the user asks 'what is the lesson here?', 'what can I learn from this?', 'engineering takeaway', 'what did I just learn?', 'reflect on this code', or wants to extract principles from recent work.
npx skillsauth add pedronauck/skills lesson-learnedInstall 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.
Extract specific, grounded software engineering lessons from actual code changes. Not a lecture -- a mirror. Show the user what their code already demonstrates.
Load the principles reference first.
references/se-principles.md to have the principle catalog availablereferences/anti-patterns.md if you suspect the changes include areas for improvementDo not proceed until you've loaded at least se-principles.md.
Ask the user or infer from context what to analyze.
| Scope | Git Commands | When to Use |
|-------|-------------|-------------|
| Feature branch | git log main..HEAD --oneline + git diff main...HEAD | User is on a non-main branch (default) |
| Last N commits | git log --oneline -N + git diff HEAD~N..HEAD | User specifies a range, or on main (default N=5) |
| Specific commit | git show <sha> | User references a specific commit |
| Working changes | git diff + git diff --cached | User says "what about these changes?" before committing |
Default behavior:
git log with the determined scope to get the commit list and messagesgit diff for the full diff of the scopegit diff --stat first, then selectively read the top 3-5 most-changed filesIdentify the dominant pattern -- the single most instructive thing about these changes.
Look for:
Map findings to specific principles from references/se-principles.md. Be specific -- quote actual code, reference actual file names and line changes.
Use this template:
## Lesson: [Principle Name]
**What happened in the code:**
[2-3 sentences describing the specific change, referencing files and commits]
**The principle at work:**
[1-2 sentences explaining the SE principle]
**Why it matters:**
[1-2 sentences on the practical consequence -- what would go wrong without this, or what goes right because of it]
**Takeaway for next time:**
[One concrete, actionable sentence the user can apply to future work]
If there is a second lesson worth noting (maximum 2 additional):
---
### Also worth noting: [Principle Name]
**In the code:** [1 sentence]
**The principle:** [1 sentence]
**Takeaway:** [1 sentence]
| Avoid | Why | Instead | |-------|-----|---------| | Listing every principle that vaguely applies | Overwhelming and generic | Pick the 1-2 most relevant | | Analyzing files that were not changed | Scope creep | Stick to the diff | | Ignoring commit messages | They contain intent that diffs miss | Read them as primary context | | Abstract advice disconnected from the code | Not actionable | Always reference specific files/lines | | Negative-only feedback | Demoralizing | Lead with what works, then suggest improvements | | More than 3 lessons | Dilutes the insight | One well-grounded lesson beats seven vague ones |
tools
XState Store (@xstate/store v4) event-driven state for TypeScript apps. Use when creating a store with createStore or createStoreLogic, writing transitions and enqueue effects, declaring Standard Schema contracts, wiring selectors or atoms, adding the persist, undo-redo, reset, or validateSchemas extensions, binding a store to React with @xstate/store-react, testing transitions or bridging a store into XState with fromStore, or migrating a v3 store to v4. Don't use for XState state machines and actors, Zustand or Redux stores, or TanStack Query server state.
development
Deep review of branch diffs, working trees, or GitHub PRs at any size. Use when the user asks for CodeRabbit-grade review, an incremental re-review after new pushes, publication of findings to a PR, a cross-LLM peer-review verdict round, or conformance review against spec artifacts. Don't use for applying fixes, reviewing specs or PRDs as documents, or quick single-file feedback.
tools
React 19 development under the React Compiler. Use when writing React components or hooks, deciding whether a useMemo/useCallback/memo belongs in the code, diagnosing a component the compiler skipped, reaching for useEffect, choosing where state lives, typing props or refs in TypeScript, wiring Actions or use(), setting up babel-plugin-react-compiler or eslint-plugin-react-hooks, or testing components with Vitest. Don't use for React Native, non-React frameworks (Vue, Svelte, Solid), or backend-only Node.js code.
tools
Orchestrate Claude and Codex worker TUIs from a controller agent through herdr panes and the herdr socket CLI. Use when delegating bounded tasks to herdr worker panes, running user-activated plan-first delegations (Claude Code plan mode, Codex Plan mode), waiting on native agent status (idle, working, blocked, done), or verifying worker reports. Workers launch as interactive TUIs via herdr agent start — never through headless runners (compozy exec, claude -p, codex exec). Not for cmux workspaces (see cmux-orchestration) and not for end-user herdr control.