agentsclimarketplace

Session reflection

Skill michellepellon/superpowers/skills/session-reflection

A curated set of agent skills to support my daily workflows.

Install
npx -y skills add michellepellon/superpowers --skill session-reflection

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Analyze session history to identify inefficiency patterns and workflow gaps. Two modes: lightweight end-of-session reflection from conversation context, or comprehensive periodic analysis across multiple sessions via jq-extracted JSONL summaries. Produces structured reports with copy-paste-ready improvement proposals for CLAUDE.md, skills, commands, and automation.

SKILL.md

8.2 KB, as published. Nobody here has run it

Session Reflection

Overview

Analyze session history to find inefficiency patterns and workflow gaps, then propose concrete improvements. Two modes: quick end-of-session reflection or comprehensive periodic multi-session analysis.

Core principle: Evidence-based improvement. Quantify waste, propose specific fixes, implement nothing without approval.

When This Skill Activates

  • End of a session (user asks to reflect)
  • Periodic review (weekly/monthly)
  • After a particularly frustrating or inefficient session
  • When onboarding to a new project (analyze early sessions for missing docs)

Trigger phrases: "reflect on this session", "session review", "what went wrong", "workflow audit", "analyze my sessions", "how can we improve"

Mode Selection

SituationModeWhy
"Reflect on this session"SessionSingle session, context available
"What went wrong today"SessionCurrent work, immediate feedback
"Review my sessions this week"PeriodicCross-session patterns need JSONL data
"How can I improve my workflow"PeriodicPatterns emerge across sessions
"Analyze the last 3 days"PeriodicMulti-session, specific time range
Session modePeriodic mode
ScopeCurrent session context onlyJSONL files from last N days (default: 7, max: 14)
Data sourceAgent's own conversation contextjq-extracted summaries from ~/.claude/projects/
DepthQuick patterns, 5-10 minComprehensive cross-session analysis, 15-30 min
DependenciesNonejq must be installed

Process

  1. Determine mode — Session or periodic based on user request
  2. Gather data — From context (session) or JSONL extraction (periodic — see references/extraction-patterns.md)
  3. Detect patterns — Walk through all analysis categories below
  4. Score findings — High/Medium/Low impact based on frequency and token/time cost
  5. Generate reportdocs/audits/SESSION_REFLECTION_YYYY-MM-DD.md
  6. Present findings — Summarize 3-5 key findings to the user
  7. User review gate — Implement only changes the user approves

Session Mode: Reflecting From Context

The agent reviews its own conversation history within the current session:

  • Tool call inventory — Which tools were called, how many times, on what targets
  • Decision trace — Where did the agent change direction, backtrack, or get corrected
  • User corrections — Any place the user said "no, not that" or redirected the approach
  • Time spent — Which steps took disproportionately long

No file I/O needed. The agent introspects on its own behavior.

Periodic Mode: JSONL Extraction

CRITICAL: Never read raw JSONL files directly. They are massive and will consume the entire context budget. Always use the jq summary extraction pipeline documented in references/extraction-patterns.md.

Use a subagent (Agent tool) to perform the extraction and analysis, keeping the main context clean.

Analysis Categories

Agent Behavior Patterns

PatternSignalImpactExample
Repeated file readsSame file read 3+ timesHigh — token wasteRead config.py 7 times across session
Wrong path takenImplementation then reversalHigh — time wasteBuilt feature, discovered existing code
Unnecessary tool callsRedundant or no-op callsMedium — token wasteGlob + Grep for something already in context
Context loss recoveryRe-discovering info after compactionHigh — fragile workflowsKey architecture detail lost mid-session
Assumption without verificationDecision made, then correctedHigh — reworkAssumed API shape, had to refactor

Workflow Gaps

PatternSignalImpactExample
Repeated manual stepsSame commands across sessionsMedium — automation opportunityRunning same 3-command setup sequence
Missing documentationAgent had to discover what should be documentedMedium — onboarding frictionFigured out test setup from scratch
Missing skill coverageAgent did something a skill should guideMedium — quality riskAd-hoc code review without fresh-eyes
Recurring blockersSame type of error/obstacle reappearingHigh — systemic issuePermission errors, env setup failures

Lightweight Skill Effectiveness

PatternSignalImpactExample
Skill ignoredAgent rationalized skipping an applicable skillHigh — skill needs stronger triggersFresh-eyes applicable but agent went straight to commit
Skill partially followedAgent started skill process but shortcut stepsMedium — skill may be too heavyStarted TDD but skipped red-green-refactor cycle
Skill foughtAgent followed skill but produced poor resultsMedium — skill content needs revisionDoc audit ran but missed obvious false claims

Report Format

Generate docs/audits/SESSION_REFLECTION_YYYY-MM-DD.md:

# Session Reflection: YYYY-MM-DD
Mode: session | periodic (N days, M sessions)
Generated: YYYY-MM-DD | Commit: abc123

## Summary
| Metric | Count |
|--------|-------|
| Sessions analyzed | 1 or N |
| Patterns detected | X |
| High impact | X |
| Medium impact | X |

## Findings

### High Impact

#### 1. [Pattern Title]
**Category:** Agent Behavior | Workflow Gap | Skill Effectiveness
**Frequency:** N occurrences across M sessions
**Evidence:** [Specific examples from session data]
**Estimated cost:** ~Nk tokens wasted | ~N minutes lost per session

---

### Medium Impact
...

## Proposed Changes

### CLAUDE.md Updates
| # | Change | Rationale | Priority |
|---|--------|-----------|----------|
| 1 | Add section on X | Discovered 3 times | High |

#### Change 1: [Title]
**Add to:** CLAUDE.md > [section]
[exact text to add — copy-paste ready]

### New Skills
[complete skill content if applicable]

### New Slash Commands
[complete command content if applicable]

### Automation (scripts, hooks)
[complete script/hook content if applicable]

Key principle: All proposals are copy-paste ready with complete text/code. No vague "consider adding documentation about X."

Anti-Patterns

Anti-PatternWhy It's Wrong
Reading raw JSONL filesWill consume entire context budget — always use jq extraction
Auto-implementing changesProposals need human review — reflection without consent is noise
Shallow pattern matching"Read file 3 times" might be intentional (file changed) — check context
Reflecting mid-taskReflection is a distinct activity, not a sidebar — finish work first
Boiling the oceanPeriodic mode across 30 days will still be too much — default 7, max 14

Resistance Patterns

RationalizationReality
"This session went fine"Fine sessions still have patterns worth catching
"I already know what went wrong"Intuition misses frequency — you remember the big blocker, not the 5 small wastes
"I'll just remember for next time"You won't. Write it down or it's lost
"The improvements are too small to bother"500 tokens saved x 50 sessions = 25k tokens. Small compounds.
"I don't have time to reflect"10 minutes of reflection prevents 60 minutes of repeated mistakes

Detailed References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.