Skip to content
Back to skills

Golem Contract Tests

ASecurity

Add or review Golem Go tests for agent runs, model adapters, tool execution, decoding, error handling, retries, and cancellation. Use whenever behavior changes or a public contract is introduced.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentsgo

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add abubakarsiddik31/golem --skill golem-contract-tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Golem Contract Tests?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Golem Contract Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/abubakarsiddik31-golem-contract-tests/badge)](https://www.skillsdirectory.com/skills/abubakarsiddik31-golem-contract-tests)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: golem-contract-tests
description: Add or review Golem Go tests for agent runs, model adapters, tool execution, decoding, error handling, retries, and cancellation. Use whenever behavior changes or a public contract is introduced.
---

# Golem contract tests

Use deterministic fakes to test framework behavior without a network or provider credential. Read `references/test-matrix.md`, then add the smallest tests that protect the changed contract.

## Workflow

1. Identify the caller-visible contract: request, result evidence, context propagation, error identity, and side effects.
2. Write a fake at the Golem-owned port that captures its input and returns controlled output or error.
3. Assert the exact normalized request and ordered result evidence, not implementation-private fields.
4. Test the primary failure stage with `errors.Is` or `errors.As` to prove causal error preservation.
5. Test cancellation propagation for any model, tool, stream, retry, or goroutine behavior.
6. Run `gofmt`, `go test ./...`, and `go vet ./...`.

## Rules

- Never make core unit tests depend on a live model, network, clock, or environment variable.
- Avoid assertions that require sleeps or scheduling luck.
- Keep adapter integration tests in the adapter package and make them opt-in.
- Add a regression test for every fixed bug before or with the fix.

Do not call a test complete merely because it covers lines; it must prove the behavior callers rely on.

Files in this skill

  • SKILL.md1.4 KB
  • agents/openai.yaml202 B
  • references/test-matrix.md845 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.