| Workflow кросс-агентного ревью с Codex. "start codex review".
npx skills add https://github.com/artwist-polyakov/polyakov-claude-skills --skill codex-review
Кросс-агентное ревью: Claude реализует, Codex (GPT) ревьюит. Codex работает в той же директории и может самостоятельно смотреть код.
Скрипты лежат в scripts/ рядом с этим SKILL.md. Определи полный путь:
SKILL.md на scripts/codex-review.sh (и scripts/codex-state.sh)Все команды ниже используют относительный scripts/ — подставь полный путь при вызове.
Codex CLI использует macOS system API (SCDynamicStore), которые блокируются sandbox Claude Code. Все вызовы codex-review.sh и codex-state.sh ОБЯЗАНЫ выполняться с dangerouslyDisableSandbox: true в Bash tool. Без этого codex крашится с паникой Rust.
Создай сессию Codex с описанием задачи.
bash scripts/codex-review.sh init "Implement JWT authentication for API"
Сессия может быть также задана вручную в .codex-review/config.env: CODEX_SESSION_ID=sess_...
Если сессии нет (exit 3 — NO_SESSION), спроси пользователя:
init?Передай путь к файлу плана через --plan-file. НЕ вставляй содержимое плана в аргумент командной строки — скрипт сам читает файл и передаёт содержимое inline в Codex.
Если используешь plan mode — отправь план на ревью перед ExitPlanMode:
~/.claude/plans/<slug>.md (автоматически)--plan-file: bash scripts/codex-review.sh plan --plan-file ~/.claude/plans/<slug>.md
CHANGES_REQUESTED → скорректируй план в файле, отправь снова (см. «Accept or Argue»)APPROVED → вызови ExitPlanMode для одобрения пользователемТаким образом план проходит два ревью: техническое (Codex) и бизнес-приоритетное (пользователь).
Если план написан в отдельный файл внутри проекта:
bash scripts/codex-review.sh plan --plan-file docs/plan.md
What: [problem being solved]
Approach: [chosen approach and why]
Alternatives considered: [what was rejected and why]
Files to change: [list]
Addressed concerns: [if resubmit — point-by-point from previous review]
Перед началом реализации обнови фазу:
bash scripts/codex-state.sh set phase implementing
Имплементируй по утвержденному плану.
Опиши ЧТО сделал, КАКИЕ решения принимал. НЕ передавай git diff — Codex сам посмотрит.
What changed: [summary of changes]
Key decisions: [non-obvious decisions made during implementation]
Files modified: [list with brief description per file]
Tests: [what tests were added/run, results]
Addressed concerns: [if resubmit — point-by-point from previous review]
bash scripts/codex-review.sh code "What changed: JWT auth middleware + refresh endpoint. Key decisions: RS256 over HS256 for key rotation. Files: auth/jwt.py (middleware), api/auth.py (refresh endpoint). Tests: 3 new tests (expired/invalid/valid tokens), all pass."
bash scripts/codex-state.sh show # Текущее состояние
bash scripts/codex-state.sh dir # Путь к state-каталогу текущей ветки
bash scripts/codex-state.sh reset # Сброс итераций (session сохраняется)
bash scripts/codex-state.sh reset --full # Полный сброс
bash scripts/codex-state.sh get session_id # Получить поле
bash scripts/codex-state.sh set session_id <val> # Установить вручную
bash scripts/codex-state.sh set phase implementing # Обновить фазу
Для чтения файлов ревью (notes, STATUS.md и пр.) используй codex-state.sh dir — он вернёт абсолютный путь к каталогу текущей ветки.
| Exit | Status | Действие |
|------|--------|----------|
| 0 | APPROVED | Продолжай работу |
| 0 | CHANGES_REQUESTED | Скорректируй и отправь снова (см. «Accept or Argue») |
| 1 | ERROR | Сообщи об ошибке, предложи проверить session_id |
| 2 | ESCALATE | Оповести пользователя, выведи краткое резюме, предложи варианты (см. «Обработка ESCALATE») |
| 3 | NO_SESSION | Спроси: создать сессию через init? |
Когда лимит итераций исчерпан:
STATE_DIR=$(bash scripts/codex-state.sh dir). Прочитай заметки ревью из $STATE_DIR/notes/ (файлы {phase}-review-{N}.md)AskUserQuestion с тремя вариантами:(Вариант «Свой вариант» добавляется автоматически)
Обработка ответа:
codex-review.sh {phase} "..." --max-iter $((текущий_лимит + 1))codex-review.sh {phase} "..." --max-iter 999Файл STATUS.md в state-каталоге ветки (путь: codex-state.sh dir) создаётся и обновляется автоматически скриптами. Не редактируй его вручную.
init и обновляется при каждом plan/code и codex-state.sh setcode и при reset --fullCodex пишет свой вердикт в verdict.txt внутри state-каталога ветки (одно слово: APPROVED или CHANGES_REQUESTED). Для чтения вердикта используй bash scripts/codex-state.sh get verdict — helper возвращает APPROVED, CHANGES_REQUESTED или пустую строку (нет/невалидно). Файл очищается перед каждым запросом ревью. Если Codex не создал файл — скрипт парсит вердикт из текста ответа (fallback). Плагинный хук ExitPlanMode дополнительно связывает вердикт с текущей Claude-сессией через current_session.txt в том же каталоге — verdict, пришедший из другой сессии, удаляется.
codex exec напрямую — только через скрипты codex-review.sh и codex-state.sh. Скрипты сами знают модель, конфиг и session_idcodex-state.sh set phase implementing--max-iter N позволяет изменить лимит итерацийСостояние ревью изолировано по ветке. Скрипты автоматически определяют основной репозиторий и текущую ветку. Параллельная работа на нескольких ветках/worktrees безопасна. config.env — общий (в корне .codex-review/). Для получения пути к state-каталогу текущей ветки используй codex-state.sh dir.
When AUTO_REVIEW=true in .codex-review/config.env, the entire review cycle runs automatically. A plugin hook blocks ExitPlanMode until Codex approves the plan.
ExitPlanMode, run review: bash scripts/codex-review.sh init "task description" # ALWAYS init for a new plan — archives previous session
bash scripts/codex-review.sh plan --plan-file ~/.claude/plans/<slug>.md
IMPORTANT: Always run init before the first plan review in a conversation. Even if codex-state.sh show reports an existing session, it may be stale (from a previous conversation). The init command safely archives the old session and creates a fresh one. Only skip init when re-submitting after CHANGES_REQUESTED within the same review cycle.
bash scripts/codex-state.sh get verdict. Proceed ONLY if it outputs the exact string APPROVED. Do NOT interpret review text — only the helper output matters.CHANGES_REQUESTED → fix the plan, resubmit (follow «Accept or Argue» rules). Iterate automatically up to the iteration limit.APPROVED → call ExitPlanMode (the hook auto-approves it)bash scripts/codex-state.sh set phase implementing bash scripts/codex-review.sh code "code description"
bash scripts/codex-state.sh get verdict and check for exact string APPROVED.CHANGES_REQUESTED → fix code, resubmit automatically.10. APPROVED → work is complete, report to user.
Same as standard ESCALATE handling — present summary and ask user via AskUserQuestion.
При получении CHANGES_REQUESTED:
$(bash scripts/codex-state.sh dir)/notes/{phase}-review-{N}.mdIntegration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take artwist-polyakov/codex-review from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.