Skip to content

[agentic-token-optimizer] Optimize Impeccable Skills Reviewer AIC usage #65044

Description

@github-actions

Target workflow

Impeccable Skills Reviewer (.github/workflows/impeccable-skills-reviewer.md). It is the highest-AIC workflow in the 7-day window that was not optimized in the last 14 days. "Matt Pocock Skills Reviewer" ranked higher but was optimized on 2026-09-30. It was last optimized on 2026-07-02.

Analysis period and runs

7 days ending 2026-10-02. 3 runs: 2 successes with agent data and 1 failure with no agent data. Sample size is small, so treat the estimates as directional.

Cost profile

Metric Value
Total AIC 72.55
Avg AIC/run (3 runs) 24.18
Avg AIC/successful run 36.27 (range 12.86 to 59.69)
Raw tokens 32,988 (6,748 and 26,240)
Avg turns/run 1
Action minutes 8, 13, 42 (63 total)
Cache efficiency Not exposed in the data. Input tokens per invocation are flat at about 5.4k, with rebuild factor 1.00 to 1.05, so there is no context bloat.

Ranked recommendations

1. Investigate and cap the 41-minute failed run (about 15 to 20 AIC/run-equivalent in minutes, plus reliability)

§37012394884 ran 41.3 min and failed with 0 tokens. That is 42 of the 63 action minutes in the window. The workflow sets timeout-minutes: 15, so the time was almost certainly spent outside the agent step. The likely stages are pre-fetch (shared/pr-diff-data-fetch.md), skill install, or detection. I could not read job-level steps with the available token, so the exact stage is unconfirmed.

  • Action: check the job step timings for that run.
  • Action: add explicit timeout-minutes to the pre-fetch and skill-install steps, and fail fast.

2. Reduce invocation count on large reviews (about 20 to 30 AIC on the heavy run)

Run §37013466606 used 27 model invocations, 26k tokens and 59.7 AIC. It produced one review and two inline comments. Run §37014393515 used 7 invocations and 12.9 AIC for one review. That is about 4.6x the AIC for similar output. Likely drivers:

  • Re-reading diff slices and the installed SKILL.md across many turns.
  • Reading skill files even though the prompt already inlines the mode guidance.

Actions:

  • Tell the agent to read pr-diff.patch once, in a single batched read.
  • State that reading SKILL.md is forbidden unless the PR changes UI files.
  • Add a hard cap of about 12 tool calls.
  • Replace the find /tmp/gh-aw ... SKILL.md step with "skip unless the inline guidance is insufficient". This removes an unbounded filesystem search.

3. Skip PRs with no UI surface before the model runs (about 10 to 25 AIC per skipped run)

Impeccable skills target UI work. The trigger excludes only *.md, docs/**, .changeset/** and scratchpad/**. The observed runs were on PRs from ci-coach/* branches, such as version-pin changes. These are unlikely to benefit from UI-design review.

  • Action: change paths-ignore to a positive paths: allowlist, for example **/*.{css,scss,tsx,jsx,html,vue,svelte} and docs/src/**.
  • Alternative: add a deterministic pre-agent step that sets a skip flag when no UI-relevant file changed, so the agent calls noop after about 1 turn.
  • Verify against repo history that Go-only and workflow-only PRs rarely get actionable Impeccable comments before narrowing.

4. Lower max-continuations: 6 to 3 (risk cap only)

The runs observed used 1 to 2 turns, so 6 continuations is headroom that is never used. Lowering it bounds worst-case spend and is low risk.

Tool usage

No tool removal is recommended. cli-proxy and github: gh-proxy are needed by the shared fetch and review safe-outputs. Safe-output usage (review, inline comments) is consistent with the configured tools. Friction was 0 occurrences in both audited runs, with no errors or firewall blocks.

Structural optimization

None warranted. The prompt has no repeated setup prefix. Inline sub-agents are not recommended: the work is a single-PR synthesis task, so the main agent should keep it.

Caveats

References: §37012394884, §37013466606, §37014393515

Generated by Agentic Workflow AIC Usage Optimizer · copilot · auto · 23.6 AIC · ⊞ 10.7K · ◷

  • expires on Oct 9, 2026, 7:01 AM UTC-08:00

Activity

  1. github-actions commented on Oct 5, 2026

    @github-actions
    ContributorAuthor

    This issue is being closed as outdated. A newer issue has been created: #65885

    View newer issue


    This action was performed automatically by the Agentic Workflow AIC Usage Optimizer workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions