Works with the AI Agents you already use
AgentHarness CI Setup: Gate Agent PRs in GitHub Actions
**The problem.** Agent-written pull requests show up faster than anyone can review them, and "the agent said tests pass" isn't evidence.
$12
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.tomlper stack (image,setup,commands, memory and timeout) using the same defaultsharness initgenerates, and validates it withharness check --json. - Explains and applies the network model:
allow_setup_egressgives only dependency installs the network, and the container is disconnected before validation. It never usesallow_egressto 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 fromAgentManifest.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.
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
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
Requires