Target workflow
Matt Pocock Skills Reviewer (.github/workflows/mattpocock-skills-reviewer.md) — highest-AIC workflow in the last 7 days not yet optimized in the past 14 days (last optimized 2026-06-26).
Analysis period
Last 7 days, 5 completed runs (all pull_request events).
Cost profile
Headline finding: a single failed run (§31497780690) consumed 327.4 AIC — 78.6% of the entire 5-run total — while every successful run averaged only 22.3 AIC. This one run dominates the cost profile far more than any prompt inefficiency in the successful runs.
Ranked recommendations
1. Fail fast on safe-outputs MCP gateway startup failure instead of timing out (est. ~250 AIC saved per occurrence)
- Evidence: run §31497780690 hit
safeoutputs tools/list returned 0 tools at 13:47:23 (within the first minute) and printed ##[error]Unhandled error: ... Failing fast, yet the agent step continued running for another ~15 minutes doing full PR analysis (reading diffs, invoking the pr-triage sub-agent, generating full review comments) before the job was killed by the 15-minute timeout-minutes limit at 14:02:37. All of that analysis work was thrown away since no safe output could ever be emitted once the gateway had 0 tools registered.
- Action: when the safeoutputs gateway reports 0 tools at startup, abort the agent turn immediately (before invoking the model) rather than letting the harness continue for the full timeout window. This is an infra/harness-level fix (not this workflow's prompt), but it directly protects every safe-outputs-dependent workflow from this exact AIC-spike pattern.
- Caveat: this may be a shared harness behavior outside this workflow's
.md source — flagging here because this workflow was the clearest example in the sample, but the fix likely belongs in the MCP gateway / agent driver.
2. Remove two unused installed skills from the workflow (est. 3-5% prompt reduction, ~1 AIC/run)
- Evidence: the
skills: frontmatter installs 7 skills (diagnosing-bugs, tdd, improve-codebase-architecture, grill-with-docs, to-prd, codebase-design, domain-modeling) and all 7 are documented in the "Available Matt Pocock Skills" section (lines 87–97). However, the pr-triage sub-agent's Skill mapping (lines 290–297) and its allowed recommended_skills list (lines 281–286) only ever select from 5 skills: /diagnosing-bugs, /tdd, /codebase-design, /improve-codebase-architecture, /grill-with-docs. /to-prd and /domain-modeling are installed, described in the main prompt, and referenced in "Focus areas by skill" style guidance nowhere in Step 4 — they can never be selected or applied by the current triage logic.
- Action: either (a) remove
/to-prd and /domain-modeling from skills: frontmatter and the "Available Matt Pocock Skills" section entirely, or (b) add them to the pr-triage skill mapping if they were intended to be reachable. Given they were likely intentionally scoped out (both are PRD/vocabulary tools, poor fit for line-level code review), option (a) is the conservative choice — this removes two skill descriptions from the always-loaded prompt and stops installing two unused skill bundles at workflow start.
3. Trim "Focus areas by skill" section to only include mapped skills (est. minor, ~5% of prompt body)
- Evidence: Step 4 (lines 156–182) spells out full focus-area guidance for all 5 mapped skills every run, even though
pr-triage only ever recommends 1–2 of them per PR. This is much smaller overhead than Recommendation 1 but is a legitimate, low-risk trim.
- Action: no removal recommended (all 5 remain reachable and used across historical runs) — flagging only as an observation; do not act on this without more run samples confirming which skill combinations are actually infrequent.
Caveats
- Sample size is small (5 runs, 1 workflow file version) — AIC savings estimates for Recommendation 2 are conservative and based on frontmatter/prompt line-count reduction only, not measured before/after runs.
- Recommendation 1 addresses harness/driver behavior, not workflow-specific YAML; it is included because it was the dominant cost driver in this sample and materially changes how much AIC this specific workflow burns during safe-outputs infra failures.
- No inline sub-agent recommendation is made: the workflow already has one (
pr-triage), which appropriately isolates a small-model-suited classification task from the main review.
- No setup-prefix duplication was found across sections in this workflow — it already uses shared components (
shared/pr-review-base.md, shared/pr-diff-data-fetch.md, shared/otlp.md) for cache/data-fetch logic.
Raw run data (5 runs analyzed)
Generated by Agentic Workflow AIC Usage Optimizer · auto · 66.1 AIC · ⊞ 10.5K · ◷
Target workflow
Matt Pocock Skills Reviewer (
.github/workflows/mattpocock-skills-reviewer.md) — highest-AIC workflow in the last 7 days not yet optimized in the past 14 days (last optimized 2026-06-26).Analysis period
Last 7 days, 5 completed runs (all
pull_requestevents).Cost profile
Headline finding: a single failed run (§31497780690) consumed 327.4 AIC — 78.6% of the entire 5-run total — while every successful run averaged only 22.3 AIC. This one run dominates the cost profile far more than any prompt inefficiency in the successful runs.
Ranked recommendations
1. Fail fast on safe-outputs MCP gateway startup failure instead of timing out (est. ~250 AIC saved per occurrence)
safeoutputs tools/list returned 0 toolsat 13:47:23 (within the first minute) and printed##[error]Unhandled error: ... Failing fast, yet the agent step continued running for another ~15 minutes doing full PR analysis (reading diffs, invoking thepr-triagesub-agent, generating full review comments) before the job was killed by the 15-minutetimeout-minuteslimit at 14:02:37. All of that analysis work was thrown away since no safe output could ever be emitted once the gateway had 0 tools registered..mdsource — flagging here because this workflow was the clearest example in the sample, but the fix likely belongs in the MCP gateway / agent driver.2. Remove two unused installed skills from the workflow (est. 3-5% prompt reduction, ~1 AIC/run)
skills:frontmatter installs 7 skills (diagnosing-bugs,tdd,improve-codebase-architecture,grill-with-docs,to-prd,codebase-design,domain-modeling) and all 7 are documented in the "Available Matt Pocock Skills" section (lines 87–97). However, thepr-triagesub-agent'sSkill mapping(lines 290–297) and its allowedrecommended_skillslist (lines 281–286) only ever select from 5 skills:/diagnosing-bugs,/tdd,/codebase-design,/improve-codebase-architecture,/grill-with-docs./to-prdand/domain-modelingare installed, described in the main prompt, and referenced in "Focus areas by skill" style guidance nowhere in Step 4 — they can never be selected or applied by the current triage logic./to-prdand/domain-modelingfromskills:frontmatter and the "Available Matt Pocock Skills" section entirely, or (b) add them to thepr-triageskill mapping if they were intended to be reachable. Given they were likely intentionally scoped out (both are PRD/vocabulary tools, poor fit for line-level code review), option (a) is the conservative choice — this removes two skill descriptions from the always-loaded prompt and stops installing two unused skill bundles at workflow start.3. Trim "Focus areas by skill" section to only include mapped skills (est. minor, ~5% of prompt body)
pr-triageonly ever recommends 1–2 of them per PR. This is much smaller overhead than Recommendation 1 but is a legitimate, low-risk trim.Caveats
pr-triage), which appropriately isolates a small-model-suited classification task from the main review.shared/pr-review-base.md,shared/pr-diff-data-fetch.md,shared/otlp.md) for cache/data-fetch logic.Raw run data (5 runs analyzed)