| name | codexit |
| description | Decision matrix for delegating tasks between Claude Code and Codex CLI. Guides when to handle tasks directly vs. delegate to Codex. |
Codex Delegation Skill
When to handle tasks yourself vs. delegate to Codex CLI.
Decision Matrix
๐ข DO IT YOURSELF (Claude Code)
Tasks where speed and iteration matter more than perfection:
- Single-file changes โ component, style, config edits
- Clear spec tasks โ "add a button that calls X API", "fix this type error"
- Test writing โ unit tests, E2E tests with existing patterns to follow
- One-liner fixes โ typo, import, type annotation
- Docs / comments โ README, JSDoc, inline comments
- Quick prototypes โ spike something out, will be reviewed anyway
- CI / config โ package.json, tsconfig, vite config, biome config
- Tasks under 5 files โ manageable scope, you can hold it in context
๐ด DELEGATE TO CODEX
Tasks where stability and deep understanding matter:
- Cross-cutting refactors (10+ files) โ store splits, API layer changes, module reorganization
- Architecture changes โ state management migration, routing overhaul, build system changes
- Critical path code โ payment, auth, data migration, export/import pipeline
- Complex debugging โ multi-layer call chain bugs, race conditions, memory leaks
- Large feature implementation (>20min estimate) โ new modules with multiple components + stores + tests
- Unfamiliar territory โ working in a subsystem you haven't touched before
- Overnight tasks โ anything you want to "fire and forget" and have working by morning
๐ก JUDGMENT CALL
Could go either way โ use context to decide:
- 5-10 file changes โ yourself if files are related, Codex if spread across subsystems
- Bug fixes โ yourself if you can spot it quickly, Codex if root cause is unclear
- PR review fixes โ yourself for simple ones, Codex for batch fixes across many files
How to Delegate to Codex
One-Shot Task
codex exec --full-auto "Your detailed task description.
Context:
- Branch: $(git branch --show-current)
- Relevant files: [list key files]
- Acceptance criteria: [what 'done' looks like]
Constraints:
- Do not modify files outside of [scope]
- Run 'bunx vitest [relevant test]' to verify
- Commit with conventional commit message"
Large Task (with plan first)
codex exec --full-auto "Plan and implement [feature].
Step 1: Read these files to understand the current architecture:
- [file1]
- [file2]
Step 2: Create an implementation plan (don't write code yet).
Print the plan and wait for it to look right before proceeding.
Step 3: Implement the plan. After each major change, run:
- 'bun run typecheck' for type safety
- 'bunx vitest [test file]' for tests
Step 4: Commit each logical unit separately with conventional commits.
Constraints:
- Keep Remotion on Zod 3.22.3 (no Zod 4)
- Max 800 lines per file; split if longer
- Don't break existing E2E tests: 'bun run test:e2e'"
Providing Context to Codex
Always include in your prompt:
- Current branch โ so it doesn't accidentally work on main
- Relevant files โ narrow the search space
- Acceptance criteria โ what "done" looks like
- Constraints โ what NOT to touch (Remotion versions, specific patterns)
- Verification commands โ how to test the changes
QCut-Specific Constraints (always include)
QCut Project Rules:
- Package manager: bun (not npm/yarn)
- Type check: bun run typecheck
- Unit tests: bunx vitest [path]
- E2E tests: bun run test:e2e
- Linting: bunx biome check --write .
- Remotion stays on Zod 3.22.3
- Max 800 lines per file
- Electron main process: electron/main/
- Renderer: src/
- Stores: src/stores/ (Zustand)
Anti-Patterns
โ Don't delegate trivial fixes โ spawning Codex for a one-line type fix wastes 2+ minutes of startup
โ Don't delegate without context โ "fix the bug" with no file paths = Codex wandering the codebase
โ Don't delegate and immediately do it yourself โ pick one, commit to it
โ Don't skip verification commands โ Codex should always run typecheck + tests before committing
โ Don't let Codex touch unrelated files โ always scope the task explicitly