agentleFS
wheakerdwheakerd/axiom/skills/optimize-codex-usage/SKILL.md

optimize-codex-usage

Skill3 starsChanged 4 months agoMITView on GitHub

Reduce or diagnose Codex token, credit, and context consumption without weakening task quality or safety. Use only when the user explicitly asks to save Codex credits or tokens, optimize Skills, AGENTS.md, MCP, or context loading, explain unusually high Codex usage, or design a lower-consumption workflow. Do not use for ordinary coding, software performance work, or generic cost questions.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add another Axiom skill only when the requested implementation crosses into that skill's distinct owner: an AGENTS instruction system, …

    line 19
  2. Very specific:

    Use exact token, credit, cache, reasoning, or tool metrics only when the host exposes them for the scoped run.

    line 26
  3. Distinctive:

    Do not claim a percentage saving without a repeatable before/after workload and equivalent quality acceptance.

    line 30
  4. Distinctive:

    Do not remove required tests, rollback checks, secret handling, destructive safeguards, or outcome-owning evidence to reduce context or …

    line 41
  5. Distinctive:

    Do not automatically change the model, reasoning effort, execution mode, or host configuration.

    line 43
  6. Distinctive:

    Do not add telemetry, background work, automatic updates, or network checks.

    line 49
  7. Distinctive:

    Read only candidate owners, then remove duplication or route detail behind one directly discoverable on-demand reference.

    line 56
  8. Distinctive:

    Stop when further reduction would trade away required quality or evidence.

    line 61
  9. Very specific:

    Prefer precise trigger descriptions, one canonical owner per rule, phase-specific references, bounded retries, conclusive stopping …

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Optimize Codex Usage

Reduce total Codex consumption while preserving the requested outcome, authorization boundaries, safety checks, and completion evidence.

Load Policy

  • For a conceptual explanation or a narrow current-product fact, use this file and current official OpenAI documentation only. Do not inspect a repository or load the audit reference unless the request needs it.
  • For an audit, design change, or implementation involving Skills, AGENTS.md, MCP, context, history, tools, validation, or reporting, read references/context-audit.md before changing files.
  • Add another Axiom skill only when the requested implementation crosses into that skill's distinct owner: an AGENTS instruction system, traceable Git state, or a persistent system change. Usage analysis alone needs only this skill.

Measurement Boundary

  • Use exact token, credit, cache, reasoning, or tool metrics only when the host exposes them for the scoped run. Axiom cannot recover hidden usage data.
  • Otherwise label UTF-8 bytes, words, lines, reference counts, tool calls, and route-chain sizes as proxies or estimates.
  • Do not claim a percentage saving without a repeatable before/after workload and equivalent quality acceptance.
  • Fetch current official OpenAI documentation only when a volatile Codex fact affects the decision. Never place current prices, plan limits, or model quotas in always-loaded instructions.

Non-Negotiable Boundaries

  • Define the required quality, safety, authorization, rollback, and evidence bar before optimizing. Lower resource use counts only when that bar still passes.
  • Do not remove required tests, rollback checks, secret handling, destructive safeguards, or outcome-owning evidence to reduce context or calls.
  • Do not automatically change the model, reasoning effort, execution mode, or host configuration. Offer a bounded comparison only when the user requests usage optimization and the host supports the choice.
  • Preserve unrelated work. Do not reset, stash, clean, stage, commit, push, deploy, install tools, change user Skills, or mutate remote state without separate authorization.
  • Do not add telemetry, background work, automatic updates, or network checks.

Optimization Order

  1. Bound the target workflows and representative requests.
  2. Measure always-loaded and common-path context before rare worst cases.
  3. Inventory metadata and route edges before reading bodies.
  4. Read only candidate owners, then remove duplication or route detail behind one directly discoverable on-demand reference.
  5. Reduce repeated tool calls, checks, updates, and reports only where the next decision does not depend on each intermediate result.
  6. Re-run the same routing, authorization, safety, and outcome scenarios.
  7. Stop when further reduction would trade away required quality or evidence.

Prefer precise trigger descriptions, one canonical owner per rule, phase-specific references, bounded retries, conclusive stopping conditions, and concise evidence-led reporting. Keep ordinary no-match work outside Axiom.

Report

Lead with the implemented or recommended outcome. Include affected files or surfaces, comparable before/after measurements, validation results, and real unverified gaps. Omit repeated rationale, routine successful details, and exact usage claims the host did not expose.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.