harness

A guide to the harness around a coding agent: the instructions that prevent mistakes and the automated checks that catch them. CI means automated testing and checking of code changes.

In plain words
What is it for?
Use it when setting up agent context, responding to formatting, lint, test, architecture, or security failures, and verifying Rust changes before committing.
Why use it?
It gives the agent a consistent response when a check fails, so it can understand the error, make the smallest fix, and run the check again.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/d-oit/rust-2026-template/harness
Any agent
npx skills add d-oit/rust-2026-template --skill harness
Clone the repo
git clone --depth 1 https://github.com/d-oit/rust-2026-template

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00068 $0.00765
Opus 5 $0.00034 $0.00382
Sonnet 5 $0.00014 $0.00153
Haiku 4.5 $0.00007 $0.00076

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

Security

Grade A, and why

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

.agents/skills/harness/SKILL.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.

Skill: harness

What Is the Harness

Agent = Model + Harness. The harness is the system of feedforward guides (what to do before coding) and feedback sensors (what catches violations after coding). It has two axes:

  • Feedforward (guides): Context, constraints, conventions that prevent errors before they happen.
  • Feedback (sensors): Automated checks that fire after code changes, providing structured error output.

The harness has two modes:

  • Computational: Deterministic checks (fmt, clippy, deny) — always trust the output.
  • Inferential: LLM-based guidance (skill docs, agent context) — direction, not commands.

Sensor Response Protocol

When a computational sensor fires:

  1. Read the full error message — it includes a fix hint.
  2. Classify the error: fmt / lint / test / arch / security.
  3. Apply the minimal fix — do not refactor unrelated code.
  4. Re-run the specific sensorcargo fmt, cargo clippy, etc.
  5. Only commit when the sensor is green.
  6. Write a metrics event to .agents/events/YYYY/MM/DD/ per the metrics-reporter skill.

Sensor Quick Reference

Sensor Command Config Stage
fmt cargo fmt --all -- --check .pre-commit-config.yaml pre-commit
clippy cargo clippy --all-targets --all-features -- -D warnings .clippy.toml, .pre-commit-config.yaml pre-commit + CI
deny cargo deny check deny.toml pre-commit + CI
nextest cargo nextest run Cargo.toml CI
mutants cargo mutants [workspace.metadata.cargo-mutants] in Cargo.toml CI weekly
arch_fitness cargo test --test arch_fitness tests/arch_fitness.rs CI
insta snapshots cargo insta review tests/behaviour_harness.rs CI
gitleaks gitleaks detect .gitleaks.toml CI

Steering Loop

When any sensor fires repeatedly (>2 times in one sprint):

  1. Identify the root cause category (maintainability / architecture / behaviour).
  2. Update the corresponding feedforward guide to prevent recurrence.
  3. If no guide exists, create one in .agents/skills/ using the skill-creator skill.
  4. Document the update in CHANGELOG.md.

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 · 68 tokens per session scan A ed8e7b6d1797

Subscribe to this mod's changes

harness is a skill published in the GitHub repository d-oit/rust-2026-template (10 stars, last pushed 3d ago), licensed MIT. It adds 68 tokens to every session and 765 once invoked, about $0.0003 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 skills, from other repositories

NovaForge

NovaForge 通用知识笔记模板 — 将任意学科/项目的知识体系整理为结构化笔记。LaTeX+Typst+Markdown三版本,支持章节笔记(7步结构)、期末复习(真题分类+留白练习)、考研(7步+考研真题)、考公(行测/申论/面试)、科研(文献+笔记+方法)、项目(架构+进度+复盘)六种模式,适配考研/考公/专业课/科研/项目/竞赛。.

SiriusFzh/NovaForge · 129 tokens

plumb-line-method

Use when a builder wants to learn or be reminded of the plumb-line method — the discipline of epistemic honesty enforced by tooling. Teaches the thesis, the nine portable principles, the maturity vocabulary, and the one-line test. Pure knowledge; takes no actions.

slopstopper/plumb-line · 59 tokens

learn

Capture a learning (bug, workaround, pattern, gotcha) and save to persistent memory. Use when the user says "learn", "save this", "remember this", "note this", "record this", "never forget this", or when a non-obvious bug fix, workaround, or integration pattern is discovered during development.

ivanhoinacki/team-exp-claude-config · 69 tokens

capture-lessons

Ship and capture lessons workflow. Creates the PR, updates lessons learned, updates documentation, generates the sprint retrospective, and updates the backlog. Use at the end of a sprint cycle, or when the user says "ship", "capture", "lessons", "retro", "retrospective", "wrap up", or "done with this sprint". Also use…

rbah31/claude-code-workflow · 100 tokens

full-sprint

Orchestrates a complete sprint cycle autonomously. Each phase runs as a separate claude -p session for context isolation. Use when the sprint-directive.md is ready and the sprint should execute end-to-end. Also use when the user says "run a full sprint", "execute the sprint", "build everything", "autonomous sprint"…

rbah31/claude-code-workflow · 79 tokens

sprint-plan

Sprint planning workflow. Creates a structured plan from the backlog with tasks, acceptance criteria, dependencies, and risks. Use when starting a new sprint, planning work, or when the user says "plan", "sprint", "what should we work on", or "next sprint". Always use this skill to start a sprint cycle — never plan…

rbah31/claude-code-workflow · 75 tokens