harness

harness is an agent for Claude Code from Contrast-Security-OSS/mcp-contrast. It costs 0 tokens per session (757 once invoked), scanned A, original, Apache-2.0.

A read-only collection of guidance and playbooks for checking and improving how a coding agent works in a software repository. It includes commands for reviewing the repository and making one measured improvement.

In plain words
What is it for?
Reviewing an agent's ability to understand, change, verify, and safely operate in a repository, then improving the surrounding instructions or workflow.
Why use it?
It helps reveal when an agent misunderstands the task, makes changes without proving them, or needs unsafe human assistance. The playbooks provide a repeatable way to find and address those gaps.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/contrast-security-oss/mcp-contrast/harness
Clone the repo
git clone --depth 1 https://github.com/Contrast-Security-OSS/mcp-contrast

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harness

README.md
[![agentmods](https://agentmods.dev/badge/agents/contrast-security-oss/mcp-contrast/harness.svg)](https://agentmods.dev/agents/contrast-security-oss/mcp-contrast/harness)
Your own site
<a href="https://agentmods.dev/agents/contrast-security-oss/mcp-contrast/harness"><img src="https://agentmods.dev/badge/agents/contrast-security-oss/mcp-contrast/harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 757 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00757
Opus 5 $0.00000 $0.00378
Sonnet 5 $0.00000 $0.00151
Haiku 4.5 $0.00000 $0.00076

Measured 6d ago against content hash 3816619beefa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/harness.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harness engineering route

The harness-engineering corpus is a read-only context bundle and set of playbooks by Ryan Lopopolo, meant to be pointed at a target repository. Two project commands run its playbooks against this repo just in time, so the corpus is never preloaded into CLAUDE.md.

  • /harness-review runs the repository-review playbook, a broad diagnostic of whether a coding agent can recover the real job, make a coherent change, prove the outcome, and operate safely here without a human relay.
  • /improve-harness runs the improve-harness playbook, one bounded loop from baseline through the earliest failed handoff to the smallest owning intervention, native verification, and a fresh rerun.

Both commands read the corpus AGENTS.md, follow its routing to the named playbook, and keep the corpus read-only. This repo is always the target.

Locate the corpus

The corpus is pinned to commit 226c8d35fb6ea3ed55467753dba6dea2b5fd5778 for reproducible runs. Any developer with git and network access resolves the same commit, no pre-existing local layout required. Run this to resolve CORPUS_DIR.

CORPUS_COMMIT=226c8d35fb6ea3ed55467753dba6dea2b5fd5778
CORPUS_URL=https://github.com/lopopolo/harness-engineering.git
CACHE_DIR=$HOME/.cache/harness-engineering/$CORPUS_COMMIT

# Fast path, reuse a local checkout only when it already sits on the pin.
# Never checkout inside a developer's own clone, the corpus stays read-only.
if [ -n "$HARNESS_ENGINEERING_DIR" ] && \
   [ "$(git -C "$HARNESS_ENGINEERING_DIR" rev-parse HEAD 2>/dev/null)" = "$CORPUS_COMMIT" ]; then
  CORPUS_DIR=$HARNESS_ENGINEERING_DIR
else
  # Managed per-user cache, clone once and pin to the exact commit.
  if [ ! -e "$CACHE_DIR/AGENTS.md" ]; then
    git clone --quiet "$CORPUS_URL" "$CACHE_DIR"
  fi
  git -C "$CACHE_DIR" fetch --quiet origin "$CORPUS_COMMIT" 2>/dev/null || true
  git -C "$CACHE_DIR" checkout --quiet "$CORPUS_COMMIT"
  CORPUS_DIR=$CACHE_DIR
fi
echo "corpus $CORPUS_DIR at $(git -C "$CORPUS_DIR" rev-parse HEAD)"

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 63 lines · 0 tokens per session scan A 3816619beefa

Subscribe to this mod's changes

harness is an agent published in the GitHub repository Contrast-Security-OSS/mcp-contrast (23 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 757 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.