gaze: Skill for OpenCode

.opencode/skills/testing-patterns/SKILL.md

testing-patterns is a skill for OpenCode from unbound-force/gaze. It costs 12 tokens per session (342 once invoked), scanned A, original, Apache-2.0.

Testing guidance for the Replicator Go project, using Go's standard testing package and isolated temporary databases, directories, and servers. It also describes optional parity tests that compare Go responses with TypeScript test data.

In plain words
What is it for?
Use it when writing or updating database, filesystem, HTTP, Git, and cross-language comparison tests in Replicator.
Why use it?
It keeps tests consistent and prevents one test from depending on another test's files, database state, or running services.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

This is unbound-force/gaze's own configuration. It tells OpenCode how to work on gaze itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gaze configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -tags parity ./test/parity/ -count=1 -v.

Reuse

Borrowing it

Nothing to install: this file belongs to unbound-force/gaze. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/unbound-force/gaze/main/.opencode/skills/testing-patterns/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/unbound-force/gaze

Made for: OpenCode.

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 testing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/unbound-force/gaze/testing-patterns.svg)](https://agentmods.dev/skills/unbound-force/gaze/testing-patterns)
Your own site
<a href="https://agentmods.dev/skills/unbound-force/gaze/testing-patterns"><img src="https://agentmods.dev/badge/skills/unbound-force/gaze/testing-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 342 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.00012 $0.00342
Opus 5 $0.00006 $0.00171
Sonnet 5 $0.00002 $0.00068
Haiku 4.5 $0.00001 $0.00034

Measured 3d ago against content hash 1aa617ff8c90, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

testing-patterns 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.

.opencode/skills/testing-patterns/SKILL.md · 77 lines

What it actually says

Testing Patterns

Go testing conventions for replicator.

Framework

Standard library testing package only. No testify, gomega, or external assertion libraries. Use t.Errorf / t.Fatalf directly.

Test Naming

TestXxx_Description — e.g., TestCreateCell_Defaults, TestReadyCell_PriorityOrder.

Isolation Patterns

Database Tests

store := db.OpenMemory()
defer store.Close()

Every test gets its own in-memory SQLite database. No shared state.

Filesystem Tests

dir := t.TempDir()
// dir is automatically cleaned up

HTTP Tests

srv := httptest.NewServer(handler)
defer srv.Close()

Git Tests

if testing.Short() {
    t.Skip("skipping git test in short mode")
}
dir := t.TempDir()
// exec.Command("git", "init", dir)

Parity Tests

Build tag: //go:build parity

Compare Go response shapes against TypeScript fixtures in test/parity/fixtures/. Run with:

go test -tags parity ./test/parity/ -count=1 -v

Assertions

Use direct comparisons:

if got != want {
    t.Errorf("FunctionName() = %v, want %v", got, want)
}

For slices and structs, use reflect.DeepEqual or compare field by field.

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. 3d ago First seen · 77 lines · 12 tokens per session scan A 1aa617ff8c90

Subscribe to this mod's changes

testing-patterns is a skill published in the GitHub repository unbound-force/gaze (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 342 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

effect-patterns-testing

Effect-TS patterns for Testing. Use when working with testing in Effect-TS applications.

PaulJPhilp/EffectPatterns · 23 tokens

test-patterns

Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable, reliable, and readable test suites. Use when the user asks about writing unit tests, integration tests, or end-to-end…

rohitg00/skillkit · 138 tokens

go-testing

Use when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff. Also use when a user asks to write a test for a Go function, even if they don't mention specific patterns like table-driven tests or subtests. Does…

cxuu/golang-skills · 80 tokens

go-test-implementation

Executable Go falsifiers. Use for test-only changes or non-routine fixtures and harnesses, selecting cases and assertions from accepted behavior during implementation.

Dankosik/go-service-template-rest · 34 tokens

effect-testing

Write comprehensive tests using @effect/vitest for Effect code and vitest for pure functions. Use this skill when implementing tests for Effect-based applications, including services, layers, time-dependent effects, error handling, and property-based testing.

mpsuesser/pi-effect-harness · 49 tokens

effect-concurrency-testing

Test Effect concurrency primitives including PubSub, Deferred, Latch, Fiber coordination, SubscriptionRef, and Stream. Use this skill when testing concurrent effects, event-driven systems, or fiber coordination.

mpsuesser/pi-effect-harness · 43 tokens