codex-harness

Execute Codex in an isolated Git worktree with automatic verification.

Updated Sep 1, 2021
One-click install
npx skills add https://github.com/unclehowell/unclehowell --skill codex-harness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-harness
Source: https://github.com/unclehowell/unclehowell/tree/main/skills/autonomous-ai-agents/codex-harness
Command: npx skills add https://github.com/unclehowell/unclehowell --skill codex-harness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, codex, gh, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a reproducible, safe way to run Codex code generation inside an isolated Git worktree, ensuring deterministic edits, automatic verification, logging, and optional pull‑request creation without polluting the main repository.

Core Features & Use Cases

  • Isolated Worktree: Runs Codex in a temporary Git worktree derived from a base branch, protecting the main codebase.
  • Automatic Verification: Executes a user‑specified test or format command after Codex changes.
  • Push & PR Automation: Pushes the new branch and optionally opens a pull request via GitHub CLI, complete with logs.
  • Use Case Example: A developer can task Codex to fix a login bug, have the changes verified with npm test, and automatically submit a PR for review.

Quick Start

Ask the codex-harness skill to run Codex with a fix-login task on the main branch, verify with npm test, and create a PR.

Frequently Asked Questions about codex-harness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Codex safely without modifying my main git branch?

Codex runs in an isolated git worktree derived from your base branch, ensuring deterministic code changes without polluting the main repository. This protects your primary codebase from unreviewed edits.

Can I automatically create a pull request after Codex generates code changes?

Yes, the workflow pushes the new branch and optionally opens a pull request via the GitHub CLI. It automatically attaches the logs from the generation and verification process directly to the PR for review.

What's the best way to verify code generated by Codex before merging?

You can verify generated code by executing a user-specified test or format command immediately after Codex applies changes. This automatic verification runs within the isolated worktree before any PR creation occurs.

Do I need the GitHub CLI to automate Codex bug fixes and refactoring?

The GitHub CLI is an optional dependency used only for automatic PR creation. You still need the Codex CLI and Git to execute isolated code generation, bug fixes, and refactoring within repositories with an origin remote.

How do I configure a task for Codex to run in a git worktree?

You configure the task by setting environment variables for the task description, base branch, and verification command. The harness then executes Codex in an isolated worktree using these parameters to generate deterministic code changes.