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.
75
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
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.
Use Reflect when the user asks to:
/reflect or /reflect <focus>;/reflect --sessions for session archaeology;Do not use Reflect for ordinary implementation work, one-off debugging, broad architecture review, or speculative agent creation without workflow evidence.
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.
Load recent sessions - Query the SQLite database directly:
bun -e "import Database from 'bun:sqlite'; const db = new Database('/home/mhenke/.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
Load session messages - For each session ID, query the message table:
bun -e "import Database from 'bun:sqlite'; const db = new Database('/home/mhenke/.local/share/opencode/opencode.db'); console.log(db.query('SELECT data FROM message WHERE session_id = ?').all('ses_14de9c68effegtZtlATm42wnz7'))"Message table columns: id, session_id, time_created, time_updated, data (data is JSON with role, agent, model, summary, etc.)
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:
Store session summaries in ~/.config/opencode/oh-my-opencode-slim/reflections/sessions/.
Cache logic:
<session-id>.json exists in reflections directoryAfter analyzing all sessions, aggregate findings:
Scope categories:
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>Log file issues:
Session loading issues:
Recovery pattern:
Reflect must be conservative and evidence-driven.
Required behavior:
Use available evidence in this order:
AGENTS.md, .opencode/,
.slim/, notes, checkpoints, task progress files, and codemaps.Respect privacy and safety boundaries. Do not inspect unrelated personal files, credentials, private messages, or external accounts unless the user explicitly asks and the workflow requires it.
Reflect can be triggered directly:
/reflect
/reflect release workflow and checks
/reflect --sessions
/reflect --sessions --last 100With no arguments, review recent work broadly. With arguments, focus the review on that workflow area while still checking whether existing assets already cover it.
Before proposing anything, identify what already exists:
orchestratorPrompt guidance;If an existing asset already covers the candidate, recommend extending or using that asset instead of creating a near-duplicate.
Look for repeated signals such as:
Strong candidates usually have at least two occurrences, stable inputs, a clear output, and a clear stopping condition.
For each candidate, decide:
Only recommend creating or changing assets when confidence is high.
Pick the least powerful form that solves the repeated problem:
Avoid creating custom agents when a prompt rule or skill is enough. Avoid skills when a short project playbook is enough. Avoid config changes when the benefit is unclear.
Unless the user explicitly requested a specific edit, present a concise proposal before writing files or changing config:
Found 2 strong repeated workflows and 1 weak candidate.
Recommended:
- Add a small orchestrator prompt rule for <workflow> because <evidence>.
- Extend existing <skill> instead of creating a new one because <overlap>.
Skip:
- <candidate> because it only appeared once.
Proceed with the proposed edits?When applying changes, preserve existing user settings and prefer narrow, append-only edits.
Return a compact report:
Findings
- <workflow>: evidence, frequency/confidence, recommended form.
Recommended changes
- <asset/config/doc>: one-line purpose and why this is the smallest useful form.
Skipped
- <candidate>: why not worth packaging now.
Needs more evidence
- <candidate>: what would make it actionable.If nothing qualifies, say:
No strong repeated workflow found. I would not add or change any reusable assets
yet.1c0e1f4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.