codex-explain

codex-explain is a skill for Claude Code from sd0xdev/sd0x-harness. It costs 56 tokens per session (521 once invoked), scanned A, original, MIT.

A code explanation workflow that reads a target file and describes its purpose, execution flow, and important concepts at a selected level of detail.

In plain words
What is it for?
Use it for code walkthroughs, understanding complex logic, tracing data flow, and onboarding to an unfamiliar codebase.
Why use it?
It makes unfamiliar code easier to understand without requiring you to reconstruct the whole design yourself.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: runs codex exec; mentions Codex.

Part of the sd0x-dev-flow plugin — 101 skills, 16 agents, 5 hooks shipped together

Good fit Use it for code walkthroughs, understanding complex logic, tracing data flow, and onboarding to an unfamiliar codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sd0xdev/sd0x-harness/codex-explain
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sd0xdev/sd0x-harness --skill codex-explain
Clone the repo
git clone --depth 1 https://github.com/sd0xdev/sd0x-harness

Made for: Claude Code.

Or install sd0x-dev-flow, the plugin that ships this one along with the rest of its 101 skills, 16 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-explain

README.md
[![agentmods](https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/codex-explain/github.svg)](https://agentmods.dev/skills/sd0xdev/sd0x-harness/codex-explain)
Your own site
<a href="https://agentmods.dev/skills/sd0xdev/sd0x-harness/codex-explain"><img src="https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/codex-explain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-explain

Your own site · 80×15
<a href="https://agentmods.dev/skills/sd0xdev/sd0x-harness/codex-explain"><img src="https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/codex-explain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Data Exfiltration · line 22
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.00521
Opus 5.5 $0.00022 $0.00208
Sonnet 5.5 $0.00011 $0.00104
Haiku 4.5 $0.00006 $0.00052

Measured 1mo ago against content hash 029ccb648242, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-explain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codex-explain/SKILL.md · 74 lines

What it actually says

Codex Explain Skill

Trigger

  • Keywords: explain code, what does this do, how does this work, code walkthrough

When NOT to Use

  • Code review (use codex-code-review)
  • Bug investigation (use bug-fix or issue-analyze)
  • Architecture overview (use code-explore)

Workflow

Read target → [Collect context] → Codex explain → Output explanation

Step 1: Read Target File

Read file content. If --lines specified, extract only that range.

Step 2: Codex Explanation

Dispatch per @skills/codex-code-review/references/codex-transport.md § Start with the explanation prompt. See references/codex-prompt-explain.md.

Depth Levels

Level Description
brief One-sentence summary
normal Functional overview + execution flow + key concepts (default)
deep + Design patterns + complexity + issues + dependencies

Output

## Code Explanation: <target>
- **Depth**: brief / normal / deep
- **Summary**: <functional overview>
- **Execution flow**: <key paths>
- **Key concepts**: <patterns, abstractions>

Verification

  • Codex independently researched project context (imports, callers)
  • Explanation matches requested depth level
  • Key concepts are identified and explained

References

  • Explanation prompt: references/codex-prompt-explain.md

Examples

Input: /codex-explain src/service/order/order.service.ts
Action: Read file → Codex explain (normal) → Functional summary + detailed explanation

Input: /codex-explain src/service/xxx.ts --depth deep
Action: Read file → Codex explain (deep) → Patterns + complexity + issues

Input: /codex-explain src/xxx.ts --lines 50-100
Action: Read lines 50-100 → Codex explain → Focused explanation
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -1 lines 029ccb648242
  2. 1mo ago First seen · 75 lines · 56 tokens per session scan A e3a7099f3193

Subscribe to this mod's changes

codex-explain is a skill published in the GitHub repository sd0xdev/sd0x-harness (194 stars, last pushed 11d ago), licensed MIT. It adds 56 tokens to every session and 521 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

guidance

A guide for answering questions about installing and configuring QwenPaw, a software tool with local documentation. It says to check those documents first and use official website information only when needed.

agentscope-ai/QwenPaw · 44 tokens

edu-math-tutorial

A Chinese-language guide for turning a maths problem into a step-by-step teaching video. It explains how to break down the solution, write narration, format equations, and structure scenes.

agentscope-ai/QwenPaw · 146 tokens

building

Use when writing production code test-first: the RED-GREEN-REFACTOR cycle, false-RED detection, vertical slicing, scope escalation, test process discipline, and code generation patterns.

romiluz13/cc10x · 43 tokens

diff-driven-docs

Use when a BUILD phase completes, a commit is staged, or a PR is about to be created, and the diff has not yet been reflected in documentation. Also use when the user says "update docs", "sync docs", "document this", or asks whether documentation is up to date.

romiluz13/cc10x · 64 tokens

exploration

Two-mode exploration skill: (1) design dialogue — turn rough ideas into validated designs through collaborative interview before planning; (2) spike — throwaway code answering ONE design question, deleted or absorbed, never shipped. Router invokes mode via dispatch context.

romiluz13/cc10x · 56 tokens

memory-and-handoff

Two-mode skill: (1) session memory — load/persist durable workflow state under .cc10x/ (activeContext, patterns, progress) so context survives compaction; (2) handoff package — portable, secrets-redacted export for a coworker, different tool, or fresh non-cc10x session.

romiluz13/cc10x · 70 tokens