# feat(review): codex on-disk skill discovery in $name form

`ed5f528`→[main](/content/gh/entireio/cli/commits/main/index.html)

Codex's DiscoverReviewSkills was a Phase-1 stub returning nil, while spawn-time validation (VerifyConfiguredSkillsInstalled) rejects any configured skill that is neither a curated builtin nor discovered — so every on-disk codex skill configured in $name form hard-failed with 'configured review skill(s) not installed'. This repo's own saved $code-reviewer config hit it on every run.

Ports the discovery slice from closed #1370 (applies verbatim — the touched files did not diverge and no open PR overlaps them):

- skilldiscovery gains the generic SKILL.md scanners (skills dir, versioned plugin cache with semver pick, frontmatter parse, dedupe) parameterized by invocation form (SlashForm/DollarForm).
- claude-code's discovery delegates to the shared scanners; its own discovery tests pass unchanged, pinning identical behavior.
- codex discovers ~/.codex/{skills,plugins/cache,superpowers} in $name / $plugin:name form — the literal token codex's skill system resolves.
- codex's curated '/review' builtin is removed: the interactive TUI slash command never fires through codex exec, so validating it was a lie. Configs still naming '/review' for codex now fail validation with the reconfigure hint (honest — that path never invoked a real skill); on-disk skills like $code-reviewer validate and run.

Verified against the real ~/.codex on this machine: $code-reviewer, $review-swarm, $superpowers: * et al discovered correctly.

## Sessions

01KWYW70EFC8JERS2Q1FRNFXKYView transcript

## Changes

8

- cmd/entire/cli
  - agent
    - claudecode
      - Mdiscovery.go+24/-260
    - codex
      - MAGENT.md+9/-1
      - Mdiscovery.go+43/-6
      - Mdiscovery_test.go+97/-7
    - skilldiscovery
      - Mregistry.go+14/-5
      - Mregistry_test.go+4/-2
      - Ascan.go+257

## Gaps & Limitations

- **Hooks require feature flag:** The `hooks` feature is `default_enabled: false` (stage: UnderDevelopment). It must be enabled via `--enable hooks` CLI flag, or `features.hooks = true` in `config.toml`, or `-c features.hooks=true`. Without this, hooks.json is ignored entirely.
- **Hooks require feature flag:** The `codex_hooks` feature is `default_enabled: false` (stage: UnderDevelopment). It must be enabled via `--enable codex_hooks` CLI flag, or `features.codex_hooks = true` in `config.toml`, or `-c features.codex_hooks=true`. Without this, hooks.json is ignored entirely.
- **No SessionEnd hook:** Codex does not fire a hook when a session is completely terminated. The `Stop` hook fires at end-of-turn, not end-of-session. This is similar to some other agents — the framework handles this gracefully.
- **PreToolUse is shell-only:** Currently only fires for `Bash` tool (direct shell execution). MCP tools, stdin streaming, and other tool types are not yet hooked. PostToolUse is in review.
- **Transcript may be null:** In `--ephemeral` mode, `transcript_path` is null. The integration should handle this gracefully.
