octocode-prompt-optimizer
Skill947 starsChanged 3 months agoMITView on GitHub
Use when an agent prompt, tool schema, policy, or handoff needs to get clearer, safer, easier to trigger, cheaper in context, or measurable against real behavior. For SKILL.md folder install/review/structure, use octocode-skills.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- octocode-brainstormingSkill
- octocode-chrome-devtoolsSkill
- octocode-documentationSkill
- octocode-graph-evalSkill
- octocode-mannequinSkill
- octocode-researchSkill
- octocode-rfc-generatorSkill
- octocode-roastSkill
- octocode-scrapingSkill
- octocode-skillsSkill
- octocode-subagentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 3 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
READ: inspect the whole input and its type.
- Distinctive: line 16
Use the full path for multi-section, ambiguous, tool-facing, or high-risk work.
- Distinctive: line 18
Verify cited commands, flags, paths, tool names, and schemas before rewriting.
- Very specific: line 23
READ and UNDERSTAND: load references/gates.md — read every section and map intent before judging or drafting.
- Very specific: line 25
When instructions conflict or a fix needs a compact instruction pattern, load references/patterns.md — apply the higher authority and log …
- Very specific: line 26
When reducing noise, load references/conciseness-toolkit.md.
- Very specific: line 27
When optimizing tool or MCP contracts, load references/tool-contracts.md.
- Very specific: line 28
When context can overflow, load references/context-budget.md.
- Very specific: line 29
When reliability must be measured, load references/evaluation-data.md — build realistic held-out scenarios, verifiers, metrics, and a …
- Very specific: line 30
When instructions consume retrieved or user-supplied content, load references/untrusted-content.md — preserve the boundary between data and …
- Very specific: line 31
When improving this skill, prefer octocode-graph-eval.
- Very specific: line 34
Use octocode-skills for skill-folder architecture/review.
- Very specific: line 35
Use octocode-subagent for delegation topology.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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: loadreferences/fix.md; VALIDATE: loadreferences/validate.md; OUTPUT: loadreferences/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 loadreferences/attention.md; when choosing a technique for an observed failure loadreferences/prompt-techniques.md— match technique to failure mechanism. - When optimizing tool or MCP contracts, load
references/tool-contracts.md; for agent handoffs loadreferences/agent-communication.md; for typed packet boundaries loadreferences/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 loadreferences/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 loadreferences/improve-loop.md— require measurable acceptance instead of intuition.
Related routes
- Use
octocode-skillsfor skill-folder architecture/review;octocode-researchto verify cited contracts;octocode-graph-evalfor held-out behavior. - Use
octocode-subagentfor delegation topology.
Done gate
- This skill ships no scripts: every gate above is model-driven, so never report a check you did not actually perform.
- Done requires VALIDATE passed, the OUTPUT variant matching the request, and the reported before/after score, changed files, and deferrals all matching reality.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

