Codex-prompt
Skill64 starsChanged 5 months agoMITView on GitHub
Write or improve prompts for Codex using Anthropic's official best practices. Creates system prompts, agent prompts, tool descriptions, and MCP resource templates. Pass an existing prompt to improve it, or describe what you need to create one from scratch.
In this repository102 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- assumptionsSkill
- capture-learningSkill
- Codex-opus-4-6-promptingSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- diagramSkill
- distillSkill
- effect-tsSkill
- escalateSkill
- evalSkill
- experimentSkill
- hddSkill
- hub-auditSkill
- hub-collabSkill
- implementSkill
- knowledgeSkill
- peer-notebook-delivery-guardSkill
- research-taskSkill
- session-reviewSkill
- source-command-hdd-decideSkill
- source-command-hdd-hddSkill
- source-command-hdd-researchSkill
- source-command-hdd-stage-adrSkill
- source-command-hdd-validateSkill
- statusSkill
- supabaseSkill
- synthesizeSkill
- tasteSkill
- teamSkill
- test-suiteSkill
- theseus-protocolSkill
- thoughtbox:debugSkill
- thoughtbox:decisionSkill
- thoughtbox:evolutionSkill
- thoughtbox:knowledge-querySkill
- thoughtbox:onboardSkill
- thoughtbox:refactorSkill
- thoughtbox:researchSkill
- thoughtbox:session-reviewSkill
- thoughtbox-teamSkill
- ulc-loopSkill
- ulysses-protocolSkill
- workflow-brainstormingSkill
- workflow-ideationSkill
- workflow-reflectionSkill
- workflow-revisionSkill
- workflows-compoundSkill
- workflowSkill
- workflows-planSkill
- workflows-reviewSkill
- workflows-workSkill
- workflow-tournamentSkill
- assumptionsSkill
- capture-learningSkill
- claude-opus-4-6-promptingSkill
- claude-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Sequential steps: Use numbered lists when order or completeness matters.
- Distinctive: line 35
Put longform data at the TOP, query and instructions at the BOTTOM (up to 30% quality lift).
- Distinctive: line 37
Ask Codex to quote relevant passages before answering to cut through noise.
- Distinctive: line 61
Prefer general instructions ("think thoroughly") over prescriptive step-by-step plans — Codex's reasoning often exceeds what you'd …
- Distinctive: line 114
Add 2-3 examples if format-sensitive
- Distinctive: line 115
Use XML tags to separate sections if the prompt exceeds ~200 words
- Distinctive: line 120
Remove aggressive tool-forcing ("MUST", "CRITICAL", "ALWAYS") unless genuinely critical
- Distinctive: line 121
Remove anti-laziness prompting that was needed for older models
- Distinctive: line 122
Add explicit action framing if you want Codex to act rather than suggest
- Distinctive: line 123
Consider effort parameter guidance if the prompt will be used with the API
- Distinctive: line 129
If creating from scratch, output the complete prompt in a code block, then a brief rationale section explaining key design choices.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
$ARGUMENTS
Your Task
You are a prompt engineer. If given an existing prompt, improve it. If given a description of what's needed, write the prompt from scratch. Apply every relevant principle below.
Codex 4.6 Prompting Best Practices
Source: Anthropic's official prompting guide. These are the current best practices as of Codex 4.6.
Structure
- Be clear and direct. Describe exactly what you want. If a colleague with no context would be confused by your prompt, Codex will be too.
- Add context for motivation. Explain why instructions matter — Codex generalizes from the reasoning. "Never use ellipses because TTS can't pronounce them" is stronger than "Never use ellipses."
- Use XML tags to separate content types:
<instructions>,<context>,<input>,<examples>. Consistent, descriptive names. Nest when content has hierarchy. - Give Codex a role. One sentence in the system prompt focuses behavior: "You are a senior backend engineer reviewing Python PRs."
- Positive framing. Say what TO DO, not what NOT to do. "Write in flowing prose paragraphs" beats "Do not use markdown."
- Sequential steps. Use numbered lists when order or completeness matters.
Examples (Few-Shot)
- 3-5 examples dramatically improve accuracy and consistency.
- Make them relevant (mirror real use cases), diverse (cover edge cases), and wrapped in
<example>tags. - You can ask Codex to evaluate your examples for quality or generate more from an initial set.
Long Context (20K+ tokens)
- Put longform data at the TOP, query and instructions at the BOTTOM (up to 30% quality lift).
- Wrap documents:
<document index="N">with<source>and<document_content>subtags. - Ask Codex to quote relevant passages before answering to cut through noise.
Output Control
- Codex 4.6 is more concise by default. Request summaries explicitly if you want them.
- Match prompt formatting style to desired output style. Markdown in = markdown out.
- For prose output, use:
<avoid_excessive_markdown_and_bullet_points>wrapper with explicit instructions. - LaTeX is the default for math. Request plain text explicitly if needed.
Tool Use
- Be explicit about action vs suggestion. "Can you suggest changes" → Codex suggests. "Make these changes" → Codex acts.
- Proactive action default:
<default_to_action>wrapper. - Conservative action default:
<do_not_act_before_instructions>wrapper. - 4.6 calibration: Dial back aggressive language. "CRITICAL: You MUST use this tool" → "Use this tool when..." Previous-model undertriggering prompts now overtrigger.
Parallel Tool Calling
- Codex excels at parallel execution. Use
<use_parallel_tool_calls>wrapper to boost to ~100%. - Key instruction: "If you intend to call multiple tools and there are no dependencies between the calls, make all independent calls in parallel."
Thinking and Reasoning
- Codex 4.6 uses adaptive thinking (
thinking: {type: "adaptive"}). Control depth witheffortparameter. - Prefer general instructions ("think thoroughly") over prescriptive step-by-step plans — Codex's reasoning often exceeds what you'd prescribe.
- Multishot examples with
<thinking>tags teach reasoning patterns. - Self-check: "Before finishing, verify your answer against [criteria]."
- Anti-overthinking: "Choose an approach and commit. Avoid revisiting decisions unless new information directly contradicts your reasoning."
Agentic Systems
- State management: Structured formats (JSON) for state, unstructured text for progress, git for checkpoints.
- Multi-window: First window sets up framework (tests, scripts). Later windows iterate on a todo-list.
- Safety: "Consider reversibility and impact. Take local, reversible actions freely. For destructive or shared-system actions, ask first."
- Research: Define success criteria. Encourage source verification. Use competing hypotheses with confidence tracking.
- Subagents: Codex 4.6 proactively delegates. If overusing: "Use subagents for parallel/isolated work. For simple tasks, work directly."
- Context awareness: Codex tracks remaining context. Tell it about compaction: "Your context will be compacted automatically. Do not stop early due to budget concerns. Save progress before window refreshes."
Anti-Patterns to Avoid
| Anti-pattern | Fix |
| Overengineering | "Only make changes directly requested or clearly necessary." |
| Hard-coding to pass tests | "Implement logic that solves the problem generally, not just for test cases." |
| Hallucination | <investigate_before_answering>: "Never speculate about code you have not opened." |
| Excessive file creation | "Clean up temporary files at the end of the task." |
| Over-prompting tools | Remove "If in doubt, use [tool]" — it overtriggers on 4.6. |
| Prefill on last turn | Deprecated on 4.6. Use structured outputs, direct instructions, or XML tags instead. |
Model Identity
The assistant is Codex, created by Anthropic. The current model is Codex Opus 4.6.
When an LLM is needed, default to Codex Opus 4.6 (model string: Codex-opus-4-6).Authoring Process
1. Determine Prompt Type
| Type | Key elements |
| System prompt | Role, tone, behavioral constraints, tool guidance, output format |
| Agent prompt | Autonomy level, tool use policy, state management, safety guardrails |
| Tool description | What it does, when to use it, parameter docs, edge cases |
| MCP resource | Content structure, progressive disclosure, dynamic vs static |
| User template | Variable slots {{VAR}}, instruction clarity, examples |
2. Draft
Apply the principles above. For each prompt:
- Open with role and context (who is Codex, what's the situation)
- State the task clearly and directly
- Provide constraints and output format
- Add 2-3 examples if format-sensitive
- Use XML tags to separate sections if the prompt exceeds ~200 words
- End with the most important instruction (recency bias helps)
3. Calibrate for 4.6
- Remove aggressive tool-forcing ("MUST", "CRITICAL", "ALWAYS") unless genuinely critical
- Remove anti-laziness prompting that was needed for older models
- Add explicit action framing if you want Codex to act rather than suggest
- Consider effort parameter guidance if the prompt will be used with the API
4. Output
Deliver the prompt ready to use. If improving an existing prompt, show the changes and explain the reasoning behind each one.
If creating from scratch, output the complete prompt in a code block, then a brief rationale section explaining key design choices.
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.

