opportunity-scan

Analyze agent run artifacts or session logs to recommend rules, skills, hooks, and other primitives.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill opportunity-scan-az9713
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opportunity-scan
Source: https://github.com/az9713/claude-code-hooks-tutorial/tree/main/skills/.claude/skills/opportunity-scan
Command: npx skills add https://github.com/az9713/claude-code-hooks-tutorial --skill opportunity-scan-az9713

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working with a coding agent, failures and repetitive manual work accumulate without a systematic way to turn them into durable improvements. This Skill scans what actually happened — one failed run's artifacts or a window of session logs — and recommends which AI-layer primitive (rule, skill, hook, subagent, MCP, automation) would prevent the failure or encode the repeated work. ## Core Features & Use Cases - Reactive run analysis: Point it at one run's artifacts (plan, implementation report, RCA, PR body, diff) plus a symptom you noticed, and it identifies the smallest durable change that would have prevented the problem. - Proactive log scanning: Point it at weeks of session logs (Claude Code, Codex, PI, etc.) and a theme you care about, and it surfaces recurring patterns worth encoding, ranked by frequency and value. - Agent-agnostic primitive mapping: It first reads the agent's own capability docs, then maps each finding to the best-fit extension point in the house style of your existing rules and skills. - Use Case: After a coding agent ignored your conventions in a PR, run the scan on that run's artifacts with the symptom described; receive a self-contained HTML report proposing, for example, a PreToolUse hook or a new CLAUDE.md rule that would have caught it. ## Quick Start Ask the agent to run the opportunity scan on the artifacts from your last failed run, describing the symptom you noticed, and have it produce the HTML report of recommended changes.

Frequently Asked Questions about opportunity-scan

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

FAQPage Schema
How do I find what to improve in my AI coding agent setup?▼

Run the opportunity scan on either one run's artifacts or a window of session logs. It reads what actually happened and recommends the smallest durable change — a rule, skill, hook, subagent, or automation — that would have prevented the failure or encoded the repeated work.

How do I analyze a failed coding agent run?▼

Point the scan at the run's artifacts: the plan, implementation report, RCA, PR body, review output, and diff. Add a short description of the symptom you noticed, and the scan verifies it against the evidence and proposes what in the AI layer would have prevented it.

Does opportunity-scan work with agents other than Claude Code?▼

Yes, it is agent-agnostic. It first identifies which agent it is running as and reads that agent's own extensibility docs, so it works with Claude Code, Codex, PI, or any agent whose capability documentation it can locate.

What is the difference between the reactive and proactive scan modes?▼

The reactive mode scans one run's artifacts to find what would have prevented a specific failure. The proactive mode scans a window of session logs to find recurring manual patterns worth encoding. Each run scans exactly one target and produces one report.

When should I not use opportunity-scan?▼

Do not use it as a quality eval of something already built — it is a discovery tool for what to change, not whether a built thing is good. It also deliberately reports 'nothing to change' for one-off failures no durable change would have prevented.