octocode-prompt-optimizer

octocode-prompt-optimizer is a skill for Claude Code, Codex from bgauryy/octocode. It costs 59 tokens per session (867 once invoked), scanned A, original, MIT.

A review and rewriting process for prompts, tool descriptions, policies, and handoffs used by software agents. It focuses on making their behavior clearer, safer, easier to trigger, and measurable.

In plain words
What is it for?
Use it to inspect, rate, revise, validate, and produce clearer agent instructions while preserving important commands, identifiers, and rules.
Why use it?
It helps expose ambiguous instructions, unsupported claims, unnecessary requirements, and changes that could alter intended behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to inspect, rate, revise, validate, and produce clearer agent instructions while preserving important commands, identifiers, and rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bgauryy/octocode/octocode-prompt-optimizer
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.

Any agent
npx skills add bgauryy/octocode --skill octocode-prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/bgauryy/octocode

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for octocode-prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/bgauryy/octocode/octocode-prompt-optimizer/github.svg)](https://agentmods.dev/skills/bgauryy/octocode/octocode-prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/bgauryy/octocode/octocode-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/bgauryy/octocode/octocode-prompt-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for octocode-prompt-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/bgauryy/octocode/octocode-prompt-optimizer"><img src="https://agentmods.dev/badge/skills/bgauryy/octocode/octocode-prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00059 $0.00867
Opus 5 $0.00030 $0.00434
Sonnet 5 $0.00012 $0.00173
Haiku 4.5 $0.00006 $0.00087

Measured 12d ago against content hash c9753298ffbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

octocode-prompt-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 12d 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.

skills/octocode-prompt-optimizer/SKILL.md · 40 lines

How it starts

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

Octocode Prompt Optimizer

Optimize instruction behavior, not prose aesthetics.

Flow: READ → UNDERSTAND → RATE → FIX → VALIDATE → OUTPUT.

Lobby rules and gates

  • READ: inspect the whole input and its type; UNDERSTAND: map goal, parts, flow, assumptions, and unknowns.
  • RATE: record evidenced issues, severity, and baseline; FIX: address Critical/High issues and name deliberate deferrals.
  • VALIDATE: prove intent and required behavior remain correct; OUTPUT: provide the requested artifact and truthful delta.
  • Use the full path for multi-section, ambiguous, tool-facing, or high-risk work; combine adjacent steps only for short, low-risk text. Never skip VALIDATE.
  • Preserve intent, working branches, identifiers, commands, and required metadata; ask before changing them.
  • Verify cited commands, flags, paths, tool names, and schemas before rewriting; flag unverified claims.
  • Make only critical behavior mandatory; retain preference language for real preferences. Mutate files only with authority.
  • Stop when: a material unknown would change intent, scope, or risk (ask one focused question and pause); instruction authority is ambiguous, or resolving a conflict would override user intent; an edit changed intent or working logic (revert it and return to UNDERSTAND); write authority is missing (deliver a patch-style delta instead of a file change); a VALIDATE check fails twice on the same section (report the weakest branch instead of forcing a pass); a reliability gain has no held-out evidence (report it as unmeasured).

Smart routes — load only what the current step needs

  • READ and UNDERSTAND: load references/gates.md — read every section and map intent before judging or drafting.
  • RATE: load references/rate.md; FIX: load references/fix.md; VALIDATE: load references/validate.md; OUTPUT: load references/output.md — load only the active gate so later-step advice cannot bias the current decision.
  • When instructions conflict or a fix needs a compact instruction pattern, load references/patterns.md — apply the higher authority and log the resolution in one line.
  • When reducing noise, load references/conciseness-toolkit.md; when fixing priority/hierarchy load references/attention.md; when choosing a technique for an observed failure load references/prompt-techniques.md — match technique to failure mechanism.
  • When optimizing tool or MCP contracts, load references/tool-contracts.md; for agent handoffs load references/agent-communication.md; for typed packet boundaries load references/zod-agent-contracts.md — make inputs, outputs, authority, and failure states explicit.
  • When context can overflow, load references/context-budget.md; when repeated calls share stable prefixes load references/prompt-caching.md — control relevance, pagination, latency, and cost.
  • When reliability must be measured, load references/evaluation-data.md — build realistic held-out scenarios, verifiers, metrics, and a failure ledger.
  • When instructions consume retrieved or user-supplied content, load references/untrusted-content.md — preserve the boundary between data and authority.
  • When improving this skill, prefer octocode-graph-eval; otherwise load references/improve-loop.md — require measurable acceptance instead of intuition.

Read the full file on GitHub · 40 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. 12d ago First seen · 40 lines · 59 tokens per session scan A c9753298ffbd

Subscribe to this mod's changes

octocode-prompt-optimizer is a skill published in the GitHub repository bgauryy/octocode (932 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 867 once invoked, about $0.0003 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-30.