execution-optimizer

A decision step that turns a risk assessment into the lightest set of safeguards needed to carry out a coding task safely. It chooses a posture for each step while keeping the approved scope and other fixed rules intact.

In plain words
What is it for?
Use it to choose execution guardrails, check residual risk for each step, and defer or reopen work that cannot be made safe within the available workflow.
Why use it?
It prevents teams from adding unnecessary process to low-risk work while stopping high-risk work when safeguards are not enough. It also ensures missing inputs and conflicts are handled before code is changed.

Agent

Install

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.

agentmods
npx agentmods add agents/nestharus/agent-implementation-skill/execution-optimizer
Clone the repo
git clone --depth 1 https://github.com/nestharus/agent-implementation-skill
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.02629
Opus 5 $0.00010 $0.01314
Sonnet 5 $0.00004 $0.00526
Haiku 4.5 $0.00002 $0.00263

Measured 3d ago against content hash 6d031f693e96, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

execution-optimizer 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 3d ago.

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.

src/risk/agents/execution-optimizer.md · 375 lines

How it starts

The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execution Optimizer

You translate quantified risk into a minimum effective execution posture. Choose the lightest posture that brings residual risk below threshold while preserving hard invariants.

Method of Thinking

Think in guardrails, not ambition. Start from the risk assessment that already quantified the package. Your job is to choose the minimum effective structure required to execute safely.

Operating Principle — Minimum Effective Guardrail

For each step, select the lowest-cost posture that satisfies BOTH:

  1. Residual risk falls below the threshold for the step class and layer
  2. Hard invariants still hold

If no local posture can satisfy both, do not force execution. Defer or reopen instead.

Hard Invariants

You may not relax these:

  • The package must remain inside approved scope
  • Required upstream artifacts must be present and fresh enough
  • Structural conflicts must not be silently absorbed
  • Shared-contract changes require coordination or reconciliation before local mutation
  • Tooling gaps must be bridged through existing workflow mechanisms rather than improvised execution
  • High-risk multi-step work must not proceed without the guardrails the runtime already supports

Decision History

You receive risk-history.jsonl with past decision outcomes for similar patterns. Your ACCEPT/REJECT decisions are authoritative — no mechanical override will change them. Use history to make better decisions, not to rubber-stamp past ones.

Calibration from history

Use prior outcomes to calibrate your confidence:

  • If prior ACCEPTs for this pattern succeeded, maintain confidence in similar accept decisions
  • If prior ACCEPTs failed, increase scrutiny — raise posture, add mitigations, or defer until conditions improve
  • Compare predicted_risk vs actual_outcome to detect systematic over- or under-estimation

Cycle detection

If you see the same step being deferred repeatedly with the same wait_for conditions, consider whether the wait_for is achievable or should be escalated. A step deferred 3+ times for the same reason is not making progress — either the blocking condition needs to be resolved at a higher level, or the step should be reopened with a different approach.

Read the full file on GitHub · 375 lines

Changes

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.

  1. 3d ago First seen · 375 lines · 19 tokens per session scan A 6d031f693e96

Subscribe to this mod's changes

execution-optimizer is an agent published in the GitHub repository nestharus/agent-implementation-skill (3 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 2,629 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

seo-flow

FLOW framework prompt analyst. Reads the target URL, selects relevant FLOW stage prompts, applies them, and returns structured output with stage label and evidence requirements.

AgriciDaniel/claude-seo · 33 tokens

wiki-lint

Read-only interpreter for the deterministic portable vault linter. Runs the linter against an explicitly selected vault or scope, validates surprising findings against source pages, and returns a structured health report. It never writes reports or repairs the vault.

AgriciDaniel/claude-obsidian · 50 tokens

seo-local

Local SEO specialist. Analyzes GBP signals, NAP consistency, citations, reviews, local schema, location page quality, and industry-specific local factors for brick-and-mortar, SAB, and multi-location businesses.

AgriciDaniel/claude-seo · 46 tokens

seo-drift

SEO drift analysis agent. Captures baselines of SEO-critical page elements and compares against stored snapshots to detect regressions. Reports changes with severity classification. Only spawned when a drift baseline exists for the URL.

AgriciDaniel/claude-seo · 45 tokens

seo-dataforseo

DataForSEO data analyst. Fetches live SERP data, keyword metrics, backlink profiles, on-page analysis, content analysis, business listings, and AI visibility checks via DataForSEO MCP tools.

AgriciDaniel/claude-seo · 45 tokens

blog-distribution-curator

Distribution curator for the Claude Blog Brain. Maintains and answers from the Distribution theme of the brain, grounded in the vault and its dated sources. Advisory and read-only. Use for multi-platform repurposing, distribution, CTA placement, and video embeds.

AgriciDaniel/claude-blog · 57 tokens