Logo van Codex Fix

Codex Fix

Community
subinium
codex-fix

Post-edit loop that invokes `/codex:rescue` for a second-model review of the current branch, collects the findings, and hands them off to `refactor-verify`'s review-driven fix mode for triage, verification, and committed resolution. A thin host-specific wrapper — the portable review-driven engine lives in `refactor-verify`. Requires Claude Code with the Codex plugin installed; on every other host the skill emits a one-line fallback and exits without error. Operators whose review findings come from any other source (pasted notes, human PR review, Sentry alert, gitleaks output, Semgrep report, GitHub Advanced Security) should invoke `refactor-verify` directly and skip this wrapper entirely.

Overzicht

Uitgeversubinium
Repositoryvibesubin
Skillnaamcodex-fix
Sterren
51
Forks
2
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door subinium op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Codex Fix in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/subinium/vibesubin/tree/main/plugins/vibesubin/skills/codex-fix
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/subinium/vibesubin.git /tmp/vibesubin
mkdir -p .claude/skills
cp -r /tmp/vibesubin/plugins/vibesubin/skills/codex-fix .claude/skills/codex-fix
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Codex Fix in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Codex Fix automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Codex Fix niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

codex-fix

A thin, deliberately host-specific wrapper for one workflow: "I've finished a batch of edits — run Codex for a second-model review, feed the findings back, let Claude resolve them with verification."

This wrapper owns only the Codex-specific glue: the host check, the templated /codex:rescue prompt, the output collection, and the hand-off. Everything after the hand-off — parsing and normalizing findings, triaging real / false-positive / defer / duplicate, mapping each finding to a commit via git blame, planning a dependency tree, executing leaves-up, verifying each fix with the applicable checks, committing with a back-reference to the review item, and producing the resolution report — belongs to refactor-verify's review-driven fix mode. This skill does not duplicate any of it.

If you are not on Claude Code with the Codex plugin installed, you do not need this skill. refactor-verify accepts pasted review findings from any source directly — this wrapper just automates the invocation step for operators who run the Codex loop often enough that the copy-paste was adding friction.

State assumptions — before acting

Before starting the procedure, write an explicit Assumptions block. Don't pick silently between interpretations; surface the choice. If any assumption is wrong or ambiguous, pause and ask — do not proceed on a guess.

Required block:

Assumptions:
- Host:              <Claude Code + Codex plugin (primary path) | any other (graceful one-line fallback, exit)>
- Review branch:     <current branch | specified — merge-base with main is the diff scope>
- Working tree:      <clean (proceed) | dirty (warn operator before handing mixed state to Codex)>
- Base reference:    <main (default) | explicit base when current branch has no merge-base with main>

Typical items for this skill:

  • The branch under review (default: current branch vs its merge-base with main)
  • Working tree state (clean required for a clean review; dirty triggers a warning before invocation)
  • Codex plugin availability (host check in Step 1 — this Assumptions block is Step 0, the host check is Step 1)

Stop-and-ask triggers:

  • Working tree is dirty — warn and confirm before handing the mixed state to Codex
  • Current branch has no merge-base with main (detached / new repo / orphan branch) — ask for an explicit base reference instead of assuming main

Silent picks are the most common failure mode: the skill runs, produces plausible output, and the operator doesn't notice the wrong interpretation was chosen. The Assumptions block is cheap insurance.

Host requirement

This skill only fires on Claude Code with the Codex plugin installed. On every other host (Codex CLI itself, Cursor, Copilot, Cline, or Claude Code without the plugin), the skill's first action is a graceful one-line fallback and exit. It never hangs, never errors loudly, never falls back to asking the operator for pasted findings (that is refactor-verify's path directly — this wrapper has nothing to add there).

Procedure

1. Check host — confirm the Codex rescue subagent is registered. This skill invokes Codex via the Task tool with subagent_type: "codex:codex-rescue". That subagent is only registered when the Codex plugin is installed on a Claude Code session. Before attempting the Task call, verify availability via either of these detection paths:

  • Primary — inspect the available-subagents list. Claude Code populates the available-subagents list at session start from installed plugins. Check whether codex:codex-rescue appears as a valid subagent_type in the current context. If yes, proceed. If no, fall through to the secondary path before giving up.
  • Secondary — filesystem check.
    bash
    test -d "$HOME/.claude/plugins/codex" && echo "plugin-installed" || echo "plugin-missing"
    If the directory exists but the subagent is still not in the available-subagents list (e.g., the plugin is disabled or its registration step failed), treat that as "not available" and fall through — a present-but-non-functional plugin should still trigger graceful pass, not a half-broken attempt.

If neither path confirms the subagent is registered, respond with exactly one sentence and stop:

"Codex plugin not detected — this skill is Claude Code + Codex specific. To resolve a review from a different source (pasted findings, a PR review, a scanner report), invoke /refactor-verify directly with the findings."

No retry loop, no stack trace, no pasted-findings prompt. Graceful pass is the expected outcome on non-matching hosts, and it is not an error — just log it and stop.

2. Capture the branch state as the review scope. The default scope is the current branch's diff against its base — not the whole repo. Reviewing the whole repo is what /vibesubin is for.

bash
BASE=$(git merge-base HEAD main 2>/dev/null \
       || git merge-base HEAD master 2>/dev/null \
       || echo "HEAD~10")
REVIEW_SHA=$(git rev-parse HEAD)
git diff --stat "$BASE"...HEAD          # what changed
git log  --oneline "$BASE"..HEAD        # commits on the branch
git status                              # current dirty state

If the working tree is dirty, warn the operator: "Uncommitted changes present. Codex should review a clean snapshot — commit or stash before the review?" Do not proceed without confirmation. A dirty review snapshot injects bugs because Codex's findings become ambiguous (was it fixed in the uncommitted diff or not?).

3. Invoke the Codex rescue subagent via the Task tool. Do not write /codex:rescue ... as plain text in your response — slash-command text inside a response body is just a text string and does nothing. The actual invocation mechanism is a Task tool call with subagent_type: "codex:codex-rescue". The prompt scopes the review to the branch diff and names the categories the operator cares about:

Task(
  subagent_type = "codex:codex-rescue",
  description   = "Deep code review of branch diff",
  prompt        = """
    Run a deep code review of the current branch's changes
    ($BASE..HEAD, where $BASE is the captured base-branch merge-base).
    Return findings as markdown with file:line references.

    Focus on:
    (1) security — injection, auth bypass, secret exposure, unsafe deserialization;
    (2) correctness — null handling, race conditions, error swallowing,
        off-by-one, incorrect async;
    (3) performance — N+1 queries, hot-path allocations, unnecessary work;
    (4) resource management — connection leaks, handle leaks, memory leaks,
        missing cleanup;
    (5) concurrency — unsynchronized shared state, deadlock risk, TOCTOU bugs.

    One finding per bullet. Each finding: file:line, one-line description,
    severity (CRITICAL / HIGH / MEDIUM / LOW). Skip style nits and missing
    comments unless they hide a bug. If the diff is clean, say so explicitly
    and return an empty findings list.
  """
)

The Task tool returns the subagent's output as a single result message. Collect that output as raw markdown. Do not interpret it here — parsing and triage belong to refactor-verify, not this wrapper.

If the Task call itself fails (subagent disabled mid-call, Codex CLI timeout, unexpected subagent error), do not retry automatically. Emit a one-line failure that references the underlying error category — "Codex rescue failed: <error summary>. Falling back — invoke /refactor-verify directly with manually-pasted review findings if you still want to run the post-edit loop." — and stop. A failed subagent invocation is a transient state, not a bug in this wrapper.

4. Hand off to refactor-verify's review-driven fix mode. Pass the following as structured input:

  • review_source: codex-rescue
  • review_sha: the value of REVIEW_SHA captured in step 2
  • findings_raw: Codex's raw markdown output from step 3
  • branch_context: the git log, git diff --stat, git status output from step 2

refactor-verify owns every step from here: parsing and normalizing findings, triaging (real / false-positive / defer / duplicate), mapping each item to a commit via git blame, planning the dependency tree, executing leaves-up, verifying each fix with the applicable checks (relaxed AST diff for intentionally behavior-changing fixes, full call-site closure on the untouched surface), committing with the resolve codex-rescue#<item-id> — <subject> back-reference format, and producing the resolution report. This wrapper's job ends at the hand-off.

5. Do not re-parse, re-verify, or re-commit. Every step after the hand-off belongs to refactor-verify. If refactor-verify returns with unresolved items, deferred items, a baseline-red warning, or a partial resolution, surface the result to the operator unchanged. This wrapper is not a second-opinion on the refactor-verify engine.

Things not to do

  • Don't run without Codex. If the host check fails, do not synthesize fake findings, do not fall back to the 9 umbrella specialists, do not prompt the operator for pasted findings (that path belongs to refactor-verify directly — invoke it instead). Emit the one-line fallback and stop.
  • Don't bypass refactor-verify's verification. The entire point of this wrapper is that it inherits refactor-verify's 4-check discipline. Applying fixes without the verification layer is a regression of the pack's core promise.
  • Don't review the whole repo. The default scope is the branch diff (BASE..HEAD). Reviewing the full repo is what /vibesubin is for — this skill is a post-edit loop, not a sweep.
  • Don't participate in the /vibesubin parallel sweep. This wrapper is direct-call only. The umbrella does not launch it. It requires an external model and writes files; both break the sweep's read-only + portable invariants. If a future maintainer tries to add this skill to the umbrella's parallel launch block, stop and read docs/PHILOSOPHY.md rule 9.
  • Don't add a sweep-mode section to this SKILL.md. Its absence is deliberate. Documented here explicitly so a future maintainer does not "fix" it by adding one.
  • Don't duplicate the review-driven procedure from refactor-verify. If you find yourself writing parsing logic, triage logic, dependency-tree planning, or verification code in this wrapper, stop — that content belongs in refactor-verify. Delete it here and extend refactor-verify instead.
  • Don't write /codex:rescue ... as plain text in a response. Slash-command text inside a response body is just a text string — it does not execute the slash command and does not dispatch the plugin. The actual invocation mechanism is the Task tool with subagent_type: "codex:codex-rescue". If you find yourself about to paste slash-command text into a response as if it were an instruction, stop — that was the 0.3.2 bug and 0.3.3 fixed it precisely to prevent that regression.
  • Don't add features the operator did not request. This wrapper's job is the host check and the Codex invocation — nothing else. If during the host check you notice the repo has other obvious issues (missing CI, uncommitted secrets, stale deps), report them as hand-off suggestions to the relevant skills — do not act on them. A wrapper that silently expands its scope defeats the "thin wrapper" invariant.
  • Don't relay Codex-suggested gate-gaming as a verified fix. The forbidden patterns are listed in refactor-verify's "gate-gaming as a fix" bullet — this wrapper enforces the same list at the wrapper boundary, before handoff. When Codex output for a failing verification proposes any of those patterns, reject the suggestion and surface the failure to the operator unchanged — do not pass a weakened-gate diff into refactor-verify's 4-check engine. Passing a weakened gate through the wrapper is a regression of the inheritance promised in line 125.

Harsh mode — no hedging

Inherited from refactor-verify. When the operator passes tone=harsh (from /vibesubin harsh or direct phrasing like "don't sugarcoat", "매운 맛", "厳しめ"), this wrapper forwards the marker as part of the hand-off in step 4; refactor-verify's harsh-mode template takes over from there. No harsh-mode body lives in this file — duplicating refactor-verify's rules would only let them drift. The canonical heading is present so validate_skills.py's harsh-mode coverage check passes; the wrapper's job is to forward the marker, not restate the policy.

Layperson mode — plain-language translation

When the task context contains explain=layperson (from /vibesubin explain, /vibesubin easy, "쉽게 설명해줘", "일반인도 이해되게", "explain like I'm non-technical", "非開発者でも分かるように", "用通俗的话解释"), add a plain-language layer to every finding this skill emits. Combines freely with tone=harsh. Full rules at /plugins/vibesubin/skills/vibesubin/references/layperson-translation.md.

Three dimensions per finding

Every finding gets three questions answered in plain language, in the operator's language (Korean / English / Japanese / Chinese):

  • 왜 이것을 해야 하나요? / Why should you do this? — "한 모델(Claude)이 쓴 코드를 같은 모델이 다시 리뷰하면 놓치는 게 생깁니다. Codex로 2차 리뷰를 받고 그 findings를 그대로 돌려주면 훨씬 정직한 리뷰가 됩니다."
  • 왜 중요한 작업인가요? / Why is it an important task? — "혼자 쓰고 혼자 리뷰하는 워크플로우는 'looks good'으로 끝나기 쉬워요. 브랜치 묶음 하나 끝낼 때마다 2차 모델 리뷰 → 검증 반영 루프가 돌면 회귀 리스크가 현저히 줄어요."
  • 그래서 무엇을 하나요? / So what gets done? — "Claude Code + Codex 플러그인 환경에서만 동작 — /codex:rescue를 현재 브랜치 diff에 돌리고, 나온 findings를 refactor-verify의 리뷰 기반 수정 모드로 넘겨 검증·적용합니다. 다른 호스트면 한 줄 안내 후 exit."

Severity translation

  • CRITICAL → "지금 당장 — Codex가 치명적 회귀를 잡음"
  • HIGH → "이번 주 안에 — 중간 위험 이슈"
  • MEDIUM → "다음 릴리즈 전까지 — 개선 제안"
  • false-positive → "체크해 봤는데 문제 아니었음"

Box format

Wrap each finding in the box format from the shared reference. Header uses urgency phrase and the finding number. Footer names the hand-off skill.

What does NOT change

Findings, counts, file:line references, evidence, and severity are identical to balanced/harsh output. Only the wrapping and dimension annotations are added.

Hand-offs

  • Every fix → refactor-verify (review-driven fix mode). This is the only hand-off; everything substantial delegates here.
  • If the operator wants review-driven fix from a non-Codex source (pasted notes, PR review, Sentry alert, gitleaks output, Semgrep report, GitHub Advanced Security, any scanner) → redirect to refactor-verify directly. This wrapper is Codex-only by design; other input sources either get their own thin wrapper following the same pattern or go straight to refactor-verify with pasted input.

Why this wrapper exists

Pack philosophy: portable engine, optional host-specific wrappers. The review-driven fix engine is portable and lives in refactor-verify. This wrapper exists because one specific maintainer runs the Codex loop often enough that the copy-paste step was adding friction session after session. Future host-specific wrappers (Sentry, gitleaks, etc.) would follow the same pattern — a thin adapter for the input source, delegating to refactor-verify for everything substantial.

Before adding another such wrapper, ask two questions: "Is this workflow frequent enough for one operator to justify a worker slot?" and "Is the input source's invocation glue non-trivial enough that operators can't just paste it into refactor-verify directly?" If both answers are yes, build the wrapper following this skill's shape: host check first, templated invocation, hand off to refactor-verify, no duplicated logic. If either answer is no, skip the wrapper.

This pattern is documented as rule 9 of docs/PHILOSOPHY.md: "Portable engines can have host-specific wrappers."

Veelgestelde vragen

Wat doet de AI-skill Codex Fix?

Post-edit loop that invokes `/codex:rescue` for a second-model review of the current branch, collects the findings, and hands them off to `refactor-verify`'s review-driven fix mode for triage, verification, and committed resolution. A thin host-specific wrapper — the portable review-driven engine lives in `refactor-verify`. Requires Claude Code with the Codex plugin installed; on every other host the skill emits a one-line fallback and exits without error. Operators whose review findings come from any other source (pasted notes, human PR review, Sentry alert, gitleaks output, Semgrep report...

Waarom Codex Fix gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Codex Fix bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Codex Fix in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/subinium/vibesubin/tree/main/plugins/vibesubin/skills/codex-fix. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Codex Fix gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Codex Fix gebruiken?

Zoveel als je wilt. Je kunt Codex Fix gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Codex Fix gratis?

Ja. Deze skill is door subinium op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇