given-when-assert-that
Skill4.2k starsChanged 5 days agoApache-2.0View on GitHub
Design and write Go behavior tests as readable Given/When/AssertThat scenarios with observable assertions, using ordinary Go tests without a BDD framework.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about kagent-dev/kagent
- cncf/sandbox“[Sandbox] kagent”GitHub · Apr 3, 2025 · 69 reactions
- cncf/toc“[Incubation] kagent Incubation Application”GitHub · Dec 2, 2025 · 51 reactions
- A Hacker News story“Kagent: Kubernetes native framework for building AI agents”Hacker News · Mar 17, 2025 · 4 points
- @omerberatsezer.bsky.social“#Kagent uses #AgentSubstrate as its runtime infrastructure in its current 1.x architecture. kagent is a …”Bluesky · Oct 29, 2026 · 1 likes
- google/adk-go“Add EventCompaction support to EventActions and compaction filtering in contents_processor.go”GitHub · Jun 10, 2026 · 1 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub, Hacker News and Bluesky (52 times).
On GitHub · 50
- Apr 3, 2025[Sandbox] kagent — cncf/sandbox69 reactions · 26 comments
- Dec 2, 2025[Incubation] kagent Incubation Application — cncf/toc51 reactions · 1 comment
- Jun 10, 2026Add EventCompaction support to EventActions and compaction filtering in contents_processor.go — google/adk-go1 reaction · 7 comments
- Nov 18, 2025Native AI Agent Kit — pacoxu/AI-Infra1 reaction · 10 comments
- Apr 29, 2025Support kagent.dev agents — artifacthub/hub1 reaction · 13 comments
45 more on GitHub
- Nov 6, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent-crds ( 0.10.5 → 0.10.6 ) — rwlove/home-ops0 reactions · 1 comment
- Nov 6, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent ( 0.10.5 → 0.10.6 ) — rwlove/home-ops0 reactions · 1 comment
- Nov 6, 2026Update kagent-crds Docker tag to v0.10.6 — Tomythical/homelab0 reactions
- Nov 6, 2026⬆️ Update kagent-crds Docker tag to v0.10.6 — bakseter/homelab0 reactions · 1 comment
- Nov 6, 2026⬆️ Update kagent Docker tag to v0.10.6 — bakseter/homelab0 reactions · 1 comment
- Nov 6, 2026chore(deps): update kagent-crds docker tag to v0.10.6 — bdfrost/argocd0 reactions
- Nov 6, 2026fix(container): update kagent-crds ( 0.10.5 → 0.10.6 ) — ekenheim/home-ops-upgrade0 reactions · 2 comments
- Nov 6, 2026fix(container): update kagent ( 0.10.5 → 0.10.6 ) — ekenheim/home-ops-upgrade0 reactions · 1 comment
- Nov 5, 2026kagent 0.10.6 — Homebrew/homebrew-core0 reactions · 1 comment
- Nov 5, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent-crds ( 0.10.5 → 0.10.6 ) — frecklelabs/k8s0 reactions
- Nov 5, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent ( 0.10.5 → 0.10.6 ) — frecklelabs/k8s0 reactions
- Nov 5, 2026chore(kagent-crds): sync CRDs to v0.10.6 — spnngl/charts0 reactions
- Nov 5, 2026chore(deps): Update ghcr.io/kagent-dev/kagent/helm/kagent-crds Docker tag to v0.10.5 — Apocrathia/homelab0 reactions · 1 comment
- Nov 5, 2026chore(deps): Update ghcr.io/kagent-dev/kagent/helm/kagent Docker tag to v0.10.5 — Apocrathia/homelab0 reactions · 1 comment
- Nov 5, 2026chore(deps): Update ghcr.io/kagent-dev/kagent/controller Docker tag to v0.10.5 — Apocrathia/homelab0 reactions · 1 comment
- Nov 5, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent-crds ( 0.10.4 → 0.10.5 ) — rwlove/home-ops0 reactions · 1 comment
- Nov 5, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent ( 0.10.4 → 0.10.5 ) — rwlove/home-ops0 reactions · 1 comment
- Nov 4, 2026chore(kagent-crds): sync CRDs to v0.10.5 — spnngl/charts0 reactions
- Nov 4, 2026⬆️ Update kagent-crds Docker tag to v0.10.5 — bakseter/homelab0 reactions · 1 comment
- Nov 4, 2026⬆️ Update kagent Docker tag to v0.10.5 — bakseter/homelab0 reactions · 1 comment
- Nov 4, 2026Update kagent-crds Docker tag to v0.10.5 — Tomythical/homelab0 reactions
- Nov 4, 2026Update kagent Docker tag to v0.10.5 — Tomythical/homelab0 reactions
- Nov 4, 2026fix(container): update kagent-crds ( v0.10.4 → 0.10.5 ) — ekenheim/home-ops-upgrade0 reactions · 2 comments
- Nov 4, 2026fix(container): update kagent ( v0.10.4 → 0.10.5 ) — ekenheim/home-ops-upgrade0 reactions · 2 comments
- Nov 4, 2026kagent 0.10.5 — Homebrew/homebrew-core0 reactions · 1 comment
- Nov 3, 2026Feat: Built-in OIDC authentication with configurable identity provider and browser sign-in — agentregistry-dev/agentregistry0 reactions
- Nov 2, 2026[Automated] Draft docs (kagent): feat(sandbox): adopt env guest service redesign (+1 related) — kagent-dev/website0 reactions · 1 comment
- Nov 2, 2026[Automated] Draft docs (kagent): feat(auth): support human and machine principals (+1 related) — kagent-dev/website0 reactions · 1 comment
- Nov 1, 2026[Automated] Draft docs (kagent): feat(auth): support human and machine principals (+1 related) — christian-posta/kagent-website0 reactions
- Oct 28, 2026[AAIF][kagent 1.x] MCP, Agent Skills and local Metal LLM inference integration roadmap — dasomel/kubemetal0 reactions
- Oct 27, 2026feat(skills): carry kagent-dev/kagent#3099 — private Git skill sources (Planeo fork, alpha17) — planeodev/kagent0 reactions · 5 comments
- Oct 24, 2026fix(adk): remote A2A card auth + no caller-tenant forwarding — carried onto planeo/v1.0.0-alpha17 (+ golang-adk image CI) — planeodev/kagent0 reactions · 1 comment
- Oct 22, 2026Update kagent to v0.10.4 — BillyMichael/local-developer-platform0 reactions
- Oct 22, 2026chore(kagent-crds): sync CRDs to v0.10.4 — spnngl/charts0 reactions
- Oct 21, 2026kagent 0.10.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Oct 21, 2026Dependency Dashboard — giantswarm/kagent-extensions0 reactions
- Oct 19, 2026[Automated] Draft docs (kagent): api: Require Harness references for Agents (+2 related) — kagent-dev/website0 reactions · 1 comment
- Oct 15, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent-crds ( 0.10.1 → 0.10.4 ) — frecklelabs/k8s0 reactions
- Oct 15, 2026fix(container): update image ghcr.io/kagent-dev/kagent/helm/kagent ( 0.10.1 → 0.10.4 ) — frecklelabs/k8s0 reactions
- Oct 14, 2026Add kagent/kmcp CRDs — datreeio/CRDs-catalog0 reactions · 1 comment
- Oct 13, 2026[Automated] Draft docs (kagent): feat: add runtime revision GC backlog and failure metrics (+2 related) — kagent-dev/website0 reactions · 1 comment
- Oct 10, 2026S0 Spike: kagent 1.x and Agent Substrate on k3d — dackota/agentic-campaign-engine0 reactions · 1 comment
- Oct 8, 2026test: TestServe's 1 s process wait flakes on a loaded runner — giantswarm/kagent-upstream0 reactions · 1 comment
- Oct 2, 2026kagent 0.10.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 24, 2026Telemetry docs: rewrite for SDK-spec OTEL variables and semconv metrics (targets 1.0.0-alpha4) — kagent-dev/website0 reactions · 3 comments
On Hacker News · 1
- Mar 17, 2025Kagent: Kubernetes native framework for building AI agents4 points
On Bluesky · 1
- Oct 29, 2026#Kagent uses #AgentSubstrate as its runtime infrastructure in its current 1.x architecture. kagent is a #Kubernetes native framework for… — @omerberatsezer.bsky.social1 likes and repost · 1 reply
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- proto/AGENTS.mdAGENTS.md
- ui/AGENTS.mdAGENTS.md
- gh-create-issueSkill
- gh-create-prSkill
- kagent-devSkill
- kagentSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when writing Go behavior tests, including tests for new features and bug fixes.
- Distinctive: line 19
Use an eventive When, not a stative one.
- Very specific: line 21
Keep variants in a scenarios matrix when they share an action and assertion.
- Distinctive: line 25
Keep setup local for a single case.
- Distinctive: line 40
If updating an existing test, preserve its behavior, assertions, cleanup, and meaningful edge cases.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Keep the invocation readable
Keep setup local for a single case. When several cases share substantial setup or transport mechanics, put test functions and scenario matrices above reusable helpers and create a fresh fixture inside each subtest unless shared state is immutable and the cases cannot interfere.
func TestProtectedEndpoint(t *testing.T) {
t.Run("Given a protected endpoint, when a request has no token, assert that dispatch is rejected", func(t *testing.T) {
newAuthFixture(t).
GivenProtectedEndpoint().
WhenRequestWithoutCredentials().
AssertThatRequestIsRejectedBeforeDispatch()
})
}Given sets up the invariant, When performs the action, and AssertThat checks the result at the boundary. Keep an existing Options-based fixture setup when it makes configuration choices explicit; do not flatten it into raw transport calls for presentation. Pair this rejection case with a valid-token case proving the handler is reachable; otherwise a permanently unwired handler could pass the negative test. Use stage methods only when they remove repeated mechanics.
If updating an existing test, preserve its behavior, assertions, cleanup, and meaningful edge cases. Do not rewrite neighboring tests merely for presentation.
Check that the tests prove the contract
Run gofmt on changed Go files and the smallest go test command that exercises every new case. Run the repository's applicable lint command. For a regression test, confirm it fails against the broken behavior and passes with the fix; for a new feature, confirm each assertion observes the intended boundary rather than a fixture's own return value. Replace / in dynamic names so testing.T.Run does not split a sentence into nested subtests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

