Skip to content

majiayu000/spellbook / skills/codex-agent

codex-agent

Verified

Use when you want a second-opinion review via Codex CLI, cross-verification after another agent implements changes, debugging help, or alternative implementation proposals. Requires Codex CLI to be installed and authenticated.

FileKindSize
README.mdmarkdown4.9 KB
SKILL.mdskill md7.5 KB
advanced.mdmarkdown3.8 KB
examples.mdmarkdown4.3 KB
sandbox-modes.mdmarkdown2.0 KB
scripts/check-codex.shexecutablescript1.0 KB
scripts/codex-wrapper.shexecutablescript3.5 KB

sandbox-modes.md

View on GitHub
# Sandbox Modes

Codex CLI provides sandbox security levels to control file system and network access.

## Mode Comparison

| Mode | Flag | File Writes | Use Case |
|------|------|-------------|----------|
| **Read-Only** | `-s read-only` | None | Code analysis, review, Q&A |
| **Workspace Write** | `-s workspace-write` | Workspace + /tmp | Safe file modifications |
| **Full Access** | `-s danger-full-access` | Unrestricted | Last resort after explicit approval |

## Read-Only Mode (Default)

```bash
codex exec -s read-only -C /project "Analyze code quality"
```

- Cannot create, modify, or delete files
- Safe for analysis and review tasks
- Recommended for most read operations

## Workspace Write Mode

```bash
codex exec -s workspace-write -C /project "Refactor the auth module"
```

- Write access limited to:
  - Current workspace directory
  - `/tmp` directory
- Cannot modify files outside workspace
- Recommended for safe code modifications

## Full Access Mode

```bash
codex exec -s danger-full-access -C /project "Update system config"
```

**Use with extreme caution:**
- Unrestricted file system access
- Can modify any file on the system
- Only use in isolated/sandboxed environments (VMs, containers)
- Requires explicit user approval for the exact command and target boundary

## Dangerous Bypass Flags

`codex exec` exposes flags such as `--dangerously-bypass-approvals-and-sandbox`
and `--dangerously-bypass-hook-trust`. Do not use them from this skill unless
the user explicitly approves the exact command and the environment is already
externally sandboxed.

## Best Practices

1. **Start with read-only** - Default to analysis mode
2. **Use workspace-write for edits** - Contains changes to project
3. **Avoid full-access** - Only in truly isolated environments
4. **Review before commit** - Always verify Codex's changes
5. **Use `--add-dir`** - Grant specific directory access instead of full-access

```bash
# Better than danger-full-access:
codex exec --add-dir /path/to/other/dir -C /project "task"
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall