reflect
Skill108 starsChanged 9 months agoMITView on GitHub
Analyze the current or recent session(s) for corrections, preferences, and implicit feedback. Extracts learnings and routes them to the right knowledge/rules file. Run when you want to capture what was learned this session.
186 other projects use a version of this.
Adopted by
Most recently taken up by
- andrewsoonqn/skillstheir own version, first seen Nov 29, 2026
- romerma/mstacktheir own version, first seen Nov 29, 2026
- mlschodkowski/skillstheir own version, first seen Nov 29, 2026
- MondayNotAGoodDay/skillstheir own version, first seen Nov 29, 2026
- sodejm/copilot-operation-plugin-for-securitytheir own version, first seen Nov 29, 2026
- sirius-cc-wu/sirius-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use setup-pstack, make-bot-ui and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 29 projects that use this
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 22 projects that use this
jaydubya818Skillpoteto-mode
Use when non-trivial work should follow the smallest rigorous Jstack workflow.
Also in 34 projects that use this
jaydubya818Skillautomate-me
Use when the user wants working preferences captured in a reusable mode skill.
Also in 47 projects that use this
- +8 more from jaydubya818
Other versions186 projects use a version of this.
Word for word · 1
- sohaibdevv/Claude-Starter-Kit★ 1100% same
Edited · 0
None found.
Wrote their own version · 185
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- github/gh-aw★ 5.7ksame name
- backnotprop/pstack★ 5.4ksame name
- github/squad★ 3.5ksame name
- rilldata/rill★ 3ksame name
- microsoft/waza★ 1.5ksame name
- osmlab/name-suggestion-index★ 893same name
- llama-farm/llamafarm★ 837same name
- haddock-development/claude-reflect-system★ 373same name
175 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- bootstrapSkill
- create-skillSkill
- onboardSkill
- planSkill
- tasksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 13 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 167 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
First: Read LEARNINGS.md (in this skill's directory) before proceeding.
- Distinctive: line 20
Run the extraction script to get candidate learnings from session JSONL.
- Very specific: line 26
If $ARGUMENTS is empty, it analyzes the latest session.
- Distinctive: line 28
If no pairs found -- tell user "Nothing to reflect on" and stop
- Distinctive: line 29
If pairs found -- capture the output and proceed to Phase 2
- Distinctive: line 45
If it matches a previously rejected learning (same topic + target file): skip silently.
- Distinctive: line 46
If it *contradicts* a previously rejected learning (opposite of what was rejected): flag as potential reversal — present to user with …
- Distinctive: line 81
Exception: if the learning contradicts a rejected entry (Claude keeps making the same mistake), promote immediately to rule on 2nd …
- Very specific: line 106
Problem routing: Read ~/claude-assistant/knowledge/problems/00-overview.md to match findings against the user's problems.
- Distinctive: line 125
If Phase 2 flagged contradictions:
- Distinctive: line 136
If feedback counters flagged unhealthy rules:
- Distinctive: line 146
Ask: "Action on flagged rules?
- Distinctive: line 150
After listing all findings, ask:
- Distinctive: line 154
If no real learnings found: tell user "Analyzed N pairs, no actionable learnings found" and stop.
- Distinctive: line 158
When user discards findings:
- Distinctive: line 160
Ask: "Brief reason? (or Enter to skip)"
- Very specific: line 178
If adding to a problem file's Insights Log, use format: ### YYYY-MM-DD — Session Reflection
- Very specific: line 184
Commit with message reflect: capture session learnings
“Common” is measured: kept by at least 6 in 10 of the 167 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/reflect — Session Learning System
First: Read LEARNINGS.md (in this skill's directory) before proceeding.
You are running a 4-phase reflection workflow. Follow each phase in order.
Arguments: $ARGUMENTS
Phase 1: Extract
Run the extraction script to get candidate learnings from session JSONL.
python3 ~/claude-assistant/scripts/extract-learnings.py $ARGUMENTSIf $ARGUMENTS is empty, it analyzes the latest session. Pass --since YYYY-MM-DD or --file <path> to customize scope.
- If no pairs found -- tell user "Nothing to reflect on" and stop
- If pairs found -- capture the output and proceed to Phase 2
Phase 2: Analyze
For each candidate pair from Phase 1, determine:
- Is this a real learning? ~40% are normal conversation — skip those. Look for:
- Corrections ("no, do X instead", "actually...", "wrong")
- Preferences ("always use...", "I prefer...", "from now on...")
- Tool rejections with feedback (user denied + said why)
- Workflow patterns (user repeatedly does something a specific way)
- Implicit feedback (user rephrases, asks again, provides what Claude should have known)
- Check rejections — Read
~/claude-assistant/knowledge/self/rejections.md. For each candidate:- If it matches a previously rejected learning (same topic + target file): skip silently. Note in output: "Skipped: matches rejected learning from [date]"
- If it contradicts a previously rejected learning (opposite of what was rejected): flag as potential reversal — present to user with context from the rejection log
- Classify and route each real learning using the routing table below.
- Check for duplicates — Read the target file and verify the learning isn't already captured.
- Scan for contradictions — For each proposed change with a target file:
a. Read the target file
b. Read up to 5 related files: same directory + shared tags (YAML
tagsfield) + wiki-linked files c. Scan for statements that directly contradict the proposed change d. If contradiction found, flag it for Phase 3 conflict resolution:
e. Update feedback counters — If the contradiction traces to a specific existing rule/learning entry, increment itsCONFLICT with [file.md:line]: Existing: "[quoted text]" Proposed: "[new learning]"harmfulcounter in~/claude-assistant/state/rule-feedback.json Update feedback counters — Read
~/claude-assistant/state/rule-feedback.json(create if missing). For each finding:a. If a correction contradicts an existing rule -- increment
harmfulfor that rule:- Key format:
"<relative-path>::<section or first 60 chars of rule>"
b. If the session had no corrections in an area covered by a rule, and the rule was relevant to work done this session -- increment
helpfulc. Write updated counters back to
~/claude-assistant/state/rule-feedback.jsond. Flag unhealthy rules for Phase 3:
harmful >= 3-- flag: "This rule has been contradicted 3 times. Review or remove?"harmful / (helpful + harmful) > 0.5with 4+ total signals -- flag as unreliablehelpful >= 5withharmful == 0-- mark as "stable" (note in output, no action needed)
- Key format:
- For multi-session scans (
--since): Track if the same learning appears across 2+ sessions. Flag for promotion:- 2+ occurrences -- suggest knowledge file if not already there
- 3+ occurrences -- flag for promotion to rule
- Exception: if the learning contradicts a rejected entry (Claude keeps making the same mistake), promote immediately to rule on 2nd occurrence
Routing Table
| Category | Target File |
| Task/operational correction | ~/.claude/rules/tasks.md |
| Communication preference | ~/.claude/rules/communication.md |
| Session management | ~/.claude/rules/sessions.md |
| Security/git correction | ~/.claude/rules/security.md |
| Delegation pattern | ~/.claude/rules/delegation.md |
| Development standard | ~/.claude/rules/development.md |
| Research convention | ~/.claude/rules/research.md |
| User profile update | ~/claude-assistant/knowledge/user/profile.md |
| User goals update | ~/claude-assistant/knowledge/user/goals.md |
| Self-knowledge | ~/claude-assistant/knowledge/self/identity.md |
| Problem insight | ~/claude-assistant/knowledge/problems/NN-*.md Insights Log |
| Project state change | ~/claude-assistant/knowledge/projects/<project>.md |
| Global convention | ~/.claude/CLAUDE.md |
| Recurring pattern (3+ sessions) | ~/.claude/rules/ (new file or existing) |
| Actionable work identified | SQLite via sqlite3 ~/claude-assistant/tasks.db then python3 ~/claude-assistant/scripts/db.py export |
| MEMORY.md state change | MEMORY.md (sparingly) |
Routing priority: Rules files > Knowledge files > MEMORY.md > CLAUDE.md
Problem routing: Read ~/claude-assistant/knowledge/problems/00-overview.md to match findings against the user's problems.
Phase 3: Present
Show each finding to the user in this format:
## Finding N: [short title]
- **Evidence:** "[what user said]" (in response to "[what Claude said]")
- **Category:** [from routing table]
- **Target:** `path/to/file.md`
- **Proposed change:** [exact text to add/edit]
- **Already captured?** Yes/NoConflict Resolution
If Phase 2 flagged contradictions:
CONFLICT with [file.md:line]:
Existing: "[quoted text from file]"
Proposed: "[the new learning]"
Resolve: keep existing (k), replace (r), or note both (b)Flagged Rules
If feedback counters flagged unhealthy rules:
## Flagged Rules
### [rule key]
- Counters: helpful=N, harmful=N
- Recommendation: review / remove / keep with caveatAsk: "Action on flagged rules? (r)emove, (e)dit, (k)eep, or (s)kip"
User Decision
After listing all findings, ask:
Apply all (a), select by number (e.g. 1,3,5), or discard (d)?
If no real learnings found: tell user "Analyzed N pairs, no actionable learnings found" and stop.
Rejection Logging
When user discards findings:
- Ask: "Brief reason? (or Enter to skip)"
- Append to
~/claude-assistant/knowledge/self/rejections.md:### YYYY-MM-DD — Rejected - **Proposed:** [the learning] - **Target:** `path/to/file.md` - **Reason:** [user's reason, or "(not provided)"]
Phase 4: Apply
For each approved finding:
- Read the target file
- Edit with the proposed change (use Edit tool, not Write)
- Update YAML frontmatter
last_reviewedto today's date (if present) - If adding to a problem file's Insights Log, use format:
### YYYY-MM-DD — Session Reflection
After all edits:
- Summarize what was changed:
| File | Change |table - Stage
~/claude-assistant/state/rule-feedback.jsonif counters were updated - Commit with message
reflect: capture session learnings
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

