Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    AgentHarness CI Setup: Gate Agent PRs in GitHub Actions

    1

    **The problem.** Agent-written pull requests show up faster than anyone can review them, and "the agent said tests pass" isn't evidence.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    AgentHarness CI Setup: Gate Agent PRs in GitHub Actions

    AgentHarness CI Setup: Gate Agent PRs in GitHub Actions

    Example session with this skill installed

    Add AgentHarness to our GitHub Actions so agent PRs get blocked if tests fail. It's a Python project using uv, and Claude Code and Cursor open most of our PRs.

    • Read your context and instructions
    • Compiled the agentharness ci setup

    Example session (illustrative).

    1. Config. harness.toml didn't exist. I ran harness init, which detected a Python project with uv.lock and generated the image, setup, test command and limits below. With your OK I then replaced its empty agent allowlist with the agents that open your PRs (excerpt):

    [sandbox]
    image = "ghcr.io/astral-sh/uv:python3.12-bookworm-slim"
    allow_egress = false
    allow_setup_egress = true
    max_memory = "2GB"
    timeout = "15m"
    [validation]
    setup = ["uv sync --frozen"]
    commands = ["uv run pytest"]
    [agents]
    allowed = ["claude-code", "cursor", "github-actions"]
    strict_mode = true
    

    harness check --json returned "ok": true with no problems.

    2. Workflow. I added .github/workflows/agentharness.yml with checkout (fetch-depth: 0), a docker pull of the image, KadonWills/agent-harness pinned to a commit SHA with agent: github-actions, and an if: always() step that writes the verdict and blocking reasons to the job summary.

    3. First run: blocked (exit 1). Manifest excerpt:

    "verdict": "Blocked",
    "blocking_reasons": [
      "`uv run pytest` exited with code 1 in the sandbox; fix: make it pass locally, then rerun `harness run`",
      "1 denied network attempt(s) in the sandbox (first: api.exchangerate.host during `uv run pytest`); fix: vendor or mock that dependency, or set sandbox.allow_egress = true if the access is intended"
    ],
    "sandbox_status": "Failed",
    "steps": [
      {"phase": "setup", "command": "uv sync --frozen", "exit_code": 0, "duration_ms": 9120, "timed_out": false},
      {"phase": "validate", "command": "uv run pytest", "exit_code": 1, "duration_ms": 4310, "timed_out": false}
    ]
    

    tests/test_pricing.py called a live currency API. I did

    not enable allow_egress. I mocked the HTTP client with a fixture and recorded the response, and the next run passed ("verdict": "Pass", "sandbox_status": "Passed").

    4. Required check. Branch protection needs an admin, so here are the steps for you: Settings → Rules → main → Require status checks → add gate. Nothing was pushed to main; the workflow is on branch ci/agentharness waiting for your review.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem. Agent-written pull requests show up faster than anyone can review them, and "the agent said tests pass" isn't evidence. AgentHarness runs each change in a network-denied Docker sandbox, scans it for secrets and new dependencies, and blocks the PR deterministically. Getting it green in CI for the right reasons still trips people up: shallow clones, a base ref that isn't fetched, a 512MB default memory limit, tests that quietly reach the internet, an agent id that isn't on the allowlist, or a config with no test command that passes without running anything.

    What the agent does with this skill.

    • Writes a CI-ready harness.toml per stack (image, setup, commands, memory and timeout) using the same defaults harness init generates, and validates it with harness check --json.
    • Explains and applies the network model: allow_setup_egress gives only dependency installs the network, and the container is disconnected before validation. It never uses allow_egress to get a green build. For fully offline runs it sets up vendoring (cargo vendor, go mod vendor, a pip wheelhouse, or a pre-warmed npm cache image).
    • Adds the GitHub Action with the right inputs (agent, base, working-directory, upload-manifest), fetch-depth: 0, a pinned SHA, an image pre-pull, and a job-summary step built from AgentManifest.json.
    • Turns on cross-branch conflict checks in CI by creating local agent/* branches, skipping the PR's own branch so it doesn't conflict with itself.
    • For GitLab and other CI systems: installs the checksum-verified release binary, runs harness run --base origin/<target>, and keeps the manifest as an artifact. It also warns about remote Docker daemons, where the bind mount comes up empty.
    • Reads the manifest with jq (verdict, blocking_reasons, steps, security_audit, conflicts) and maps each common failure to its fix.
    • Walks you through making the gate a required status check.

    Who it's for. Teams merging pull requests written by Claude Code, Cursor, Codex CLI, Copilot or other agents who want an automatic, reproducible gate before human review.

    Requirements. A git repository on GitHub Actions (Linux runners) or any CI with a Linux x86_64 (glibc) runner and a local Docker daemon. The open-source AgentHarness Action or binary from github.com/KadonWills/agent-harness. The harness-cli crate on crates.io is an unrelated tool.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Requires a Linux runner with a local Docker daemon. No support for macOS/Windows runners. CI fails if the Docker daemon is unreachable or the image lacks a shell.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    Software
    GitDockerAgentHarness CLIjqPython
    Optional
    GitHub CLI

    The AgentHarness CLI command is harness. GitHub CLI is for downloading manifest artifacts.

    Permissions

    Terminal / Shell
    Network Access
    Write Files
    Listed17 days ago

    What's inside

    Frequently Asked Questions

    No. AgentHarness is free and open source (github.com/KadonWills/agent-harness). This skill is the procedure for wiring it into CI correctly. The GitHub Action builds it from source; other CI systems download the release binary. The crates.io package named `harness-cli` is unrelated, so don't install that one.

    GitHub Actions through the official composite Action, on Linux runners. Any other CI works by running the release binary directly, as long as the job has Linux x86_64 (glibc, so not Alpine) and a local Docker daemon. GitHub's macOS runners have no Docker and its Windows runners only run Windows containers, so the default sandbox can't run there.

    Yes. Validation commands never get network unless you set `allow_egress`, which the skill refuses to do just to pass. Setting `allow_setup_egress = false` also cuts the network for installs. Dependencies then have to be vendored in the repo or baked into the image, and the skill covers each stack.

    Validation output is scanned for denied-network signatures such as `getaddrinfo ENOTFOUND` or `Could not resolve host`. A test that swallows a failed request still leaves that line in the output, and the gate blocks so the hidden dependency gets mocked or vendored.

    No. It writes the workflow and config on a branch, asks before committing shared CI changes, and gives you the steps for marking the job as a required check, since that needs repository admin rights.

    New in LLM Ops