A minimal Claude Code slash command that rewrites a Claude Code task into a tight, self-contained Codex prompt ready to paste.
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.
- 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
-
Clone or copy
codex.mdto 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
-
Restart Claude Code (or run
/helpto refresh commands).
/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.
```
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.
```codex.md ← the slash command (the only file that matters)
README.md ← this file
MIT