agent-harness-reference

agent-harness-reference is a skill for Claude Code from rjmurillo/ai-agents. It costs 122 tokens per session (4,838 once invoked), scanned A, original, MIT.

A reference guide to the hook rules used by Claude Code and GitHub Copilot CLI, including when hooks run, what data they receive, and how they report results.

In plain words
What is it for?
Use it when changing hook configuration, dispatchers, generators, or runtime tests, or when checking how the two command-line tools handle hooks.
Why use it?
It prevents changes based on outdated or assumed hook behavior by keeping official documentation and tested runtime observations in one place.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths; mentions .claude-plugin; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit Use it when changing hook configuration, dispatchers, generators, or runtime tests, or when checking how the two command-line tools handle hooks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add rjmurillo/ai-agents
Claude Code
/plugin install project-toolkit

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 5 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 agent-harness-reference

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/agent-harness-reference"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/agent-harness-reference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,838 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.00122 $0.04838
Opus 5.5 $0.00049 $0.01935
Sonnet 5.5 $0.00024 $0.00968
Haiku 4.5 $0.00012 $0.00484

Measured 6d ago against content hash 21df514f3709, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-harness-reference 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.

.claude/skills/agent-harness-reference/SKILL.md · 374 lines

How it starts

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

Agent Harness Reference

Use this reference before changing a hook, dispatcher, generator, hook config, or runtime test. Do not repeat web research unless the refresh rules below say the recorded contract is stale.

Triggers

  • harness contract
  • copilot cli hook behavior
  • hook payload format
  • cross-harness hook change
  • refresh hook evidence

Process

  1. Read references/official-hook-contracts.md for the authoritative row.
  2. Read references/probe-evidence.md only for versioned runtime evidence.
  3. Apply the repository policy in this file and the cited ADRs.
  4. If a refresh condition applies, update sources, probes, tests, mirrors, and memory in the same change.
  5. Mark an absent official answer DOCS SILENT. Do not infer it from Claude.

Authority Order

  1. references/official-hook-contracts.md records current official sources, pinned source commits, exact event sets, output fields, and docs gaps.
  2. This file states the repository decisions derived from those contracts.
  3. references/probe-evidence.md records versioned runtime observations.
  4. ADR-068 and ADR-071 record the dispatcher and runtime verification choices.
  5. Serena memories are retrieval aids. They do not override the sources above.

If two sources disagree, use the official contract for authored behavior. Keep the conflicting probe as versioned evidence. Do not erase either side.

Repository Loading Surfaces

The repository keeps one canonical skill tree and one generated Copilot tree:

  • .claude/skills/agent-harness-reference/ owns this contract.
  • src/copilot-cli/skills/agent-harness-reference/ is generated from it.
  • .github/skills/ is not a repository shipping surface. Do not create it to mirror this skill.
  • In the rjmurillo/ai-agents repository, AGENTS.md, src/claude/AGENTS.md, .github/AGENTS.md, .github/copilot-instructions.md, src/AGENTS.md, and templates/AGENTS.md route authoring work here. An installed plugin ships none of them and does not need to; they are maintainer routing, not a runtime dependency of this skill.

Read the full file on GitHub · 374 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · +7 tokens per session 21df514f3709
  2. 20d ago Changed · +4 lines cb8244315063
  3. 22d ago Changed · +6 lines 9364289a0630
  4. 24d ago Changed 3b3ca6390bf8
  5. 1mo ago First seen · 364 lines · 115 tokens per session scan A e4e7e7c70b07

Subscribe to this mod's changes

agent-harness-reference is a skill published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 122 tokens to every session and 4,838 once invoked, about $0.0005 per session on Opus 5.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-03.