New advertisers: 50% off your first month with code FIRSTMONTHSee slots
softaworks avatar

command-codex-plan

Plan generator that drafts detailed implementation plans through Codex 5.2 at high reasoning.

GitHub stars
2.7K
View on GitHub

What it does

  • Adds one command, /codex-plan, that routes planning requests to Codex 5.2 with high reasoning effort
  • Covers producing a detailed implementation plan from a task description in a single invocation
  • Designed for developers who want a more thorough planning pass before writing code in Claude Code

Create a detailed implementation plan using Codex 5.2 with high reasoning.

Add marketplace

/plugin marketplace add softaworks/agent-toolkit

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install command-codex-plan@agent-toolkit

Run it inside Claude Code after adding the marketplace.

Files

Codex Plan Command

You are being asked to create a detailed implementation plan using a Codex subagent. Your job is to:

  1. Understand the user's planning request
  2. Ask clarifying questions using AskUser to improve plan quality
  3. Craft an excellent, detailed prompt for Codex
  4. Execute Codex to generate and save the plan

Always uses: gpt-5.2-codex with high reasoning

User Request

$ARGUMENTS

Step 1: Analyze the Request

Look at what the user wants to plan. Identify:

  • What is the core goal?
  • What technology/domain is involved?
  • What aspects are ambiguous or underspecified?
  • What decisions would significantly impact the plan?

Step 2: Ask Clarifying Questions

Use AskUser to ask 3-6 targeted clarifying questions before generating the plan.

Good clarifying questions:

  • Narrow down scope and requirements
  • Clarify technology choices
  • Understand constraints (time, budget, team size)
  • Identify must-haves vs nice-to-haves
  • Uncover integration requirements
  • Determine security/compliance needs

Example Question Patterns

For "implement auth":

  • What authentication methods do you need? (email/password, OAuth providers like Google/GitHub, SSO, magic links)
  • Do you need role-based access control (RBAC) or just authenticated/unauthenticated?
  • What's your backend stack? (Node/Express, Python/Django, etc.)
  • Where will you store user credentials/sessions? (Database, Redis, JWT stateless)
  • Do you need features like: password reset, email verification, 2FA?
  • Any compliance requirements? (SOC2, GDPR, HIPAA)

For "build an API":

  • What resources/entities does this API need to manage?
  • REST or GraphQL?
  • What authentication will the API use?
  • Expected scale/traffic?
  • Do you need rate limiting, caching, versioning?

For "migrate to microservices":

  • Which parts of the monolith are you migrating first?
  • What's your deployment target? (K8s, ECS, etc.)
  • How will services communicate? (REST, gRPC, message queues)
  • What's your timeline and team capacity?

For "add testing":

  • What testing levels do you need? (unit, integration, e2e)
  • What's your current test coverage?
  • What frameworks do you prefer or already use?
  • What's the most critical functionality to test first?

Step 3: Gather Context

After getting answers, also gather relevant context:

  • Read key files in the codebase if applicable
  • Check existing architecture/patterns
  • Note any existing plans or documentation

Step 4: Craft the Codex Prompt

Create a detailed prompt that includes:

  1. Clear objective - What plan needs to be created
  2. All requirements - Everything learned from clarifying questions
  3. Constraints - Technology choices, timeline, team size
  4. Context - Relevant codebase info, existing patterns
  5. File references - List of important files/docs the Codex should read for context
  6. Plan structure - What sections the plan should include
  7. Output instructions - Write to codex-plan.md in current directory

Including File References (IMPORTANT)

Always include a section in the prompt telling Codex which files to read first for context:

## Files to Read for Context

Before creating the plan, read these files to understand the current codebase:

**Architecture & Config:**
- `README.md` - Project overview
- `package.json` / `pyproject.toml` - Dependencies and scripts
- `.env.example` - Environment variables needed

**Existing Code Patterns:**
- `src/lib/db.ts` - How database connections are handled
- `src/middleware/auth.ts` - Existing auth patterns (if any)
- `src/types/index.ts` - Type definitions

**Documentation:**
- `docs/architecture.md` - System architecture
- `docs/api.md` - API documentation

Read these files FIRST to understand existing patterns before creating the plan.

Adapt this list based on what you discovered in Step 3 (Gather Context). Include:

  • Config files relevant to the task
  • Existing code that will be modified or extended
  • Documentation about architecture/patterns
  • Type definitions or schemas
  • Test files showing testing patterns used

Critical instruction to include: Tell Codex to NOT ask any further clarifying questions - it has all the information it needs and should just write the plan and save the file.

Step 5: Save Prompt for Manual Execution

Save the crafted prompt to prompt_to_codex.md for manual execution.

The user will execute Codex manually using:

# --full-auto: Executa automaticamente sem interação humana
# --skip-git-repo-check: Pula verificação se está em um repositório git
# -c model=gpt-5.2-codex: Usa o modelo GPT-5.2 Codex (mais avançado)
# -c model_reasoning_effort=high: Ativa raciocínio de alto nível (deep thinking)
# --output-last-message: Salva a última mensagem do Codex em arquivo
codex exec --full-auto --skip-git-repo-check \
  -c model=gpt-5.2-codex \
  -c model_reasoning_effort=high \
  --output-last-message /tmp/codex-plan-result.txt \
  "$(cat prompt_to_codex.md)"

Or read the prompt and execute it:

cat prompt_to_codex.md  # Review the prompt first

Example Full Flow

User: /codex-plan help me implement auth into my webapp

You ask (using AskUser):

I'd like to create a detailed auth implementation plan for you. A few questions first:

1. What authentication methods do you need?
   - Email/password
   - OAuth (Google, GitHub, etc.)
   - Magic links
   - SSO/SAML

2. Do you need role-based access control (admin, user, etc.) or just authenticated vs not?

3. What's your backend stack? (e.g., Node/Express, Python/FastAPI, Next.js API routes)

4. Where will you store sessions? (Database, Redis, JWT stateless)

5. Do you need any of these features?
   - Password reset
   - Email verification
   - Two-factor authentication (2FA)
   - Remember me / persistent sessions

6. Any compliance requirements? (SOC2, GDPR, HIPAA)

User answers: "Email/password and Google OAuth. Using Next.js with Prisma and Postgres. Need basic roles (admin/user). Yes to password reset and email verification. No 2FA for now. No special compliance."

You craft prompt for Codex:

Create a detailed implementation plan for adding authentication to a Next.js web application.

## Requirements
- Authentication methods: Email/password + Google OAuth
- Framework: Next.js (App Router)
- Database: PostgreSQL with Prisma ORM
- Role-based access: Admin and User roles
- Features needed:
  - User registration and login
  - Password reset flow
  - Email verification
  - Google OAuth integration
  - Session management
- NOT needed: 2FA, SSO, special compliance

## Plan Structure

Use this template structure:

# Plan: [Task Name]

**Generated**: [Date]
**Estimated Complexity**: [Low/Medium/High]

## Overview
[Brief summary of what needs to be done and the general approach, including recommended libraries/tools]

## Prerequisites
- [Dependencies or requirements that must be met first]
- [Tools, libraries, or access needed]

## Phase 1: [Phase Name]
**Goal**: [What this phase accomplishes]

### Task 1.1: [Task Name]
- **Location**: [File paths or components involved]
- **Description**: [What needs to be done]
- **Dependencies**: [Task IDs this depends on, e.g., "None" or "1.2, 2.1"]
- **Complexity**: [1-10]
- **Test-First Approach**:
  - [Test to write before implementation]
  - [What the test should verify]
- **Acceptance Criteria**:
  - [Specific, testable criteria]

### Task 1.2: [Task Name]
[Same structure...]

## Phase 2: [Phase Name]
[...]

## Testing Strategy
- **Unit Tests**: [What to unit test, frameworks to use]
- **Integration Tests**: [API/service integration tests]
- **E2E Tests**: [Critical user flows to test end-to-end]
- **Test Coverage Goals**: [Target coverage percentage]

## Dependency Graph
[Show which tasks can run in parallel vs which must be sequential]
- Tasks with no dependencies: [list - these can start immediately]
- Task dependency chains: [show critical path]

## Potential Risks
- [Things that could go wrong]
- [Mitigation strategies]

## Rollback Plan
- [How to undo changes if needed]

### Task Guidelines
Each task must:
- Be specific and actionable (not vague)
- Have clear inputs and outputs
- Be independently testable
- Include file paths and specific code locations
- Include dependencies so parallel execution is possible
- Include complexity score (1-10)

Break large tasks into smaller ones:
- Bad: "Implement Google OAuth"
- Good:
  - "Add Google OAuth config to environment variables"
  - "Install and configure passport-google-oauth20 package"
  - "Create OAuth callback route handler in src/routes/auth.ts"
  - "Add Google sign-in button to login UI"
  - "Write integration tests for OAuth flow"

## Instructions
- Write the complete plan to a file called `codex-plan.md` in the current directory
- Do NOT ask any clarifying questions - you have all the information needed
- Be specific and actionable - include code snippets where helpful
- Follow test-driven development: specify what tests to write BEFORE implementation for each task
- Identify task dependencies so parallel work is possible
- Just write the plan and save the file

Begin immediately.

Save the prompt to prompt_to_codex.md for manual execution.

Important Notes

  • Always ask clarifying questions first - Don't skip this step
  • Use AskUser tool - This is interactive planning
  • Save prompt to prompt_to_codex.md - User will execute manually
  • Tell Codex not to ask questions - It should just execute
  • Expected output file: codex-plan.md in current working directory (created by Codex)
  • Model to use: gpt-5.2-codex with high reasoning effort

Your Task Flow

  1. Analyze the user's planning request above
  2. Ask clarifying questions using AskUser
  3. Gather context from codebase if needed
  4. Craft a detailed prompt for Codex
  5. Save the prompt to prompt_to_codex.md (do NOT execute)
  6. Show the user they can now execute it manually with:
    codex exec --full-auto --skip-git-repo-check \
      -c model=gpt-5.2-codex \
      -c model_reasoning_effort=high \
      --output-last-message /tmp/codex-plan-result.txt \
      "$(cat prompt_to_codex.md)"
    
  7. STOP and wait - Ask the user to send you the final plan (codex-plan.md) when Codex finishes. Do NOT do anything else until the user sends the plan.

Step 7: Wait for the Plan

After showing the execution command, you MUST:

  1. Ask the user to send the plan - Say something like:

    "Quando o Codex terminar, me envie o conteúdo do arquivo codex-plan.md para eu revisar."

  2. Do NOT proceed - Do not take any other action

  3. Do NOT assume - Do not guess what the plan contains

  4. Just wait - The user will paste or send the plan when ready

IMPORTANT: Your job is DONE after step 6. Just wait for the user to send the generated plan.

From the softaworks/agent-toolkit README

Softaworks Agent Skills

Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.

Skills follow the Agent Skills format.


🧭 Quick Navigation

🚀 Installation • 📚 Available Skills • 🤖 Agents & Commands • 📖 Skill Structure • 🤝 Contributing • 📄 License • 🔗 Links


🚀 Installation

Quick Install (Recommended)

npx skills add softaworks/agent-toolkit

This method works with multiple AI coding agents (Claude Code, Codex, Cursor, AdaL, etc.)

Register as Plugin Marketplace

Run the following commands in Claude Code:

/plugin marketplace add softaworks/agent-toolkit
/plugin

Install Plugins

Option 1: Via Browse UI

  1. Switch to Marketplaces tab (use arrow keys or Tab)
  2. Select agent-toolkit, press Enter
  3. Browse and select the plugin(s) you want to install
  4. Select Install now

Option 2: Direct Install

# Install specific skill
/plugin install codex@agent-toolkit
/plugin install humanizer@agent-toolkit

# Install specific agent
/plugin install agent-codebase-pattern-finder@agent-toolkit

# Install specific command
/plugin install command-codex-plan@agent-toolkit

Option 3: Ask the Agent

Simply tell Claude Code:

Please install Skills from github.com/softaworks/agent-toolkit

Available Plugins

Each skill, agent, and command is an individual plugin that can be installed separately:

  • Skills → See Available Skills for the full list
  • Agents → See Agents (install as agent-<name>@agent-toolkit)
  • Commands → See Slash Commands (install as command-<name>@agent-toolkit)

Update Plugins

To update plugins to the latest version:

  1. Run /plugin in Claude Code
  2. Switch to Marketplaces tab
  3. Select agent-toolkit
  4. Choose Update marketplace

You can also Enable auto-update to get the latest versions automatically.

Manual Installation

For Claude Code (Manual) — Skills only

cp -r skills/<skill-name> ~/.claude/skills/

For claude.ai — Skills only

Add skills to project knowledge or paste SKILL.md contents into the conversation.


📚 Available Skills

CategorySkillDescription
🤖 AI ToolscodexAdvanced code analysis with GPT-5.2
🤖 AI ToolsgeminiLarge-scale review (200k+ context)
🤖 AI ToolsperplexityWeb search & research
🔮 Metaagent-md-refactorRefactor bloated agent instruction files
🔮 Metacommand-creatorCreate Claude Code slash commands
🔮 Metaplugin-forgeBuild Claude Code plugins & manifests
🔮 Metaskill-judgeEvaluate skill design quality
📝 Documentationbackend-to-frontend-handoff-docsAPI handoff docs for frontend
📝 Documentationc4-architectureC4 architecture diagrams with Mermaid
📝 Documentationcrafting-effective-readmesWrite effective README files
📝 Documentationdraw-ioCreate & edit draw.io diagrams
📝 DocumentationexcalidrawWork with Excalidraw diagrams
📝 Documentationfrontend-to-backend-requirementsDocument API requirements
📝 Documentationmarp-slideProfessional presentation slides
📝 Documentationmermaid-diagramsSoftware diagrams with Mermaid
📝 Documentationwriting-clearly-and-conciselyClear, professional writing
🎨 Design & Frontenddesign-system-starterCreate design systems
🎨 Design & FrontendmuiMaterial-UI v7 patterns
🎨 Design & Frontendopenapi-to-typescriptConvert OpenAPI to TypeScript
🎨 Design & Frontendreact-devType-safe React 18-19 with TypeScript
🎨 Design & Frontendreact-useeffectReact useEffect best practices
🛠️ Developmentdatabase-schema-designerDesign robust database schemas
🛠️ Developmentdependency-updaterSmart dependency management
🛠️ Developmentnaming-analyzerSuggest better variable/function names
🛠️ Developmentlesson-learnedExtract SE lessons from recent code changes
🛠️ Developmentreducing-entropyMinimize codebase size
🛠️ Developmentsession-handoffSeamless AI session transfers
🎯 Planninggame-changing-featuresFind 10x product opportunities
🎯 PlanninggepettoDetailed implementation planning
🎯 Planningrequirements-clarityClarify requirements before coding
🎯 Planningship-learn-nextTurn learning into actionable reps
👔 Professionaldaily-meeting-updateInteractive daily standup generator
👔 Professionaldifficult-workplace-conversationsNavigate difficult conversations
👔 Professionalfeedback-masteryDeliver constructive feedback
👔 Professionalprofessional-communicationTechnical communication guide
🧪 Testingqa-test-plannerComprehensive QA test planning
📦 Gitcommit-workHigh-quality git commits
🔧 Utilitiesdatadog-cliDebug with Datadog logs & metrics
🔧 Utilitiesdomain-name-brainstormerGenerate & check domain names
🔧 UtilitieshumanizerRemove AI writing patterns
🔧 Utilitiesmeme-factoryGenerate memes with API
🔧 UtilitiesjiraNatural language Jira interaction
🔧 Utilitiesweb-to-markdownConvert webpages to Markdown

🤖 Agents & Commands

Requires Claude Code CLI — These agents and commands are exclusive to Claude Code users.

For full access, add the marketplace and install plugins:

/plugin marketplace add softaworks/agent-toolkit
/plugin install codex@agent-toolkit

Agents

Specialized sub-agents that Claude Code can delegate tasks to:

AgentDescription
ascii-ui-mockup-generatorVisualize UI concepts through ASCII mockups
codebase-pattern-finderFind similar implementations and patterns
communication-excellence-coachEmail refinement, tone calibration, roleplay
general-purposeDefault agent for complex multi-step tasks
mermaid-diagram-specialistCreate flowcharts, sequence diagrams, ERDs
ui-ux-designerResearch-backed UI/UX design feedback

Slash Commands

Reusable workflows invoked with /command-name:

CommandDescription
/codex-planCreate implementation plans using Codex 5.2
/compose-emailDraft professional emails
/explain-changes-mental-modelBuild mental model of code changes
/explain-pr-changesGenerate PR summaries
/sync-branchSync feature branch with main
/sync-skills-readmeUpdate README skills table
/viral-tweetOptimize tweet ideas for X engagement

📖 Skill Structure

Each skill contains:

  • SKILL.md - Detailed instructions for the agent (with YAML frontmatter)
  • README.md - User-friendly documentation with examples
  • scripts/ - Helper scripts for automation (optional)
  • references/ - Supporting documentation (optional)

🤝 Contributing

Contributions are welcome! When adding new skills:

  1. Follow the Agent Skills format
  2. Include both SKILL.md (for agents) and README.md (for users)
  3. Add YAML frontmatter to SKILL.md with name: and description: fields
  4. Update this README.md with a link to your skill

📄 License

MIT


🔗 Links

Details

Marketplace
softaworks/agent-toolkit
Source
dist/plugins/command-codex-plan
Category
Commands
Keywords
commands, planning, codex, implementation
Listed since
Apr 6, 2026

More from softaworks/agent-toolkit

All 56

Similar to command-codex-plan

More Agent Workflow & Planning