ai-estimates
Use when estimating how long a task will take: coding, writing, research, analysis, design, data work, or anything else AI can…
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.
Claude Code
$ npx -y skills add alvinunreal/oh-my-opencode-slim --skill reflect --agent claude-code
Codex
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a codex -y
Cursor
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a cursor -y
Gemini CLI
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a gemini-cli -y
GitHub Copilot
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a github-copilot -y
OpenCode
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a opencode -y
Windsurf
$ npx skills add alvinunreal/oh-my-opencode-slim --skill reflect -a windsurf -y
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 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.
Branch: lines marked [branch: --sessions] run only with that flag; plain /reflect skips Session Mode.
Use Reflect when the user asks to:
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.
1. **Detect the schema, then load recent sessions.** OpenCode v2 keeps live data in `session_v2` + `session_message`; legacy v1 databases keep `session`
Detect by probing `session_v2` in `sqlite_master` and select the pair together — never per-table: `session_message` can exist on v1 hosts holding only metadata rows.
Write the probe below to a temp file (for example `/tmp/reflect-sessions.mjs`) and run `bun /tmp/reflect-sessions.mjs`. Do not inline it with `bun -e "…"`: nested quotes get mangled by PowerShell on Windows; a temp script sidesteps shell quoting entirely.
import Database from 'bun:sqlite';
import { homedir } from 'os';
const db = new Database(`${homedir()}/.local/share/opencode/opencode.db`, { readonly: true });
const isV2 = !!db.query("SELECT 1 FROM sqlite_master WHERE type='table' AND name='session_v2'").get();
const LIMIT = 50; // set to the --last N value when specified
const sessions = isV2
? db.query(
`SELECT s.id, p.worktree AS project, s.title, s.agent, s.model, s.time_created, s.cost, s.tokens_input, s.tokens_output, s.time_archived FROM session_v2 s LEFT JOIN project p ON p.id = s.project_id ORDER BY s.time_created DESC LIMIT ${LIMIT}`
).all()
: db.query(
`SELECT id, directory AS project, title, agent, model, time_created, cost, tokens_input, tokens_output FROM session ORDER BY time_created DESC LIMIT ${LIMIT}`
).all();
console.log(sessions);Both branches emit a `project` path for the Per-Session Analysis. Timestamps are epoch **milliseconds**. On v2, a non-null `time_archived` means the session was archived inside OpenCode.
2. **Load session messages** - for each session ID, query the matching message table and parse `data`:
const rows = isV2
? db.prepare('SELECT type, seq, data FROM session_message WHERE session_id = ? ORDER BY seq').all('<session_id>')
: db.prepare('SELECT data FROM message WHERE session_id = ?').all('<session_id>');v2 rows carry a `type` column — parse `data` JSON by it:
signal), skip the output payload; reasoning types → skip entirely
v1 rows have no `type` column — `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:** 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
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 spec
Lean, fine tuned Opencode multi agent suite · Mix any models · Auto delegate tasks
Use when estimating how long a task will take: coding, writing, research, analysis, design, data work, or anything else AI can…
Clone important project dependency source code into an ignored local workspace so OpenCode can inspect library internals. Use…
Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked…
Use when a request includes examples, samples, templates, or reference outputs. Treat them as evidence of intent, not as…
High-cost orchestrator workflow for large, high-risk, multi-phase coding efforts with meaningful dependencies and review gates.…
Configure and improve oh-my-opencode-slim for the current user. Use when users want to tune agents, models, prompts, custom…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration