/reflect
Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
$ npx -y skills add alvinunreal/oh-my-opencode-slim --skill reflect --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/reflect
Context preview
The summary Claude sees to decide when to auto-load this skill.
Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
SKILL.md
reflect.SKILL.mdname: reflect
description: Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
Reflect
Reflect is an orchestrator-only workflow for learning from repeated work. It looks back over recent sessions, project notes, and existing agent assets, then recommends the smallest useful improvement: a skill, custom agent, command, configuration change, prompt rule, documentation playbook, or no change.
The goal is to identify real repeated friction and suggest practical improvements with evidence.
When to Use
Use Reflect when the user asks to:
- run `/reflect` or `/reflect <focus>`;
- run `/reflect --sessions` for session archaeology;
- learn from recent sessions or repeated workflows;
- find work they keep doing manually;
- improve their oh-my-opencode-slim setup based on actual usage using oh-my-opencode-slim skill;
- review whether a recurring process should become a reusable playbook;
- turn repeated workflow friction into a safer future default.
Do not use Reflect for ordinary implementation work, one-off debugging, broad architecture review, or speculative agent creation without workflow evidence.
Session Mode
When the user includes `--sessions` in their reflect command, shift to session archaeology: analyze historical OpenCode sessions across all repos to find repeated patterns, friction, and improvement opportunities.
Session Discovery
1. **Load recent sessions** - Query the SQLite database directly:
bun -e "import Database from 'bun:sqlite'; const db = new Database(process.env.HOME + '/.local/share/opencode/opencode.db'); console.log(db.query('SELECT id, directory, title, agent, model, time_created, cost, tokens_input, tokens_output FROM session ORDER BY time_created DESC LIMIT 50').all())"Adjust `LIMIT 50` to `--last N` if specified.
**Session table columns:** `id, directory, title, agent, model, time_created, cost, tokens_input, tokens_output`
2. **Load session messages** - For each session ID, query the message table:
bun -e "import Database from 'bun:sqlite'; const db = new Database(process.env.HOME + '/.local/share/opencode/opencode.db'); console.log(db.query('SELECT data FROM message WHERE session_id = ?').all('<session_id>'))"**Message table columns:** `id, session_id, time_created, time_updated, data` (data is JSON with role, agent, model, summary, etc.)
Per-Session Analysis
For each session, analyze and produce a structured summary:
{
"session": "ses_14de9c68effegtZtlATm42wnz7",
"project": "/home/user/Projects/oh-my-opencode-slim",
"timestamp": "2026-06-10T15:08:45.427Z",
"goal": "Fix CI failure",
"success": true,
"frictions": [
"Repeated grep to find test file",
"Three failed test runs before passing"
],
"recommendations": [
"Create /test-ci command"
],
"duration_minutes": 18,
"models_used": ["opencode/mimo-v2.5-free"],
"agents_used": ["orchestrator", "fixer", "explorer"],
"tools_used": ["Read", "Edit", "Bash"],
"confidence": 0.85
}**Confidence scoring:**
- 0.9-1.0: Clear success/failure, obvious patterns
- 0.7-0.9: Likely outcome, patterns inferred from tool usage
- 0.5-0.7: Uncertain outcome, limited evidence
- <0.5: Skip or mark as "needs more evidence"
Storage and Caching
Store session summaries in `~/.config/opencode/oh-my-opencode-slim/reflections/sessions/`.
**Cache logic:** 1. Check if `<session-id>.json` exists in reflections directory 2. If yes, load it (saves tokens) 3. If no, analyze session and save summary 4. Aggregate across all summaries for final report
Aggregation
After analyzing all sessions, aggregate findings:
1. **Group by theme** - sessions with similar frictions cluster together 2. **Count frequency** - "42/50 sessions had repeated grep before editing" 3. **Rank by impact** - prioritize recommendations that appear most often 4. **Filter noise** - skip one-off issues, focus on repeated patterns 5. **Cross-reference** - see if patterns correlate with specific models, agents, or repos
**Scope categories:**
- **Global** - applies to all repos (pattern seen in >50% of repos)
- **Cross-repo** - applies to specific repos where pattern appears
- **Project-specific** - only relevant to one repo
Output Format
Return a compact report with scope and confidence:
Session Reflection Report
Analyzing 50 most recent sessions across 8 repos.
Repos analyzed:
- <repo> (<N> sessions)
- ... (M more)
Findings
- <pattern>: N/50 sessions across M repos.
- Scope: global | cross-repo (<repos>) | project-specific (<repo>)
- Confidence: 0.95
- Impact: High | Medium | Low
Recommended changes
- <asset>: <purpose>
- Scope: global | cross-repo (<repos>) | project-specific (<repo>)
- Confidence: 0.97
- Estimated time saved: High | Medium | Low
Skipped
- <candidate>: why not worth packaging now.
- Scope: <reason>
- Confidence: <score>
Needs more evidence
- <candidate>: what would make it actionable.
- Current scope: <what we've seen>
- Required scope: <what would confirm>
Error Handling
**Log file issues:**
- Log doesn't exist → "No OpenCode log found at <path>. Run OpenCode in at least one repo first."
- Log is empty → "OpenCode log is empty. No sessions to analyze."
**Session loading issues:**
- Session ID not loadable → Skip with warning: "Session <id> could not be loaded, skipping."
- Session has no messages → Skip: "Session <id> has no messages."
**Recovery pattern:**
- Log the failure
- Continue with remaining sessions
- Report failures at end: "3 sessions skipped due to load errors"
Core Contract
Reflect must be conservative and evidence-driven.
Required behavior:
- inspect existing assets before suggesting new ones;
- prefer recent, repeated, u
Read more
name: reflect description: Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.
Reflect
Reflect is an orchestrator-only workflow for learning from repeated work. It looks back over recent sessions, project notes, and existing agent assets, then recommends the smallest useful improvement: a skill, custom agent, command, configuration change, prompt rule, documentation playbook, or no change.
The goal is to identify real repeated friction and suggest practical improvements with evidence.
When to Use
Use Reflect when the user asks to:
- run `/reflect` or `/reflect <focus>`;
- run `/reflect --sessions` for session archaeology;
- learn from recent sessions or repeated workflows;
- find work they keep doing manually;
- improve their oh-my-opencode-slim setup based on actual usage using oh-my-opencode-slim skill;
- review whether a recurring process should become a reusable playbook;
- turn repeated workflow friction into a safer future default.
Do not use Reflect for ordinary implementation work, one-off debugging, broad architecture review, or speculative agent creation without workflow evidence.
Session Mode
When the user includes `--sessions` in their reflect command, shift to session archaeology: analyze historical OpenCode sessions across all repos to find repeated patterns, friction, and improvement opportunities.
Session Discovery
1. **Load recent sessions** - Query the SQLite database directly:
bun -e "import Database from 'bun:sqlite'; const db = new Database(process.env.HOME + '/.local/share/opencode/opencode.db'); console.log(db.query('SELECT id, directory, title, agent, model, time_created, cost, tokens_input, tokens_output FROM session ORDER BY time_created DESC LIMIT 50').all())"Adjust `LIMIT 50` to `--last N` if specified.
**Session table columns:** `id, directory, title, agent, model, time_created, cost, tokens_input, tokens_output`
2. **Load session messages** - For each session ID, query the message table:
bun -e "import Database from 'bun:sqlite'; const db = new Database(process.env.HOME + '/.local/share/opencode/opencode.db'); console.log(db.query('SELECT data FROM message WHERE session_id = ?').all('<session_id>'))"**Message table columns:** `id, session_id, time_created, time_updated, data` (data is JSON with role, agent, model, summary, etc.)
Per-Session Analysis
For each session, analyze and produce a structured summary:
{
"session": "ses_14de9c68effegtZtlATm42wnz7",
"project": "/home/user/Projects/oh-my-opencode-slim",
"timestamp": "2026-06-10T15:08:45.427Z",
"goal": "Fix CI failure",
"success": true,
"frictions": [
"Repeated grep to find test file",
"Three failed test runs before passing"
],
"recommendations": [
"Create /test-ci command"
],
"duration_minutes": 18,
"models_used": ["opencode/mimo-v2.5-free"],
"agents_used": ["orchestrator", "fixer", "explorer"],
"tools_used": ["Read", "Edit", "Bash"],
"confidence": 0.85
}**Confidence scoring:**
- 0.9-1.0: Clear success/failure, obvious patterns
- 0.7-0.9: Likely outcome, patterns inferred from tool usage
- 0.5-0.7: Uncertain outcome, limited evidence
- <0.5: Skip or mark as "needs more evidence"
Storage and Caching
Store session summaries in `~/.config/opencode/oh-my-opencode-slim/reflections/sessions/`.
**Cache logic:** 1. Check if `<session-id>.json` exists in reflections directory 2. If yes, load it (saves tokens) 3. If no, analyze session and save summary 4. Aggregate across all summaries for final report
Aggregation
After analyzing all sessions, aggregate findings:
1. **Group by theme** - sessions with similar frictions cluster together 2. **Count frequency** - "42/50 sessions had repeated grep before editing" 3. **Rank by impact** - prioritize recommendations that appear most often 4. **Filter noise** - skip one-off issues, focus on repeated patterns 5. **Cross-reference** - see if patterns correlate with specific models, agents, or repos
**Scope categories:**
- **Global** - applies to all repos (pattern seen in >50% of repos)
- **Cross-repo** - applies to specific repos where pattern appears
- **Project-specific** - only relevant to one repo
Output Format
Return a compact report with scope and confidence:
Session Reflection Report Analyzing 50 most recent sessions across 8 repos. Repos analyzed: - <repo> (<N> sessions) - ... (M more) Findings - <pattern>: N/50 sessions across M repos. - Scope: global | cross-repo (<repos>) | project-specific (<repo>) - Confidence: 0.95 - Impact: High | Medium | Low Recommended changes - <asset>: <purpose> - Scope: global | cross-repo (<repos>) | project-specific (<repo>) - Confidence: 0.97 - Estimated time saved: High | Medium | Low Skipped - <candidate>: why not worth packaging now. - Scope: <reason> - Confidence: <score> Needs more evidence - <candidate>: what would make it actionable. - Current scope: <what we've seen> - Required scope: <what would confirm>
Error Handling
**Log file issues:**
- Log doesn't exist → "No OpenCode log found at <path>. Run OpenCode in at least one repo first."
- Log is empty → "OpenCode log is empty. No sessions to analyze."
**Session loading issues:**
- Session ID not loadable → Skip with warning: "Session <id> could not be loaded, skipping."
- Session has no messages → Skip: "Session <id> has no messages."
**Recovery pattern:**
- Log the failure
- Continue with remaining sessions
- Report failures at end: "3 sessions skipped due to load errors"
Core Contract
Reflect must be conservative and evidence-driven.
Required behavior:
- inspect existing assets before suggesting new ones;
- prefer recent, repeated, u
Lean, fine tuned Opencode multi agent suite · Mix any models · Auto delegate tasks
Repo: alvinunreal/oh-my-opencode-slim
Other skills on oh-my-opencode-slim.
- /clonedeps
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use when the user asks to clone dependencies, inspect dependency/source internals, understand SDK/framework behavior from source, debug library
Open skill - /codemap
Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping
Open skill - /deepwork
High-cost orchestrator workflow for large, high-risk, multi-phase coding efforts with meaningful dependencies and review gates. Do not activate for routine multi-file changes.
Open skill - /loop-engineering
Loop engineering runtime Grill + Monitor
Open skill - /oh-my-opencode-slim
Configure and improve oh-my-opencode-slim for the current user. Use when users want to tune agents, models, prompts, custom agents, skills, MCPs, presets, or plugin behavior. Also use when recurring workflow friction suggests a safe config or prompt improvement.
Open skill - /simplify
Simplifies code for clarity without changing behavior. Use for readability, maintainability, and complexity reduction after behavior is understood.
Open skill

