SkillAgentSearch skills...

harness-audit

Audit and harden a repository''s AI coding agent harness across the 6 Software Factory Stations (Intent, Harness, Loop, Graph, Verification, Release) and place it on the Autonomy Ladder (Level 0–5)

Install / Use

npx skills add wondelai/skills --skill harness-audit

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

91/100

Supported Platforms

Claude Code
Cursor
OpenAI Codex

Our assessment of harness-audit

harness-audit scores 91/100 on our quality scale, 1042nd of 4,722 Development & Engineering skills we index (top 23%).

Its SKILL.md is 19 KB long, well organised into 19 sections with 1 code example: a thorough specification that gives an agent plenty to work with.

With 2,248 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
17/20
Description
15/15
Adoption
14/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 3 months ago, so harness-audit is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-11-27. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

harness-audit compared with similar skills

All 4 of these similar skills score higher than harness-audit; compare them before choosing.

SkillScoreStarsUpdatedFormat
harness-audit (this skill)by wondelai912.2k3mo agoSKILL.md
taste-skillby Leonxlnx100122.3k1d agoCLAUDE.md
Agent-Reachby Panniantong100115.4k3d agoCLAUDE.md
hyperframesby heygen-com10091.5ktodayCLAUDE.md
rufloby ruvnet10082.6ktodayCLAUDE.md

Frequently asked questions

How do I install harness-audit?
Run npx skills add wondelai/skills --skill harness-audit. The install tabs above show the steps for each supported agent.
Which AI agents does harness-audit work with?
It is written for Claude Code, Cursor and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
Is harness-audit safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is harness-audit still maintained?
The repository was last updated about 3 months ago, so harness-audit is actively maintained.

name: harness-audit description: 'Audit and harden a repository''s AI coding agent harness across the 6 Software Factory Stations (Intent, Harness, Loop, Graph, Verification, Release) and place it on the Autonomy Ladder (Level 0–5). Use when you need to: (1) audit a repo''s readiness for Claude Code, Codex, or Cursor using @wondelai/harness-audit or manual inspection, (2) diagnose why agents drift, loop, break tests, or stall in PR review, (3) fix duplicated AGENTS.md/CLAUDE.md, broken MCP configs, retired Codex settings, unguarded Stop hooks, or weak test oracles, (4) generate a verified remediation plan or scaffold starter harness files safely, or (5) climb from Level 2 paired prompting to Level 3–4 spec-driven verified loops.' license: MIT metadata: author: wondelai version: "1.0.0"

Harness Audit

Audit, score, and harden the repository machinery around your coding agents — instructions, permissions, hooks, MCP configs, verification loops, worktree isolation, test oracles, and release gates — so Claude Code, OpenAI Codex, and Cursor produce reliable, verifiable changes instead of plausible-looking regressions.

Core Principle

Autonomy is earned by verification, never granted by prompt optimism. A repository's maturity on the Autonomy Ladder (Level 0 to Level 5) is capped by its weakest safety gate: polished AGENTS.md files cannot compensate for missing CI, hardcoded secrets, broken MCP servers, or tests an agent can silently weaken to go green. Every audit starts with deterministic facts on disk — ideally by running npx @wondelai/harness-audit — pairs them with a qualitative inspection of instruction signal-to-noise and test strength, and closes every fix with a command-and-output verification ledger.

Two framing rules govern every audit and remediation:

  • One level per loop, capped by risk class. Maturity belongs to a repeatable class of change (dependency bumps, bug fixes, feature work), while risk class (low, medium, high, critical) caps individual changes. Auth, payments, schema migrations, secrets, tests, and CI remain human-read even in a Level 4–5 repository.
  • Verify every claim against the live repo. Never invent build commands, flags, or MCP package names from memory. Run every verification command and check every config key before committing it to AGENTS.md or CI.

Scoring

Goal: 10/10. score = number of Quick Diagnostic rows passed (10 rows, 1 point each).

  • 9–10: Production-grade harness (typically Autonomy Level 4–5, subject to zero blocking caps) — maintain through periodic audits and incident feedback loops.
  • 7–8: Solid Level 3 foundation — focus on oracle protection (CODEOWNERS), evidence-oriented PR templates, and eliminating review bottlenecks.
  • 5–6: Level 2 paired ceiling — consolidate instructions, harden permissions/hooks/MCP hygiene, and establish a single fast verification loop before scaling agent autonomy.
  • ≤4: Level 0–1 ad-hoc state — establish canonical AGENTS.md, deterministic local typecheck + lint + test, and PR-triggered CI before delegating multi-file tasks.

Hard gating caps (blocking regardless of raw score): hardcoded credentials or retired/bypassed permission policies cap a repo at Level 2; missing CI or tautological/broken tests cap it at Level 3; unprotected test/CI oracles cap it at Level 4.

Framework

1. Run the Deterministic Baseline First

Core concept: Before offering opinions, establish an objective, file-backed baseline across all six Software Factory Stations (Intent, Harness, Loop, Graph, Verification, Release).

Why it works: LLMs naturally flatter a codebase or fixate on whichever file was opened last. A deterministic scan measures every station uniformly, flags silent tool traps (such as backticked `@AGENTS.md` or retired Codex approval_policy = "untrusted"), and applies gating caps honestly.

Key insights:

  • Run npx @wondelai/harness-audit --format json (or --format terminal) when shell execution is available; it runs 30 deterministic checks locally with zero runtime dependencies and zero telemetry.
  • When running in a restricted or read-only environment without npx, execute the exact same 6-station inspection manually using file reads and grep.
  • Always separate repo artifacts (observable on disk) from org & workflow practices (PR review queues, spec-first discipline, revert tracking — captured via --interview or 3–5 targeted questions).

Tool commands:

| Goal | Command | | --- | --- | | Quick terminal scorecard | npx @wondelai/harness-audit | | Machine-readable JSON for agent processing | npx @wondelai/harness-audit --format json | | Standalone shareable HTML report (Schematic style) | npx @wondelai/harness-audit --format html --out harness-audit.html | | Tailored remediation prompt | npx @wondelai/harness-audit --prompt --out HARNESS-FIX-PROMPT.md | | CI quality gate (exits 1 below threshold) | npx @wondelai/harness-audit --ci --min-score 70 --format json | | Safe starter scaffolding (preview first) | npx @wondelai/harness-audit init --dry-run --tools claude-code,cursor,codex |

See references/stations-and-checks.md when executing the audit manually or interpreting any of the 30 check IDs — contains the complete check catalog, station weights, gating cap rules, and tool-specific failure signatures across Claude Code, Codex, and Cursor.

2. Station 1 — Intent: Single Source, Tight Budget, Scoped Rules

Core concept: One concise canonical brief (AGENTS.md, target ≤ 150 lines) owns project-wide commands and invariants; tool adapters stay paper-thin; directory-specific rules load only when matching paths are touched.

Why it works: Verbose instruction files padded with generic advice ("write clean code", "follow best practices") measurably lower agent task success and raise token cost by over 20%. Parallel AGENTS.md and CLAUDE.md files drift the first time anyone updates a command in only one file.

Key insights:

  • Codex, Cursor, and GitHub Copilot read root AGENTS.md directly. Claude Code loads it via a 1-line CLAUDE.md containing a bare @AGENTS.md line — never wrap @AGENTS.md in backticks or a code fence, or Claude Code treats it as inert text.
  • Codex silently truncates project docs past project_doc_max_bytes (32 KiB default); keep root AGENTS.md crisp and push domain rules down into .claude/rules/*.md (with paths: YAML frontmatter) and .cursor/rules/*.mdc (with globs: comma-separated string; plain .md files in .cursor/rules/ are ignored).
  • Extract repeatable workflows into skills (.claude/skills/ or .agents/skills/) and commit real standards/spec artifacts (TESTING.md, CODING_STANDARDS.md, ADRs, PR/issue templates).

3. Station 2 — Harness: Permissions, Hooks, MCP & Secret Hygiene

Core concept: Move critical boundaries from polite prompt requests into versioned tool configuration, deterministic hooks, clean MCP declarations, and secret ignore/scanning rules.

Key insights:

  • Permissions: Commit .claude/settings.json with explicit permissions.allow for read-only and verify commands and permissions.deny for deploy/production scripts. In .codex/config.toml, use approval_policy = "on-request" and sandbox_mode = "workspace-write" — flag approval_policy = "untrusted" as a critical startup error (retired in Codex 0.149.0) and never commit bypassPermissions.
  • Hooks: Wire fast formatting/linting/targeted verification via .claude/settings.json hooks, .cursor/hooks.json, or lefthook/.husky. Every Claude Code Stop hook MUST inspect stop_hook_active from stdin JSON and exit 0 when true so a red suite stops cleanly instead of looping.
  • MCP hygiene: Claude Code reads root .mcp.json, never .claude/mcp.json. Flag archived or non-existent npm servers (@modelcontextprotocol/server-postgres, -sqlite, -mysql, -slack, -git, -jira, -puppeteer, -github), deprecated /sse endpoints (migrate to Streamable HTTP type: "http"), missing type: "stdio" in .cursor/mcp.json, and hardcoded Authorization: Bearer tokens or API keys (always use ${VAR} / ${env:VAR}).
  • Secret hygiene: Verify .gitignore covers .env, .env.local, *.pem, *.key (and .dev.vars for Cloudflare Workers), commit .env.example, scan tracked config/scripts for leaked credentials, and run gitleaks or trufflehog in CI.

4. Station 3 — Loop & Station 4 — Graph: Fast Proof and Parallel Isolation

Core concept: Give agents a single fast, reproducible local verification loop (Station 3) and collision-free checkout/port/state isolation when running multiple agents in parallel (Station 4).

Key insights:

  • Every Level 3–4 loop needs a machine-checkable stop condition: strict static types (strict: true in tsconfig.json, pyright/mypy, or native Go/Rust), fast deterministic formatter/linter (oxlint, Biome, dprint, Ruff, golangci-lint), committed lockfile, pinned runtime version (.node-version, .python-version, rust-toolchain.toml), and exact verify commands mirrored identically in AGENTS.md and CI.
  • Parallel agents in one working tree overwrite each other's edits and collide on port 3000 or a shared local database. Provide a git worktree helper (plus .worktreeinclude for untracked local config), parameterized port env vars, and ephemeral local state (Miniflare, SQLite, Testcontainers, os.tmpdir()).
  • Document module boundaries (ARCHITECTURE.md or a "Read before you touch" table in AGENTS.md) and separate planner/builder/reviewer roles under .claude/agents/ or a loops.yaml register before running unattended tasks.

5. Station 5 — Verification & Station 6 — Release: Oracles You Can Trust

Core concept: Deterministic checks decide whether a change is safe; AI code reviewers advise; the agent must never be able to quietly edit its own grading rubric.

Why it works: An agent optimizing for "exit code 0" will occasionally skip a failing test, loosen a type check with @ts-ignore, or assert expect(true).toBe(true). Without oracle protection and PR evidence bundles, throughput rises while stability collapses.

Key insights:

  • Test quality scan: Reject .only(), empty test bodies, constant-to-constant tautologies (expect(true).toBe(true)), mock-echo assertions, and @ts-ignore / eslint-disable sprawl. Pin observable behavior against hand-computed expected values.
  • Protect the oracle: Add .github/CODEOWNERS covering tests/, .github/, AGENTS.md, and lint/type configs, enable required Code Owner review on protected branches, and fail automated factory branches that modify protected oracle paths.
  • Evidence-driven release: Run lint, typecheck, and tests on pull_request in CI, gate deploy jobs behind verification (needs: [verify]), require an evidence checklist in .github/pull_request_template.md (commands run, outputs, escalation paths touched, rollback notes), automate patch/minor dependency bumps (Renovate/Dependabot), and wire runtime observability (Sentry, OpenTelemetry, structured logging, healthchecks).

6. Execute the Audit & Safe Remediation Protocol

Core concept: Audit read-only first, fix blockers in cap-clearing order (secrets & broken configs → CI & verify loop → single-source intent → oracle protection → parallel isolation), and never clobber existing team conventions.

Protocol:

  1. Run the scan (npx @wondelai/harness-audit --format json or manual 6-station inspection) plus a qualitative read of AGENTS.md, CLAUDE.md, .claude/settings.json, and 2–3 real test files.
  2. Present the scored audit in the fixed format below, highlighting active level caps before individual warnings.
  3. Remediate safely (only after user confirmation or when explicitly asked to fix):
    • Read every existing ins

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars2.2k
CategoryDevelopment
Updated2mo ago
Forks228

Languages

Shell

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions