From gigachang-skills
Use when the user explicitly asks to reflect on, review, or learn from the current Claude Code session — e.g. "review this session", "reflect on this session", "why did that take so many tries", "what went wrong this session", or asks to turn this session's mistakes into project rules. Reads the session transcript, finds where Claude's output was rejected or required correction, distills the root causes, and proposes concrete project rules — integrating them into the project's existing rule system (CLAUDE.md, AGENTS.md, …) or proposing a simple one if none exists. Manual-trigger only — never auto-invoke; never write rule files without explicit user approval.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gigachang-skills:session-reflectionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
When invoked, look back over the **current session** and figure out where
When invoked, look back over the current session and figure out where Claude's work was rejected or required the user to ask for changes, why it wasn't right the first time, and what project rule would prevent the same miss next time. Then propose those rules to the user.
The goal is durable improvement: each reflection turns this session's friction into rules that make the next session smoother.
Run the helper script. It is standard-library Python — no install needed.
python ${CLAUDE_PLUGIN_ROOT}/skills/session-reflection/scripts/extract_friction_log.py
With no arguments it auto-detects the current session's transcript and writes a compact friction log to a temp file, printing that path to stdout.
If it cannot locate the transcript, it exits with a message. In that case ask
the user for their session transcript path and re-run with
--transcript <path>.
Read the file the script printed. It is a numbered timeline of user prompts, tool calls, and results, with friction points flagged:
<<REJECTED>> — a tool call the user refused.<<ERROR>> — a tool call or command that failed.Identify each episode where Claude's output was rejected, errored, or the user had to ask for a correction or redo. The script flags rejections and errors mechanically; user corrections are a judgment call — read the wording of user prompts that follow Claude's work (e.g. "no, do it differently", "that's not what I meant", a re-prompt repeating the request) and decide.
Ignore the final user prompt that triggered this reflection — it is not friction.
For each episode, note:
Group repeated root causes into patterns — a pattern that recurs is the strongest rule candidate.
For each root cause (or pattern), write one concrete, actionable rule that would have prevented the miss. Each rule:
Rules must be specific and verifiable. Reject vague platitudes ("write better code", "be more careful") — they teach nothing.
Look, in this order, for an existing rule system in the project:
CLAUDE.md — repo root, then .claude/CLAUDE.mdAGENTS.md.cursor/rules/ or .cursorrules.github/copilot-instructions.mdCLAUDE.md at the repo root as the
project's rule system. Keep it simple: a single section (e.g.
## Project Rules or ## Lessons Learned) holding the rules in the Step 4
format. Tell the user this file becomes the project's rule system and
Claude Code reads it automatically each session.Present, in the chat:
Then ask the user to approve. They may take a subset, edit wording, or decline. Do not edit any file before they approve.
Only after approval:
Tell the user which rules were added and to which file, so they can review the diff.
~/.claude/projects/<encoded-cwd>/.
Detecting "user asked for a change" is semantic — the script surfaces the
raw prompts; the judgment in Step 3 is yours.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub gigayaya/gigachang-skills --plugin gigachang-skills