Tooluck logoTooluck
SKILL.md

lesson-learned

Agent skill fromsoftaworks/agent-toolkit

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.

How to install lesson-learned

install lesson-learned
# install the agent-toolkit pack with the skills CLI
npx skills add softaworks/agent-toolkit

# or add only this skill to Claude Code: copy the folder

skills/lesson-learned/

# into

~/.claude/skills/lesson-learned/ (all projects)

.claude/skills/lesson-learned/ (one project)

skills/lesson-learned/SKILL.md

MITFull file
1# Lesson Learned
2
3Extract specific, grounded software engineering lessons from actual code changes. Not a lecture -- a mirror. Show the user what their code already demonstrates.
4
5## Before You Begin
6
7**Load the principles reference first.**
8
91. Read `references/se-principles.md` to have the principle catalog available
102. Optionally read `references/anti-patterns.md` if you suspect the changes include areas for improvement
113. Determine the scope of analysis (see Phase 1)
12
13**Do not proceed until you've loaded at least `se-principles.md`.**
14
15## Phase 1: Determine Scope
16
17Ask the user or infer from context what to analyze.
18
19| Scope | Git Commands | When to Use |
20|-------|-------------|-------------|
21| Feature branch | `git log main..HEAD --oneline` + `git diff main...HEAD` | User is on a non-main branch (default) |
22| Last N commits | `git log --oneline -N` + `git diff HEAD~N..HEAD` | User specifies a range, or on main (default N=5) |
23| Specific commit | `git show <sha>` | User references a specific commit |
24| Working changes | `git diff` + `git diff --cached` | User says "what about these changes?" before committing |
25
26**Default behavior:**
27- If on a feature branch: analyze branch commits vs main
28- If on main: analyze the last 5 commits
29- If the user provides a different scope, use that
30
31## Phase 2: Gather Changes
32
331. Run `git log` with the determined scope to get the commit list and messages
342. Run `git diff` for the full diff of the scope
35…

Excerpt shown under the repository's MIT license.

More skills in agent-toolkit

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates