codex-analysis
Codex Analysis
Run the Codex CLI to get deep analysis using gpt-5.2-codex with high reasoning effort.
IMPORTANT: This skill MUST spawn subagents for parallel exploration. Always include subagent instructions in the prompt.
When to Use
- User asks for "Codex analysis" or "Codex help"
- User wants a second opinion on code or architecture
- User needs deep reasoning on a complex problem
Running the Analysis (MUST spawn subagents)
Execute this command, replacing {PROMPT} with the user's question or analysis request.
Always append subagent instructions to the prompt:
codex exec -m gpt-5.2-codex \
--config model_reasoning_effort="high" \
--sandbox read-only \
--skip-git-repo-check \
"{PROMPT} Spawn subagents to explore different aspects in parallel."
Command Parameters
| Flag | Purpose |
|---|---|
-m gpt-5.2-codex |
Use gpt-5.2-codex model (spawns subagents for parallel work) |
--config model_reasoning_effort="high" |
Maximum reasoning depth |
--sandbox read-only |
Safe read-only sandbox |
--skip-git-repo-check |
Skip git repository validation |
Subagent Requirements
MANDATORY: Every prompt MUST include instructions to spawn subagents. This enables:
- Parallel exploration of different code areas
- Concurrent analysis of multiple concerns (security, performance, architecture)
- Faster and more thorough analysis
Template suffix to append to every prompt:
"Spawn subagents to explore different aspects in parallel."
After Running
- Summarize the Codex analysis output
- Highlight key suggestions and findings
- Ask if the user wants to:
- Implement any suggested changes
- Get more details on specific points
- Run additional analysis
Example Usage
User asks: "Use Codex to analyze the authentication flow"
Run (note: subagent spawning is REQUIRED):
codex exec -m gpt-5.2-codex \
--config model_reasoning_effort="high" \
--sandbox read-only \
--skip-git-repo-check \
"Analyze the authentication flow in this codebase. Spawn subagents to explore security issues, improvement opportunities, and best practices in parallel."
User asks: "Get Codex help with performance issues"
Run:
codex exec -m gpt-5.2-codex \
--config model_reasoning_effort="high" \
--sandbox read-only \
--skip-git-repo-check \
"Identify performance bottlenecks in this codebase. Spawn subagents to analyze database queries, API endpoints, and frontend rendering in parallel."
Then summarize findings and offer follow-up actions.
More from regenrek/agent-skills
hard-cut
Enforce a hard-cut cleanup policy: keep one canonical implementation and delete compatibility, migration, fallback, adapter, coercion, and dual-shape code. Use for pre-release or internal-draft refactors where the goal is one final shape, especially when changing schemas, contracts, persisted state, routing, configuration, feature flags, enum/value sets, or architecture.
14root-cause-finder
Performs root-cause-first debugging and review by tracing expected behavior to the first unintended side effect before changing contracts, parsing, or types. Use when debugging protocol errors, deserialization failures, null payloads, missing fields, restore or hydration issues, state-ownership bugs, unexpected requests, background mutations, or reviewing junior-created code where the visible failure may be downstream noise.
7consolidate-test-suites
Decide exactly where bug-fix test coverage belongs. Use before adding, moving, or deleting tests after a bug fix or architectural change. Select one owning layer, reuse existing canonical suites, block redundant or weakly placed tests, and remove weaker duplicates.
7git-safe-workflow
Safely inspect, stage, commit, and (only if asked) push changes made by an AI agent. Use for commit/push requests, end-of-task checkpoints, merge conflict resolution, worktree safety checks, or deciding whether to use git commit --amend.
4shellck
Run shellcheck on shell scripts after editing scripts or when debugging shell errors. Use for linting scripts in a repo (especially scripts/), catching issues like set -u with unset vars, bad subshell usage, or quoting mistakes.
3pr-commiter
Agentic PR committer with deterministic commits, enforced branch/PR workflow, and explicit paths (no git add .).
3