Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/mthines/agent-skills/optimize-approachnpx skills add mthines/agent-skills --skill optimize-approachgit clone --depth 1 https://github.com/mthines/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mthines/agent-skills/optimize-approach)<a href="https://agentmods.dev/skills/mthines/agent-skills/optimize-approach"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/optimize-approach.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00209 | $0.02693 |
| Opus 5 | $0.00105 | $0.01347 |
| Sonnet 5 | $0.00042 | $0.00539 |
| Haiku 4.5 | $0.00021 | $0.00269 |
Grade A, and why
optimize-approach scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize Approach
Given a change and its intent, decide whether it takes the most optimal approach — and if not, propose or apply a concretely better one.
This skill is the fourth review lens in this repo, distinct from the three that already exist:
| Lens | Question | Applies? |
|---|---|---|
holistic-analysis review |
Does the diff do what it claims and fit the system? | No |
critical |
How could this fail? | No |
code-quality simplify |
Can this be mechanically simpler? | Yes — Class M only |
optimize-approach (this skill) |
Is this the most optimal approach, and if not what is? | Yes — gated |
This
SKILL.mdis a thin index. Detailed rules live inrules/*.mdand load on demand.
Mode Detection
Parse the first token of $ARGUMENTS.
| Mode | Default | Trigger | What it does |
|---|---|---|---|
report |
yes | No mode token, or report |
Emit a structured proposal (or nothing when optimal). Never edits files. |
apply |
First token apply |
Same analysis, then apply the top proposal behind a confidence gate. Own-work contexts only. | |
plan |
First token plan |
Review a drafted plan's approach at plan time (aw-planner Phase 1). Returns plan-level proposals; the planner revises the plan. See rules/plan-mode.md. |
Flags
| Flag | Applies to | Effect |
|---|---|---|
--no-confidence-gate |
apply |
Human-only override. Bypasses the confidence(code) ≥ 90 % gate for a single apply run. Reserved for explicit human slash invocations — a calling agent (pr-reviewer, polish, aw-planner) never sets it. The other apply-mode guards are not waived: apply_safe, the forbidden-targets list, the scoped check, and revert-on-failure all still apply. See rules/apply-mode.md. |
Inputs
When a calling agent (reviewer / pr-reviewer / polish) invokes this skill, it passes:
intent_summary— 2–3 line intent (the caller's Step 1.3 output).diff— the full unified diff under review.changed_files— list of{path, patch}entries.caller—pr-reviewer|polish|aw-planner(affects framing and whether apply is allowed). Forpr-reviewer, also passreview_relation: "self" | "cross"— self uses assertive framing, cross uses question framing.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today Changed · +1 lines c3e2332953b8
- 6d ago First seen · 170 lines · 209 tokens per session scan A f842566c2f79
optimize-approach is a skill published in the GitHub repository mthines/agent-skills (12 stars, last pushed yesterday), licensed MIT. It adds 209 tokens to every session and 2,693 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ego-browser
Skill "ego-browser" from citrolabs/ego-lite, covering ego-browser, quick start, common helpers, task spaces and control handoff.
temporal-developer
Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, or workers with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI, Temporal Server, or…
x-algorithm
Write X (Twitter) posts that the For You algorithm actually rewards. Grounded in the open-sourced X recommendation system — the Grok-based transformer ranker, Phoenix retrieval, Thunder in-network store, and Grox content-understanding pipeline. Use when the user wants to write a post, thread, reply, or quote; plan a…
opencode-memory
Browse local OpenCode history: sessions, messages, plans, prompt history, and prior decisions. Use when the user says history, previous session, last time, remember, recall, plans, prior work, or when resuming/debugging repeated work where earlier OpenCode context may help. Do not use for fresh tasks or when current…
creating-explainers
Use when creating an interactive explainer - a single self-contained HTML page with hand-built Canvas figures. Handles source-file explainers, topic-driven research explainers, and mixed intake where files provide the spine and research adds support. Trigger phrases include "make an explainer", "turn this paper into…
custom-icons
Create or refine custom icon assets as native or traced SVGs and transparent PNG/WebP files. Use when the user asks for a bespoke icon or cohesive icon set, wants an image traced into a clean vector, or needs a detailed or 3D icon with transparency.