harness-govern

harness-govern is a command for Claude Code from hmj1026/dhpk. It costs 28 tokens per session (742 once invoked), scanned A, original, MIT.

A command for managing an agent harness, the set of rules and supporting files that guide coding agents. It offers separate modes for checking health, measuring context costs, filling gaps, revising files, and synchronising setups.

In plain words
What is it for?
Use it to inspect harness configuration, measure context and model costs, propose or apply missing layers, clean up an existing harness, or plan synchronisation with other platforms.
Why use it?
It prevents unclear actions and accidental changes by requiring one explicit mode and keeping measurement, previews, approvals, and changes separate.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex; $skill-name invocation.

Part of the dhpk plugin — 65 skills, 31 commands, 37 agents, 4 hooks shipped together

Good fit Use it to inspect harness configuration, measure context and model costs, propose or apply missing layers, clean up an existing harness, or plan synchronisation with other platforms.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hmj1026/dhpk/harness-govern
View source ↗ hmj1026/dhpk
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.

Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 37 agents, 4 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/hmj1026/dhpk/harness-govern.svg)](https://agentmods.dev/commands/hmj1026/dhpk/harness-govern)
Your own site
<a href="https://agentmods.dev/commands/hmj1026/dhpk/harness-govern"><img src="https://agentmods.dev/badge/commands/hmj1026/dhpk/harness-govern.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 742 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.00028 $0.00742
Opus 5 $0.00014 $0.00371
Sonnet 5 $0.00006 $0.00148
Haiku 4.5 $0.00003 $0.00074

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

Security

Grade A, and why

harness-govern 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 2d 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.

commands/harness-govern.md · 69 lines

How it starts

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

/dhpk:harness-govern

Use this command as the single explicit entry point for harness governance. Select exactly one mode and pass its options through to the canonical skills/harness-govern/SKILL.md procedure. A missing or ambiguous mode is BLOCKED; do not infer a mode or run every mode.

Usage

/dhpk:harness-govern <health|budget|fill|revise|sync> [options]
Mode Use for Boundary
health Diagnose harness configuration and hygiene Read-only unless the mode explicitly receives its approved fix option
budget Measure context cost and model-tier economics Measurement only
fill Propose or backfill missing harness layers Preview first; apply only after approval
revise Trim, deduplicate, and validate an existing harness Dry-run first; apply only after approval
sync Plan, apply, or validate cross-platform harness synchronization Plan and dry-run are read-only; external targets require approval

Contract

  1. Resolve the target harness directory. An explicit --dir wins; ambiguous discovery is BLOCKED.
  2. Record the selected mode, target, action, dry-run state, changed paths, commands, timestamps, and exit codes. Preserve unrelated dirty work.
  3. Load only the selected mode procedure and its named references. Keep the other mode procedures undisclosed until a new mode is explicitly selected.
  4. Keep planned, applied, manual, failed, skipped, unavailable, and not-configured states distinct. Do not claim a write, parity, release, or external result without its own evidence.
  5. End with one terminal status (PASS, FAIL, BLOCKED, NOT_CONFIGURED, or NOT_RUN) and exactly one next action. NOT_RUN is not PASS.

Mode-specific handoff

  • health: report the selected hygiene/configuration checks and any safe fix commands that still require operator approval.
  • budget: report the detected model/window, observed component counts, estimates versus observations, and ranked savings.
  • fill: report the inventory, gaps, selected layers, proposed or written files, and post-write verification.
  • revise: report the baseline, G1–G13 findings, per-fix checks, post-fix checks, and deferred items.
  • sync: report preflight, mapping plan, dry-run/apply state, per-platform validation, and any external target that was not configured.

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 28 tokens per session scan A fc16a76dd464

Subscribe to this mod's changes

harness-govern is a command published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 742 once invoked, about $0.0001 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-09-05.