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.
npx skills add deepklarity/harness-kit --skill hk-refinegit clone --depth 1 https://github.com/deepklarity/harness-kitWrote 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.
[](https://agentmods.dev/skills/deepklarity/harness-kit/hk-refine)<a href="https://agentmods.dev/skills/deepklarity/harness-kit/hk-refine"><img src="https://agentmods.dev/badge/skills/deepklarity/harness-kit/hk-refine.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00106 | $0.02261 |
| Opus 5 | $0.00053 | $0.01130 |
| Sonnet 5 | $0.00021 | $0.00452 |
| Haiku 4.5 | $0.00011 | $0.00226 |
Grade A, and why
hk-refine 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/hk-refine — Iterative Output Refinement
You have an open loop: something produced output, the output isn't good enough, and you need to systematically improve it. This skill closes that loop.
The core discipline: everything lives on disk, not in conversation context. The scratch directory is the organized record of what was tried, what worked, and why. Subagents read from disk, write to disk, and report back in 2-3 line summaries. The main conversation only holds the current hypothesis and verdict — never full outputs.
Context
<loop_context> $ARGUMENTS </loop_context>
If the context above is empty or unclear, ask the user:
- What produced the output? (command, prompt, pipeline step)
- What's wrong with it? (vague is ok — "it's not good enough" is a valid start)
- Where should the scratch directory live? (suggest
temp_reflections/ortemp_loop/)
The Scratch Directory
This is the product. Not temp files — the organized log of the refinement process.
<scratch_dir>/
├── loop.md # Live loop state (see template below)
├── baseline/
│ ├── output.md # Original output that needs improvement
│ ├── critique.md # Structured critique of what's wrong
│ └── run_command.txt # Exact command/process that produced the output
├── iter-1/
│ ├── hypothesis.md # What to change and why
│ ├── changes.md # What was actually changed (with file paths and diffs)
│ ├── output.md # New output after changes
│ ├── comparison.md # Before vs after, structured
│ └── verdict.md # Better / worse / mixed — with evidence
├── iter-2/
│ └── ...
└── summary.md # Written when loop closes
loop.md template
This file is the single source of truth for where the loop is. Read it at the start of every iteration. Update it after every verdict.
# Close-the-Loop: [short description]
## Target
What we're improving: [one line]
Run command: [the exact command to re-run]
Quality signal: [how we know it's better — specific, measurable if possible]
## Current State
Iteration: [N]
Best so far: [baseline | iter-N]
Status: [observing | hypothesizing | changing | running | comparing | closed]
## Hypothesis Log
- iter-1: [hypothesis] → [verdict: better/worse/mixed]
- iter-2: [hypothesis] → [verdict]
- ...
## What We've Learned
- [Accumulated insights that carry forward — things that definitely help or definitely don't]
## Next
[What to try next, or "CLOSED: [reason]"]
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.
- 8d ago First seen · 251 lines · 106 tokens per session scan A 919dd8cb01f9
hk-refine is a skill published in the GitHub repository deepklarity/harness-kit (96 stars, last pushed 1mo ago), licensed MIT. It adds 106 tokens to every session and 2,261 once invoked, about $0.0005 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-30.
Other skills, from other repositories
agent-crdt-synchronizer
Agent skill for crdt-synchronizer - invoke with $agent-crdt-synchronizer.
agent-topology-optimizer
Agent skill for topology-optimizer - invoke with $agent-topology-optimizer.
flow-nexus-platform
Comprehensive Flow Nexus platform management - authentication, sandboxes, app deployment, payments, and challenges.
agent-benchmark-suite
Agent skill for benchmark-suite - invoke with $agent-benchmark-suite.
agent-migration-plan
Agent skill for migration-plan - invoke with $agent-migration-plan.
agent-performance-monitor
Agent skill for performance-monitor - invoke with $agent-performance-monitor.