kagent is a Kubernetes-native framework for building, deploying, and managing AI agents as Kubernetes resources. It is intended for teams operating agents and tools alongside Kubernetes workloads, with catalogue entries supporting its agent-management workflows.
Borrowing it
Nothing to install: this file belongs to kagent-dev/kagent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kagent-dev/kagent/main/.agents/skills/given-when-assert-that/SKILL.mdgit clone --depth 1 https://github.com/kagent-dev/kagentWrote 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/kagent-dev/kagent/given-when-assert-that)<a href="https://agentmods.dev/skills/kagent-dev/kagent/given-when-assert-that"><img src="https://agentmods.dev/badge/skills/kagent-dev/kagent/given-when-assert-that/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.
<a href="https://agentmods.dev/skills/kagent-dev/kagent/given-when-assert-that"><img src="https://agentmods.dev/badge/skills/kagent-dev/kagent/given-when-assert-that.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00036 | $0.00818 |
| Opus 5.5 | $0.00014 | $0.00327 |
| Sonnet 5.5 | $0.00007 | $0.00164 |
| Haiku 4.5 | $0.00004 | $0.00082 |
Grade A, and why
given-when-assert-that 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 3d 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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Given/When/AssertThat Go tests
Use this skill when writing Go behavior tests, including tests for new features and bug fixes. Keep the tests executable with go test. Do not add a BDD runner, .feature files, code generation, or a generic step registry.
Choose behavior before writing test code
- Identify the user-visible contract and the boundary that proves it: an HTTP or gRPC response, handler reachability, caller identity, persisted state, or emitted event. Do not test only a helper when the behavior depends on listener wiring, serialization, or persistence.
- Start with a working case and the few failure or boundary cases that could change the outcome. Include missing, empty, malformed, and fallback inputs only when the contract treats them differently. Set up any state that a negative assertion depends on, so the test cannot pass against an empty or unwired system.
- For each case, write down
Given <relevant state>, when <one action>, assert that <observable outcome>. Make the assertion specific enough to fail if the behavior is absent; avoid tests that just check constants, mocks, or implementation steps.
Write the scenario as an ordinary Go test
- Give each test function a short behavior name. When subtests help distinguish cases, give each
t.Runa sentence:Given <precondition>, when <one action with its input variant>, assert that <observable outcome>. Do not add a subtest or fixture just to satisfy the naming pattern. - Use an eventive When, not a stative one. "When a caller sends an RPC without a token" names the stimulus. "When an RPC has no credentials" describes state. Put stable state in Given.
- Make the name match the actual input. "No valid token" includes missing, malformed, and expired tokens. Do not use it for a case that sends only a missing token.
- Keep variants in a
scenariosmatrix when they share an action and assertion. Give distinct behaviors separate named subtests. Do not branch assertions on expected outcomes to force unlike cases into one table.
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.
- 3d ago First seen · 45 lines · 36 tokens per session scan A 04bc3de3d3ce
given-when-assert-that is a skill published in the GitHub repository kagent-dev/kagent (4,165 stars, last pushed today), licensed Apache-2.0. It adds 36 tokens to every session and 818 once invoked, about $0.0001 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-11-03.
given-when-assert-that compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| given-when-assert-thatkagent-dev/kagent | Skill | 4.2k | today | Apache-2.0 | A | 36 | Claude Code, Codex |
| unit-testjohnqtcg/awesome-skills | Skill | 30 | 28d ago | MIT | A | 100 | Claude Code |
| fuzzing-testjohnqtcg/awesome-skills | Skill | 30 | 28d ago | MIT | A | 74 | Claude Code |
| golang-testing-patternscodeready-toolchain/tarsy | Skill | 10 | yesterday | Apache-2.0 | A | 47 | Cursor |
| test-gosergeyklay/.agents | Skill | 6 | 2d ago | Apache-2.0 | A | 109 | Claude Code, Codex |
| go-testing-with-testifyn-n-code/n-n-code-skills | Skill | 4 | 5d ago | MIT | A | 79 | Claude Code, Codex |
| golang-testingalexastrum/skl | Skill | 10 | 4mo ago | MIT | A | 115 | Claude Code |