ai-harness-doctor: Instructions file for Codex

AGENTS.md

ai-harness-doctor AGENTS.md is an instructions file for Codex, OpenCode from NieZhuZhu/ai-harness-doctor. It costs 2,190 tokens per session, scanned A, original, MIT.

Project instructions for ai-harness-doctor, a tool that checks and manages AI-agent configuration files around a central AGENTS.md file. AGENTS.md is a text file that tells coding agents how to work in a repository.

In plain words
What is it for?
Scanning projects, consolidating configuration, detecting configuration drift, explaining findings, and running before-and-after evaluations across supported programming languages.
Why use it?
They define the repository structure, expected checks, and testing rules so changes to agent configuration can be audited consistently.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

This is NieZhuZhu/ai-harness-doctor's own configuration. It tells Codex and OpenCode how to work on ai-harness-doctor 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 ai-harness-doctor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to NieZhuZhu/ai-harness-doctor. 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/NieZhuZhu/ai-harness-doctor/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/NieZhuZhu/ai-harness-doctor

Made for: Codex, OpenCode.

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 ai-harness-doctor AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/niezhuzhu/ai-harness-doctor/agents-md/github.svg)](https://agentmods.dev/instructions/niezhuzhu/ai-harness-doctor/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/niezhuzhu/ai-harness-doctor/agents-md"><img src="https://agentmods.dev/badge/instructions/niezhuzhu/ai-harness-doctor/agents-md/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 ai-harness-doctor AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/niezhuzhu/ai-harness-doctor/agents-md"><img src="https://agentmods.dev/badge/instructions/niezhuzhu/ai-harness-doctor/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,190 This file is loaded in full into every session.
When invoked 2,190 The same file — it is already loaded in full.
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.02190 $0.02190
Opus 5 $0.01095 $0.01095
Sonnet 5 $0.00438 $0.00438
Haiku 4.5 $0.00219 $0.00219

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

Security

Grade A, and why

ai-harness-doctor AGENTS.md 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 11d 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.

AGENTS.md · 103 lines

How it starts

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

Project overview

This repository contains the ai-harness-doctor Claude Code skill. It audits, consolidates, guards, and evaluates AI harness configuration files around a canonical AGENTS.md.

Project structure

  • SKILL.md — the skill contract and the four-phase workflow (Checkup → Treat → Follow-up → Efficacy).
  • scripts/ — deterministic Python engines:
    • scan.py — Phase 0 inventory/security scan, monorepo results, structured applicability, and debt baselines.
    • semantic.py — Phase 0 declaration-vs-code facts for Node, Python, Go, Rust, Java, and Ruby.
    • applicability.py — bounded Claude/Cursor/Copilot applicability; no general YAML.
    • canonicalize.py — Phase 1 merge plan, --draft, tool-stub downgrade, and validation.
    • check_drift.py — Phase 2 root/nested D1–D8 guard, health, --fix, and baselines.
    • explain.py — read-only target-path projection of scan's canonical scope, diagnostic-source, override, and conflict evidence.
    • plugins.py — opt-in deterministic .ai-harness-doctor/rules/*.py engine; plugin failures become ERROR findings instead of crashing.
    • eval_run.py — Phase 3 Efficacy: before/after + matrix eval runner and LLM-as-judge grading.
    • pr_review.py — Phase 2/3 CI helper: combines active scan+drift JSON (root/package/batch) into one attributed GitHub review; --dry-run prints it, --post uses the stdlib REST client.
    • gen_adapters.py — repo-maintenance tool (not shipped in the npm package): regenerates the per-command adapters/ from a single source; --check gates re-divergence in CI.
  • bin/cli.js — npm CLI/installer/forwarder; bin/mcp-server.js — MCP stdio; bin/runtime.js — Python resolver; bin/action-run.js / bin/action-report.js — Action argv and SARIF reporting.
  • assets/ — templates: assets/AGENTS.template.md and the assets/guard/ suite; references/ — progressive-disclosure docs.
  • commands/, adapters/ — Claude/Codex/Cursor/Gemini/universal command pointers. Edit scripts/gen_adapters.py, then regenerate; do not hand-edit generated adapter flavors.
  • tests/ — Python unittest + Node CLI smoke tests; benchmark/ — self-benchmark and efficacy eval fixtures.

Read the full file on GitHub · 103 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. 11d ago First seen · 103 lines · 2,190 tokens per session scan A 827e4f8e7c37

Subscribe to this mod's changes

ai-harness-doctor AGENTS.md is an instructions file published in the GitHub repository NieZhuZhu/ai-harness-doctor (2 stars, last pushed 1mo ago), licensed MIT. It adds 2,190 tokens to every session, about $0.0110 per session on Opus 5. 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-31.

Related

Other instructions, from other repositories

whichrules copilot-instructions.md

Instructions for z35068037/whichrules, a project described as: See exactly which instructions your AI coding agent receives - and where they conflict.

z35068037/whichrules · 21 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens