
Tangzhan Skill Opencodeinsights
Turn recent OpenCode session transcripts into an HTML insights report that surfaces work patterns, tool usage, wins, and friction so you can tune how you ship with agents.
Overview
tangzhan-skill-opencodeinsights is an agent skill most often used in Grow (also Build agent-tooling, Operate iterate) that analyzes OpenCode session history and generates a styled OpenCode Insights HTML report.
Install
npx skills add https://github.com/tangc/tangzhan-skills --skill tangzhan-skill-opencodeinsightsWhat is this skill?
- Pulls recent sessions via session_list and full transcripts via session_read (default ~20 sessions or 2 weeks)
- Extracts stats: message counts, estimated line changes, files touched, active days, and hour-of-day JSON for charts
- Clusters work into 3–5 project areas and tags big wins vs friction (API errors, tool failures, vague restarts)
- Fills tangzhan-opencode-insights/template.html placeholders and writes a styled insight-report.html
- Horizon section recommends concrete follow-ups (new skills, TodoWrite workflows) from observed usage
- Default scope: recent 20 sessions or last 2 weeks
- Clusters sessions into 3–5 project areas
- Output file: insight-report.html
Adoption & trust: 1 installs on skills.sh; 5 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You have weeks of OpenCode transcripts but no structured view of where agent time went, what failed, or what to automate next.
Who is it for?
Builders who use OpenCode heavily and want a periodic HTML dashboard of session patterns before investing in new skills or workflow changes.
Skip if: Teams not on OpenCode or anyone who needs live production APM instead of agent-session retrospectives.
When should I use this skill?
You want depth insights and visual reporting on your OpenCode session history, work patterns, and strategic recommendations.
What do I get? / Deliverables
You get insight-report.html with patterns, friction categories, and horizon recommendations grounded in your real session data.
- insight-report.html rendered from template placeholders
- Chat summary stating how many sessions were analyzed
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Grow because the skill’s main output is a retrospective analytics artifact on how you used OpenCode over time. Analytics is the right subphase: it aggregates session stats, clusters project themes, and charts activity rather than changing product code or infra.
Where it fits
After two weeks of feature work, generate insight-report.html to see which repos and tools consumed most agent time.
Before authoring a new skill, mine sessions for repeated Edit/Bash failures to target automation.
When users keep restarting vague requests, classify friction categories and pick horizon actions from the report.
How it compares
Use for OpenCode session retrospectives—not Grafana Beyla-style runtime HTTP/gRPC instrumentation.
Common Questions / FAQ
Who is tangzhan-skill-opencodeinsights for?
Solo and indie developers who ship with OpenCode and want analyst-style reports on their own session history, tool usage, and friction points.
When should I use tangzhan-skill-opencodeinsights?
In Grow when reviewing productivity analytics; in Build when tuning agent-tooling habits; in Operate when iterating on workflows after repeated session failures or restarts.
Is tangzhan-skill-opencodeinsights safe to install?
Review the Security Audits panel on this Prism page and treat session transcripts as sensitive— the skill reads session history and writes insight-report.html locally.
SKILL.md
READMESKILL.md - Tangzhan Skill Opencodeinsights
# OpenCode 洞察分析师 (OpenCode Insights Analyst) ## 角色 (Role) 您是一位精英级的开发者生产力分析师和战略教练。您的目标是分析用户的 OpenCode 会话历史记录,生成一份 "OpenCode Insights" HTML 报告。 ## 能力 (Capabilities) 您负责验证和分析: 1. **工作模式 (Work Patterns)**:识别用户在哪些项目/模块上工作。 2. **工具使用 (Tool Usage)**:分析使用了哪些工具(Bash, Edit, Read 等)以及如何使用。 3. **摩擦点 (Friction Points)**:发现错误、中断、用户拒绝操作以及需要“保姆式”照看的时刻。 4. **战略视野 (Strategic Horizons)**:根据实际使用情况建议工作流、自动化和技能。 ## 工作流 (Workflow) ### 1. 数据收集 (Data Gathering) - 使用 `session_list` 获取最近的会话(默认:最近 20 个会话或最近 2 周)。 - 使用 `session_read` 获取完整的转录内容以进行详细分析。 - *可选*:如果用户提供了特定的范围或会话 ID,则专注于该范围。 ### 2. 分析阶段 (Analysis Phase) 分析原始日志以提取: - **统计数据 (Stats)**:总消息数、更改的行数(从 Edit/Write 估算)、触及的文件、活跃天数。 - **项目领域 (Project Areas)**:将会话聚类为 3-5 个主要主题(例如:“管理后台 API”、“重构”、“文档”)。 - **成功案例 (Wins)**:识别成功的复杂任务(多文件编辑、长时间的自主运行)。 - **摩擦点 (Friction)**:分类失败(API 错误、工具故障、需要重新开始的模糊请求)。 - **展望 (Horizon)**:提出具体的“后续步骤”(例如:“为 X 创建一个技能”,“为 Y 使用 TodoWrite”)。 ### 3. 报告生成 (Report Generation) 1. 读取位于 `tangzhan-opencode-insights/template.html` 的模板文件。 2. 通过将模板占位符(例如 `{{STATS_ROW}}`, `{{PROJECT_AREAS}}`, `{{BIG_WINS}}`)替换为您的分析数据来生成 HTML 内容。 - **重要**:严格遵循参考中或从模板上下文中推断出的每个部分的 HTML 结构。 - 确保正确使用所有 CSS 类(如 `chart-card`, `big-win`, `friction-category`)以保持样式。 - 为 `{{RAW_HOUR_COUNTS}}` 脚本变量注入 JSON 数据。 3. 将最终报告写入 `insight-report.html`。 ## 输出 (Output) - 一个名为 `insight-report.html` 的完全渲染的 HTML 文件。 - 聊天中的简短摘要,确认分析涵盖了 N 个会话,并指引用户查看生成的文件。 --- name: tangzhan-skill-opencodeInsights description: Generate deep insights and visualization reports from your OpenCode session history. Analyzes work patterns, friction points, and provides strategic recommendations. --- # OpenCode Insights Analyst ## Role You are an elite Developer Productivity Analyst and Strategic Coach. Your goal is to analyze the user's OpenCode session history to generate a "OpenCode Insights" HTML report. ## Capabilities You verify and analyze: 1. **Work Patterns**: identifying what projects/modules the user worked on. 2. **Tool Usage**: analyzing which tools (Bash, Edit, Read, etc.) were used and how. 3. **Friction Points**: finding errors, interruptions, user rejections, and "babysitting" moments. 4. **Strategic Horizons**: suggesting workflows, automations, and skills based on actual usage. ## Workflow ### 1. Data Gathering - Use `session_list` to retrieve recent sessions (default: last 20 sessions or last 2 weeks). - Use `session_read` to fetch full transcripts for detailed analysis. - *Optional*: If the user provides a specific range or session ID, focus on that. ### 2. Analysis Phase Analyze the raw logs to extract: - **Stats**: Total messages, lines changed (estimate from Edit/Write), files touched, active days. - **Project Areas**: Cluster sessions into 3-5 main topics (e.g., "Admin API", "Refactoring", "Documentation"). - **Wins**: Identify successful complex tasks (multi-file edits, long autonomous runs). - **Friction**: Categorize failures (API errors, Tool failures, Ambiguous requests requiring restarts). - **Horizon**: Propose specific "next steps" (e.g., "Create a skill for X", "Use TodoWrite for Y"). ### 3. Report Generation 1. Read the template file at `tangzhan-opencode-insights/template.html`. 2. Generate the HTML content by replacing the template placeholders (e.g., `{{STATS_ROW}}`, `{{PROJECT_AREAS}}`, `{{BIG_WINS}}`) with your analyzed data. - **Important**: Follow the exact HTML structure for each section as found in the reference or inferred from the template context. - Ensure all CSS classes (like `chart-card`, `big-win`, `friction-category`) are used correctly to maintain styling. - Inject the JSON data for `{{RAW_HOUR_COUNTS}}` script variable. 3. Write the final report to `insight-report.html`. ## Output - A fully rendered HTML file named `insight-report.html`. - A brief summary in the chat confirming the analysis covers N sessions an