reflect

Analyzes recent OpenCode sessions to recommend reusable skills, agents, commands, and config changes.

Updated May 23, 2021
One-click install
npx skills add https://github.com/Favot/.dotfiles --skill reflect-favot
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reflect
Source: https://github.com/Favot/.dotfiles/tree/main/.config/opencode/skills/reflect
Command: npx skills add https://github.com/Favot/.dotfiles --skill reflect-favot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repeated manual workflows and recurring friction across AI coding sessions go unnoticed, so users keep re-explaining the same processes instead of turning them into reusable skills, agents, commands, or configuration. ## Core Features & Use Cases - Workflow Pattern Detection: Reviews recent sessions, project notes, and existing agent assets to find repeated friction with frequency, cost, and confidence scoring. - Session Archaeology Mode: With --sessions, queries the OpenCode SQLite database to analyze historical sessions across repos, caching per-session summaries and aggregating cross-repo patterns. - Smallest-Useful-Form Recommendations: Proposes the least powerful fix (prompt rule, skill, command, agent, playbook, or no change) and asks for approval before editing any files. - Use Case: After noticing you repeatedly run the same release checklist, run /reflect release workflow to get an evidence-backed proposal for a reusable command or playbook. ## Quick Start Ask the agent to run /reflect on your recent work to identify repeated workflows worth turning into reusable assets.

Frequently Asked Questions about reflect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze past OpenCode sessions for repeated patterns?▼

Run /reflect --sessions to query the OpenCode SQLite database at ~/.local/share/opencode/opencode.db. It loads recent sessions and messages, summarizes each with friction points and confidence scores, then aggregates cross-repo patterns into a report.

How to decide between creating a skill, command, or custom agent?▼

Reflect scores each candidate on frequency, cost, risk, stability, and existing coverage, then recommends the smallest useful form. Prompt rules come first, then skills, commands, and only custom agents when a distinct specialist lane is clearly needed.

Does reflect change my OpenCode config automatically?▼

No. Reflect presents a proposal and asks for approval before editing prompts, skills, commands, agents, MCP permissions, or config. When changes are applied, they take effect on the next OpenCode run, so a restart may be needed.

What happens when reflect finds no repeated workflows?▼

It reports that no strong repeated workflow was found and recommends no changes. Treating 'create nothing' as a valid outcome is part of its conservative, evidence-driven contract.

Why are some sessions skipped during session analysis?▼

Sessions are skipped when they fail to load or contain no messages. Reflect logs each failure, continues with remaining sessions, and reports the total skipped count at the end of the analysis.