Skip to content

guycoful/codex-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

/codex - Claude Code → Codex Prompt Translator

A minimal Claude Code slash command that rewrites a Claude Code task into a tight, self-contained Codex prompt ready to paste.

What it does

When a task gets stuck or messy in Claude Code, hand it off to Codex. This command takes whatever you describe after /codex and outputs a markdown code block containing a clean prompt with all the context Codex needs to act without asking questions.

The output is a single code block, English, specific, no explanation — just the prompt to copy.

Why

  • Codex performs better with context-rich, declarative prompts
  • Switching tools mid-task usually loses context; this preserves it
  • Forces the requester to compress the task into a self-contained brief

Install

  1. Clone or copy codex.md to your Claude Code commands directory:

    # macOS / Linux
    curl -L https://raw.githubusercontent.com/guycoful/codex-skill/main/codex.md \
      -o ~/.claude/commands/codex.md
    
    # Windows (PowerShell)
    Invoke-WebRequest -Uri https://raw.githubusercontent.com/guycoful/codex-skill/main/codex.md `
      -OutFile $env:USERPROFILE\.claude\commands\codex.md
  2. Restart Claude Code (or run /help to refresh commands).

Usage

/codex Fix the failing OAuth refresh in src/auth/refresh.ts. Token rotation is dropping the new refresh_token from the response.

Claude returns a ready-to-paste prompt for Codex with file paths, expected behavior, and constraints already baked in.

Example output

```
Project: Node.js OAuth client at src/auth/.
Failing flow: refresh.ts handles refresh_token rotation. The provider returns a fresh
refresh_token on each refresh, but our code stores only access_token. Result: every
second refresh fails because we're sending a stale refresh_token.

Fix:
1. Update RefreshResponse type to include the optional new refresh_token field.
2. In refresh(): if response includes refresh_token, persist it via tokenStore.save().
3. Add a unit test in refresh.test.ts that verifies the new refresh_token is saved
   when the provider rotates it.

Constraints: keep tokenStore interface unchanged. Do not introduce new dependencies.
Run `pnpm test` after the change.
```

File structure

codex.md   ← the slash command (the only file that matters)
README.md  ← this file

License

MIT

About

Slash command for Claude Code - translates a stuck task into a tight, self-contained Codex prompt ready to paste. Usage: /codex <task>

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors