$npx -y skills add liwala/sheal --skill retroRun a deep session retrospective analyzing the most recent AI coding session. Uses Entire.io session data + static analysis, then the agent reviews its own work to extract learnings and generate rules.
| 1 | # Session Retrospective Skill |
| 2 | |
| 3 | You are performing a deep retrospective analysis of a completed AI coding session. This is the self-healing loop: you're reviewing what happened and generating actionable rules to improve future sessions. |
| 4 | |
| 5 | ## Step 1: Gather Data |
| 6 | |
| 7 | Run the static analysis first. If a checkpoint ID was provided as an argument, use it. Otherwise, use the latest checkpoint. |
| 8 | |
| 9 | ```bash |
| 10 | sheal retro --format json [-c CHECKPOINT_ID] |
| 11 | ``` |
| 12 | |
| 13 | Also load the session details to see the Entire.io summary: |
| 14 | |
| 15 | ```bash |
| 16 | sheal sessions --format json [-c CHECKPOINT_ID] |
| 17 | ``` |
| 18 | |
| 19 | ## Step 2: Deep Analysis |
| 20 | |
| 21 | With the static analysis and session data loaded, analyze the session deeply. Consider: |
| 22 | |
| 23 | ### Failure Patterns |
| 24 | - For each failure loop or Bash failure: **why** did it happen? Was it a wrong approach, missing context, environment issue, or normal iteration? |
| 25 | - Could a pre-check have prevented it? |
| 26 | - Was the agent stuck or making progress? |
| 27 | |
| 28 | ### Effort Quality |
| 29 | - Was the file churn productive iteration or wasted effort? |
| 30 | - Were the right tools used? (e.g., using Bash when Read/Grep would have been better) |
| 31 | - Was research done before implementation, or was the approach trial-and-error? |
| 32 | |
| 33 | ### Missing Context |
| 34 | - What information was missing at the start that caused problems later? |
| 35 | - What should have been in CLAUDE.md, .cursorrules, or project documentation? |
| 36 | - Were there assumptions that turned out wrong? |
| 37 | |
| 38 | ### Workflow Improvements |
| 39 | - What would make the next session smoother? |
| 40 | - Are there recurring patterns that should become rules? |
| 41 | - Should any health checks be added to `sheal check`? |
| 42 | |
| 43 | ## Step 3: Generate Output |
| 44 | |
| 45 | Present your analysis as a structured retrospective report: |
| 46 | |
| 47 | ### Report Format |
| 48 | |
| 49 | ``` |
| 50 | ## Session Retrospective: [checkpoint-id] |
| 51 | |
| 52 | ### Summary |
| 53 | [1-2 sentence summary of what happened and how it went] |
| 54 | |
| 55 | ### Health Score: [X/100] |
| 56 | [Explain why this score, what went well, what didn't] |
| 57 | |
| 58 | ### Key Findings |
| 59 | |
| 60 | #### What Went Well |
| 61 | - [thing 1] |
| 62 | - [thing 2] |
| 63 | |
| 64 | #### What Could Be Improved |
| 65 | - [issue 1]: [why it happened] → [what to do differently] |
| 66 | - [issue 2]: [why it happened] → [what to do differently] |
| 67 | |
| 68 | ### Suggested Rules |
| 69 | [List specific rules that should be added to agent config files] |
| 70 | ``` |
| 71 | |
| 72 | ## Step 4: Apply Learnings (with user confirmation) |
| 73 | |
| 74 | After presenting the report, ask the user if they want to apply any of the suggested rules. If yes: |
| 75 | |
| 76 | 1. For Claude Code: append rules to `CLAUDE.md` in the project root |
| 77 | 2. For Cursor: append to `.cursorrules` |
| 78 | 3. For Gemini: append to `.gemini/GEMINI.md` |
| 79 | 4. For general: append to `AGENTS.md` |
| 80 | |
| 81 | Format rules as clear, actionable instructions. For example: |
| 82 | |
| 83 | ```markdown |
| 84 | ## Learnings from session [date] |
| 85 | |
| 86 | - Before writing parsers for external data formats, inspect real data samples first (`git show branch:path/to/file | head -20`). Don't assume formats from documentation alone. |
| 87 | - When a CLI tool fails with "connection refused", check if its required server process is running before retrying the same command. |
| 88 | - Run `sheal check` at session start to catch environment issues early. |
| 89 | ``` |
| 90 | |
| 91 | ## Important Notes |
| 92 | |
| 93 | - Be honest about what went well — not every session has problems |
| 94 | - Focus on actionable, specific learnings, not generic advice |
| 95 | - Rules should be phrased as instructions to a future AI agent |
| 96 | - Don't generate rules for one-off issues that won't recur |
| 97 | - Consider whether the issue is project-specific or universal |