harness-eval: Command for Claude Code

.cursor/commands/harness-gate.md

harness-gate is a command for Claude Code, Cursor from redhat-community-ai-tools/harness-eval. It costs 0 tokens per session (206 once invoked), scanned A, original, Apache-2.0.

A command that checks an agent setup against a set of tested rules. It returns a failure status when it finds a problem, so automated checks can stop the change.

In plain words
What is it for?
Run it on a project, optionally include provisional rules, output JSON or SARIF for other tools, and suppress known findings with a baseline file.
Why use it?
It gives CI systems and pre-commit checks a fast, repeatable way to catch setup problems before they are merged or run.

Command for Claude CodeCursor

Written for Claude Code and Cursor: shipped in a Claude Code plugin, but also installed under .cursor/.

This is redhat-community-ai-tools/harness-eval's own configuration. It tells Claude Code and Cursor how to work on harness-eval itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything harness-eval configures →

Part of the harness-eval plugin — 5 skills, 6 commands shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to redhat-community-ai-tools/harness-eval. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/redhat-community-ai-tools/harness-eval/main/.cursor/commands/harness-gate.md
Clone the repo
git clone --depth 1 https://github.com/redhat-community-ai-tools/harness-eval

Made for: Claude Code, Cursor.

Or install harness-eval, the plugin that ships this one along with the rest of its 5 skills, 6 commands.

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-gate

README.md
[![agentmods](https://agentmods.dev/badge/commands/redhat-community-ai-tools/harness-eval/harness-gate/github.svg)](https://agentmods.dev/commands/redhat-community-ai-tools/harness-eval/harness-gate)
Your own site
<a href="https://agentmods.dev/commands/redhat-community-ai-tools/harness-eval/harness-gate"><img src="https://agentmods.dev/badge/commands/redhat-community-ai-tools/harness-eval/harness-gate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for harness-gate

Your own site · 80×15
<a href="https://agentmods.dev/commands/redhat-community-ai-tools/harness-eval/harness-gate"><img src="https://agentmods.dev/badge/commands/redhat-community-ai-tools/harness-eval/harness-gate.svg" alt="Reviewed on agentmods" width="80" 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 206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00206
Opus 5 $0.00000 $0.00103
Sonnet 5 $0.00000 $0.00041
Haiku 4.5 $0.00000 $0.00021

Measured 10d ago against content hash 2e57de449bd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

harness-gate 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 10d 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.

.cursor/commands/harness-gate.md · 23 lines

What it actually says

Harness Gate

Gate the agent setup on corpus-validated rules (gating tier). Fast, no LLM, exits nonzero on any finding. Suitable for CI and pre-commit.

Instructions

  1. Run the gate command on the current project:
uvx --from harness-eval harness-eval harness-gate .

This runs only the gating-tier rules (validated at >=97% precision on re-derived corpus findings) and exits 1 on any finding.

Useful flags:

  • --include-provisional — also run provisional-tier rules.
  • --format json or --format sarif — machine-readable output.
  • --baseline <file> — suppress findings recorded in a baseline.

If uvx is not available, fall back to pip install harness-eval and use harness-eval directly.

  1. Report each finding as: rule id, file, and message. If there are no findings, report that the gate passed.
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. 10d ago First seen · 23 lines · 0 tokens per session scan A 2e57de449bd7

Subscribe to this mod's changes

harness-gate is a command published in the GitHub repository redhat-community-ai-tools/harness-eval (27 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 206 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.