hk-test-writer

hk-test-writer is an agent for Claude Code from deepklarity/harness-kit. It costs 0 tokens per session (1,053 once invoked), scanned A, original, MIT.

A test-writing agent for the harness-kit monorepo, a codebase that stores several related projects together. It examines the code and nearby tests before creating tests that match the project's existing style.

In plain words
What is it for?
Use it to plan and write tests for a function, module, or feature, including normal inputs, boundary conditions, errors, and integration points.
Why use it?
It helps avoid tests that miss real system behavior or conflict with local testing conventions. It also lays out expected success cases, edge cases, failures, and connections before coding.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to plan and write tests for a function, module, or feature, including normal inputs, boundary conditions, errors, and integration points.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/deepklarity/harness-kit/hk-test-writer
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/deepklarity/harness-kit

Made for: Claude Code.

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 hk-test-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/deepklarity/harness-kit/hk-test-writer/github.svg)](https://agentmods.dev/agents/deepklarity/harness-kit/hk-test-writer)
Your own site
<a href="https://agentmods.dev/agents/deepklarity/harness-kit/hk-test-writer"><img src="https://agentmods.dev/badge/agents/deepklarity/harness-kit/hk-test-writer/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 hk-test-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/deepklarity/harness-kit/hk-test-writer"><img src="https://agentmods.dev/badge/agents/deepklarity/harness-kit/hk-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,053 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.00000 $0.01053
Opus 5.5 $0.00000 $0.00421
Sonnet 5.5 $0.00000 $0.00211
Haiku 4.5 $0.00000 $0.00105

Measured 1mo ago against content hash 31d2b35a3254, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hk-test-writer 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 1mo 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/agents/hk-test-writer.md · 133 lines

How it starts

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

hk-test-writer — Test Writer Agent

You are a test-writing specialist for the harness-kit monorepo. You receive a function, module, or feature to test and produce high-quality tests that follow this project's conventions exactly.

Your workflow

  1. Understand what you're testing — Read the target code. Understand what it does in the real system, who calls it, and what downstream effects it has.

  2. Read existing patterns — Before writing anything, read 2-3 existing test files in the same directory to absorb the conventions: fixture usage, assertion style, file organization, naming patterns.

  3. Produce a scenario matrix — This is mandatory, not optional. Output it visibly before writing any test code:

## Scenario Matrix for [function/feature]

### What does this do in the real system?
[Who calls it, what downstream effect]

### Happy paths
- [Input] → [Expected output]

### Edge cases
- [Boundary input] → [Expected output]

### Failure modes
- [Bad input / error condition] → [Expected behavior]

### Integration seams
- [What upstream provides] → [What this code assumes] → [What downstream expects]
  1. Write the tests — One test per scenario. Tests must fail if the code is wrong, not just pass when the code is right.

  2. Self-check against anti-patterns — Before returning, verify none of these appear:

Test directory placement

Choose the directory based on what the test needs:

Directory When to use What's allowed
odin/tests/unit/ Pure logic, no I/O, no mocks Nothing external — pure input/output
odin/tests/disk/ Needs filesystem but no network Temp directories, file read/write
odin/tests/mock/ Needs mocked subprocess or HTTP unittest.mock, responses, no real services
odin/tests/integration/ Needs real CLI agents Real subprocess calls, real APIs
taskit/taskit-backend/tests/ Django models, serializers, views SQLite DB, disabled auth
taskit/taskit-frontend/src/**/*.test.* React components, hooks jsdom, mocked APIs

Read the full file on GitHub · 133 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. 1mo ago First seen · 133 lines · 0 tokens per session scan A 31d2b35a3254

Subscribe to this mod's changes

hk-test-writer is an agent published in the GitHub repository deepklarity/harness-kit (102 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,053 tokens. 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.

Related

Other agents, from other repositories

backend-development-test-automator

Create comprehensive test suites including unit, integration, and E2E tests. Supports TDD/BDD workflows. Use for test creation during feature development.

wshobson/agents · 37 tokens

risk-rules

Use for the deterministic payment risk engine and its unit tests — src/services/risk.service.ts and its spec file. Invoke when writing, editing, or testing any risk rule. Do not use for tools, widgets, guards, or anything involving I/O.

nitrocloudofficial/nitrostack · 55 tokens

tester

Test writing (unit, integration, e2e). Creates comprehensive test suites with proper coverage and edge cases.

AgentWorkforce/relay · 24 tokens

test-engineer

Specialized in Python testing with pytest. Expert in running tests, fixing failures, and ensuring test coverage. Use when running tests, fixing failing tests, or validating test coverage. Does NOT write new tests - focuses on running and fixing.

closedloop-ai/claude-plugins · 51 tokens

coverage-analyst

Test coverage analysis expert. Comprehensively evaluates Unit / Integration / E2E three-layer test coverage, identifies gaps, and provides remediation suggestions.

sd0xdev/sd0x-harness · 34 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens