/octocode-prompt-optimizer
Use when an agent prompt, skill, tool schema, policy, or handoff needs to get clearer, safer, easier to trigger, cheaper in context, or measurable against real behavior.
$ npx -y skills add bgauryy/octocode-mcp --skill octocode-prompt-optimizer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/octocode-prompt-optimizer
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when an agent prompt, skill, tool schema, policy, or handoff needs to get clearer, safer, easier to trigger, cheaper in context, or measurable against real behavior.
SKILL.md
octocode-prompt-optimizer.SKILL.mdname: octocode-prompt-optimizer
description: "Use when an agent prompt, skill, tool schema, policy, or handoff needs to get clearer, safer, easier to trigger, cheaper in context, or measurable against real behavior."
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 validation.
- 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.
Smart routes — load only what the current step needs
- During the core path, load only the active gate: `references/gates.md`, `references/rate.md`, `references/fix.md`, `references/validate.md`, or `references/output.md` — prevent later-step advice from biasing the current decision.
- When reducing noise, load `references/conciseness-toolkit.md`; when fixing priority/hierarchy load `references/attention.md`; when choosing reusable structures load `references/patterns.md` or `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.
Related routes
- Use `octocode-skills` for skill-folder architecture/review; `octocode-research` to verify cited contracts; `octocode-graph-eval` for held-out behavior.
- Use `octocode-subagent` for delegation topology; `octocode-awareness` for coordinated instruction-file edits.
Read more
name: octocode-prompt-optimizer description: "Use when an agent prompt, skill, tool schema, policy, or handoff needs to get clearer, safer, easier to trigger, cheaper in context, or measurable against real behavior."
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 validation.
- 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.
Smart routes — load only what the current step needs
- During the core path, load only the active gate: `references/gates.md`, `references/rate.md`, `references/fix.md`, `references/validate.md`, or `references/output.md` — prevent later-step advice from biasing the current decision.
- When reducing noise, load `references/conciseness-toolkit.md`; when fixing priority/hierarchy load `references/attention.md`; when choosing reusable structures load `references/patterns.md` or `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.
Related routes
- Use `octocode-skills` for skill-folder architecture/review; `octocode-research` to verify cited contracts; `octocode-graph-eval` for held-out behavior.
- Use `octocode-subagent` for delegation topology; `octocode-awareness` for coordinated instruction-file edits.
Evidence-first code research for AI agents and developers. Octocode researches your local code and external code alike (GitHub repos, PRs, npm) with one toolset: ripgrep + AST search, trees, precise reads, and LSP.
Repo: bgauryy/octocode-mcp
Other skills on octocode.
- /octocode-benchmark
Use when planning, running, grading, or reporting the by-hand Octocode research benchmark — pairwise matchups (Octocode anchor vs one baseline: gh+RTK, gh+Headroom, or plain gh) over markdown questions, with a fresh isolated runner agent per (question, arm, pass), one blind
Open skill - /octocode-awareness
Use when coordinating work in a shared repo — multi-agent or solo across sessions: collision avoidance, handoffs, verification debt, durable memory/wiki, hooks setup/debug, and repo learning before planning, editing, reviewing, or testing.
Open skill - /octocode-brainstorming
Use when an idea needs disciplined exploration before building: generate options, test worth-building, map adjacent solutions, challenge assumptions, narrow scope, or choose Build RFC / Prototype / Narrow / Park — even without saying brainstorm.
Open skill - /octocode-chrome-devtools
Use when browser debugging, scraping a known URL efficiently, or running a multi-step page workflow needs real Chrome DevTools evidence: network, console, performance, DOM/CSS, screenshots/PDF, security, cookies/storage, click/fill/search flows, or auth-gated live pages via CDP
Open skill - /octocode-documentation
Use when writing or updating docs: README, API docs, runbooks, AGENTS.md, CLAUDE.md, ADRs, Diátaxis restructuring, or codebase documentation for humans or coding agents.
Open skill - /octocode-graph-eval
Use when measuring whether a change helped or looping until a target metric is hit — for one agent loop or a graph of loops (multi-agent workflow): ACCEPT/REVERT, keep/discard, goal→KPI contracts, eval suites, graders, held-out checks, benchmarks, TDD failing-case-first,
Open skill

