adr-new
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project `.codex/config.toml`: `dev` / `prod` / `custom` profiles, idempotent via markers, preserves unmanaged config below the block.
$ npx -y skills add Filip-Podstavec/claude-leverage --skill codex-sandbox --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/codex-sandboxContext preview
The summary Claude sees to decide when to auto-load this skill.
USE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project `.codex/config.toml`: `dev` / `prod` / `custom` profiles, idempotent via markers, preserves unmanaged config below the block.
name: codex-sandbox description: > USE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project `.codex/config.toml`: `dev` / `prod` / `custom` profiles, idempotent via markers, preserves unmanaged config below the block. Codex-only artifact. allowed-tools: - Read - Write - Edit - Bash(ls:*) - Bash(test:*) - Bash(git rev-parse:*) argument-hint: "[target-dir] [--profile dev|prod|custom] [--noninteractive]"
Codex CLI runs each agent inside a sandbox with a configurable permission model (filesystem, network, dangerous commands). The defaults are conservative; per-project overrides live in `.codex/config.toml` at the project root.
This skill asks 3–5 questions, recommends a profile, and writes the file. Re-running on an already-configured project detects the managed block (marker comments) and offers update-in-place.
The skill writes only the policy-relevant sections (and leaves room for the user to add unrelated config below):
# <!-- claude-leverage:codex-sandbox START --> # Managed by /codex-sandbox. Edit between markers and re-run the skill # to update; do not delete the markers. [project_doc] max_bytes = 32768 # explicit; matches Codex default [sandbox] mode = "<workspace-write | read-only | full>" [approval] mode = "<on-request | on-failure | never>" # <!-- claude-leverage:codex-sandbox END -->
| Profile | Sandbox | Approval | Use for | |---|---|---|---| | `dev` | `workspace-write` | `on-request` | Local development. Agent can write inside the project but asks before risky actions (network, package install, shell commands outside cwd). | | `prod` | `read-only` | `never` | Production / CI runs. Agent can only read; any write requires running outside the sandbox. | | `custom` | (asks) | (asks) | Anything else; skill walks you through each field. |
> There is deliberately no `staging` profile: Codex config exposes no > audit-log field, so a "staging" tier would differ from `dev` / `prod` in > name only. For CI, use `dev` (keeps approvals) or `prod` (read-only > sandbox); pipe Codex's stderr to your log aggregator if you need an audit > trail.
Field names below are what Codex currently documents. If the spec evolves, this skill will need a refresh — `/stack-check` does not yet verify Codex spec freshness (v1.1 candidate).
1. **Resolve target dir.** Default cwd. If `$ARGUMENTS` has a path, use that. Verify it's a git repo or ask "this isn't a git repo; proceed anyway?".
2. **Detect existing config.** If `.codex/config.toml` exists:
show them to the user, offer to keep, update, or pick a new profile.
exists; prepend a managed block above it, replace, or skip?".
3. **Choose profile** (unless `--profile <name>`):
Pick a profile:
1. dev — workspace-write, on-request approvals (recommended for local)
2. prod — read-only sandbox, no approvals (CI / production)
3. custom — answer each question individuallyUnless `--noninteractive`, wait for a choice. With `--noninteractive` and no `--profile`, default to `dev`.
4. **For `custom`**, walk the user through:
(warns this exceeds Codex's silent-drop cap if user picks higher).
network-allowlist are not yet documented stably across Codex versions; this skill emits only the mode fields for now. Verify against the live spec before adding more.
5. **Write the managed block.**
block as the only content.
via `Edit` (markers stay byte-identical).
above existing content.
6. **Report.** Print the resolved config + a one-line summary. Suggest the user runs `codex --version` or starts a fresh Codex session to pick up the change.
block contract is "I own what's between my markers; everything else is yours."
acknowledgement.** If the user picks `full`, surface a one-line reminder: "full sandbox lets the agent do anything in the filesystem; only use for trusted scripts."
version adds new fields, this skill doesn't auto-include them; re-run after a plugin update.
`/init-repo` — protect against random-dir foot-guns.
behavior (rare, but documented in changelogs).
is a user-level decision; this skill only writes the per-project `.codex/config.toml`. For global, edit by hand.
owned by `scripts/install-codex.sh` (and its uninstall path).
Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.Building blocks for Claude Code: subagents, slash commands, hooks, and workflow patterns. Copy what you need. A working developer's stack for Claude Code.
Repo: Filip-Podstavec/claude-leverage
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN setting up a repo for AI-first work, after a major directory restructure, or when an agent needs structured answers like "which modules are stable?" /…
USE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits.…
USE WHEN the user explicitly asks to verify that this repo's DECLARED build/test/lint commands actually run ("does the quickstart work?", "validate the…
USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for…
USE WHEN setting up a repo for AI-first work, when an agent hallucinates domain term meaning, or when user asks to bootstrap / extend the repo's domain…