Golang Testing
antoniopaya22/go-rest-template
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
Adds a new Go fuzz target to remindb following its seed-corpus discipline: one target per logical surface, discovered automatically by its FuzzXxx function name.
$ npx skills add radimsem/remindb --skill add-fuzz-target -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install radimsem/remindb add-fuzz-target --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/add-fuzz-target .claude/skills/add-fuzz-target && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .claude/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-targetType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add radimsem/remindb --skill add-fuzz-target -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install radimsem/remindb add-fuzz-target --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/add-fuzz-target .agents/skills/add-fuzz-target && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .agents/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add radimsem/remindb --skill add-fuzz-target -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install radimsem/remindb add-fuzz-target --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/add-fuzz-target .cursor/skills/add-fuzz-target && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .cursor/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/radimsem/remindb.git --path .claude/skills/add-fuzz-target--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add radimsem/remindb --skill add-fuzz-target -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install radimsem/remindb add-fuzz-target --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/add-fuzz-target .gemini/skills/add-fuzz-target && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .gemini/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install radimsem/remindb add-fuzz-targetInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add radimsem/remindb --skill add-fuzz-target -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/add-fuzz-target .github/skills/add-fuzz-target && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .github/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add radimsem/remindb --skill add-fuzz-target -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install radimsem/remindb add-fuzz-target --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/radimsem/remindb.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/add-fuzz-target .opencode/skills/add-fuzz-target && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-fuzz-target" agent skill from https://github.com/radimsem/remindb/tree/dev/.claude/skills/add-fuzz-target into .opencode/skills/add-fuzz-target/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-fuzz-target", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-fuzz-targetAdds a new Go fuzz target to remindb following its seed-corpus discipline: one target per logical surface, discovered automatically by its FuzzXxx function name.
The skill covers adding a FuzzXxx(f *testing.F) function to remindb's parser, query, transformer, compiler or temperature code. A project script auto-discovers any function matching the Fuzz prefix through go test -list, so naming is the only registration step, and a new target is appended to an existing fuzz_test.go file in its package rather than creating a second file when one already exists for that package. It warns against multiplexing two unrelated functions into one target, since Go's fuzzer mutates the whole input tuple as a unit and combining surfaces dilutes coverage.
Its seed-selection discipline treats each seed as a shape worth starting the mutator from rather than an attempt to enumerate valid inputs, and lists the shapes worth covering: a happy-path baseline, an empty input for bounds checks, a malformed input for the decoder's error path, a UTF-8 boundary case for multi-byte slicing, a structurally extreme case like deep nesting, and numeric extremes such as infinity, NaN or a value exactly at a parameterized limit.
Read from SKILL.md and the folder at commit 977b31c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
goFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
remindb Fuzz Target Author loads about 1.7k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 682 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from radimsem/remindb at commit 977b31c, republished under its MIT licence (© radimsem). 682 words, ~1,712 tokens.
.claude/skills/add-fuzz-target/SKILL.md (or your agent's skills folder).remindb fuzzes parser, query, transformer, compiler, and temperature code. The fuzz harness is whatever Go's testing.F gives you — there's no project-specific framework — but the seed-corpus discipline is project convention worth getting right. scripts/fuzz.sh auto-discovers any Fuzz* function via go test -list='^Fuzz', so naming your function FuzzXxx is the only registration needed.
Two files at most.
| File | What changes |
|---|---|
pkg/<package>/fuzz_test.go | New file or extend existing — FuzzXxx(f *testing.F) |
pkg/<package>/testdata/fuzz/<FuzzXxx>/ | Auto-managed by Go fuzz; commit any minimization corpus crashes find here |
If pkg/<package>/fuzz_test.go already exists (it does for parser, query, transformer, compiler, temperature), append; don't make a second file.
Mirror pkg/parser/fuzz_test.go and pkg/temperature/fuzz_test.go. The shape is uniform:
func FuzzExample(f *testing.F) {
// Seed corpus — see "Seed selection" below.
f.Add(input1, input2)
// ... more f.Add lines, each one shape ...
f.Fuzz(func(t *testing.T, input1 T1, input2 T2) {
result, err := YourFunc(input1, input2)
// Invariants — see "Invariant assertions" below.
if err != nil {
return // errors are fine; panics are not
}
if !invariantHolds(result) {
t.Errorf("invariant violated: ...")
}
})
}Two rules:
FuzzXxx. scripts/fuzz.sh greps for ^Fuzz in go test -list output. Anything else is invisible.A fuzz seed says "this is a shape worth starting from." The fuzzer mutates from there. The point isn't to enumerate all valid inputs; it's to give the mutator a head start on every category of structural variation. Aim for one seed per shape:
| Shape | Why it matters | Example |
|---|---|---|
| Happy path | Baseline — proves the harness wires up correctly | f.Add("doc.md", []byte("# Hello")) |
| Empty input | Off-by-one and bounds-check guard | f.Add("file.md", []byte{}) |
| Malformed | Decoder error path | f.Add("file.json", []byte("{unclosed")) |
| UTF-8 boundary | Mid-byte slicing, multi-byte boundary | f.Add("file.md", []byte{0xe3}) |
| Structural extreme | Deep nesting, large counts | f.Add("file.json", []byte("{\"a\":{\"b\":{\"c\":\"deep\"}}}")) |
| Numeric extreme (numeric inputs) | Inf, NaN, MaxFloat, MaxInt, negative | f.Add(math.MaxFloat64, 1.0) |
| Boundary value (parameterized) | The threshold/cap/limit value itself | f.Add(1, math.MaxInt) (budget exactly at limit) |
pkg/temperature/fuzz_test.go is the cleanest template for numeric fuzz; pkg/parser/fuzz_test.go is the template for byte-sequence fuzz. Both spend ~10 seed lines each — that's the right density.
The default invariant is must not panic. The runtime catches panics and reports them as crashes, so you don't write that one — it's free.
Beyond no-panic, write property assertions, not example-based ones. The mutator generates novel inputs you can't predict:
len(out) <= len(in), result >= 0, tokensUsed <= budget.Decode(Encode(x)) == x.pkg/parser/fuzz_test.go does this for ErrInvalidUTF8.FuzzDecayFactor and FuzzScore in pkg/temperature/fuzz_test.go).A common pattern: when an input could be invalid, gate the assertion on input validity:
if budget >= 0 && tok1 >= 0 && tok2 >= 0 {
if result.TokensUsed > budget {
t.Errorf("TokensUsed = %d exceeds budget %d", result.TokensUsed, budget)
}
}This avoids spurious failures from negative-int inputs you've already documented as out-of-domain.
# Run all fuzz targets for 30 seconds each
scripts/fuzz.sh 30s
# Or one target for longer
go test -run='^$' -fuzz='^FuzzExample$' -fuzztime=2m ./pkg/<package>/A new target should run for at least 30s without crashing before you commit. If a crash surfaces, the crashing seed is saved under pkg/<package>/testdata/fuzz/FuzzExample/<hash> — commit that file along with the fix so future runs replay the regression.
1. pkg/<package>/fuzz_test.go (FuzzXxx with seed corpus + Fuzz callback)
2. scripts/fuzz.sh 30s (must finish without crashes)
3. If a crash file appears in testdata/fuzz/: fix root cause, commit the seederr != nil without checking what kind of error. If the function should return a specific sentinel for a given input class (like ErrInvalidUTF8 for invalid UTF-8 in parser), assert that. Otherwise generic return on error is correct.f.Add(...) seed for the empty/zero case. The Go fuzzer mutates from seeds — without an empty seed, it may take a long time to discover the empty input naturally.testdata/fuzz/. The seed file is the regression test for the bug you just fixed. Without it, the same bug can re-emerge silently.FuzzTestXxx or FuzzCheck. scripts/fuzz.sh greps ^Fuzz so any prefix-only-Fuzz name works, but stylistic convention here is FuzzXxx matching the function-under-test..claude/rules/go-concise.md — error sentinel patterns, naming.claude/skills/add-parser/SKILL.md — for the special case of seeding FuzzParseBytes with a new format (you don't add a new fuzz target, you extend an existing one)scripts/fuzz.sh — the auto-discovery loop; read it once if you're curious how go test -list='^Fuzz' finds your target© radimsem, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/add-fuzz-target of radimsem/remindb.
Open the folder on GitHubat commit 977b31c
remindb Fuzz Target Author next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| remindb Fuzz Target Author this skillradimsem/remindb | 129 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Golang Testingantoniopaya22/go-rest-template | 172 | 9 repos | ~4.2k | Automated safety check: Pass | None | |
| Golang Testingunxed/f4 | 241 | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Golang Testingaffaan-m/ECC | 276k | 1 repos | ~4.3k | Automated safety check: Pass | MIT | |
| Golang Testingcontext-labs/whip | 1.1k | — | ~4.4k | Automated safety check: Pass | MIT | |
| Golang Testingaffaan-m/ECC | 276k | — | ~4.3k | Automated safety check: Pass | MIT |
antoniopaya22/go-rest-template
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage.
unxed/f4
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration…
affaan-m/ECC
Table-driven testler, subtestler, benchmark'lar, fuzzing ve test coverage içeren Go test desenleri.
context-labs/whip
Production-ready Golang tests — table-driven, testify suites/mocks, parallel tests, fuzzing, fixtures, goleak leak detection, snapshots, coverage, integration tests.
affaan-m/ECC
Patrones de pruebas Go incluyendo pruebas basadas en tablas, subpruebas, benchmarks, fuzzing y cobertura de código.
shepherdjerred/monorepo
Current Go development guidance for modules, toolchains, workspaces, testing, fuzzing, concurrency, profiling, security, and Go tooling.
radimsem/remindb
Guides an agent writing to a remindb memory server: structured notes go in as files parsed into a node tree, single text facts go in through MemoryWrite.
radimsem/remindb
Covers the read-side tools of the remindb MCP server, a SQLite-backed agent memory, for orienting, searching, resyncing and tracing relations.
radimsem/remindb
Adds a new row to remindb's token-savings benchmark table by writing a scenario function that measures the naive shell-tool token cost against the remindb tool-call cost for the same task.
radimsem/remindb
Explains how to add an end-to-end test scenario to remindb, choosing between a direct API test and an MCP test and using the shared helpers and fixtures.
radimsem/remindb
Checklist for adding a new Memory-prefixed tool to remindb's Go MCP server: tool file, registration, test, skill docs, plus the locking and logging rules.
radimsem/remindb
Walks through adding a new file format to remindb's Go parser package: the parser file, the ParseBytes case, table tests and fuzz seeds.
Works with
Categories
Adds a new Go fuzz target to remindb following its seed-corpus discipline: one target per logical surface, discovered automatically by its FuzzXxx function name. F) function to remindb's parser, query, transformer, compiler or temperature code.go file in its package rather than creating a second file when one already exists for that package.
remindb Fuzz Target Author fits situations like: adding a new Go fuzz target to one of remindb's parsing or compiling packages; extending an existing fuzz target's seed corpus with a missing input shape; hardening a function against malformed or boundary-value input.
Run `npx skills add radimsem/remindb --skill add-fuzz-target -a claude-code`. Or copy the skill folder (.claude/skills/add-fuzz-target in radimsem/remindb) into .claude/skills/add-fuzz-target in your project. Claude Code loads it when a task matches its description.
Run `npx skills add radimsem/remindb --skill add-fuzz-target -a codex`. Or copy the skill folder (.claude/skills/add-fuzz-target in radimsem/remindb) into .agents/skills/add-fuzz-target in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add radimsem/remindb --skill add-fuzz-target -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-fuzz-target, .gemini/skills/add-fuzz-target, .github/skills/add-fuzz-target and .opencode/skills/add-fuzz-target in your project.
Going by SKILL.md and its folder, remindb Fuzz Target Author needs the command-line tools its instructions call (go). Our summary lists: Go with its built-in fuzzing support.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
remindb Fuzz Target Author is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with remindb Fuzz Target Author: Golang Testing (antoniopaya22/go-rest-template, 172 stars), Golang Testing (unxed/f4, 241 stars), Golang Testing (affaan-m/ECC, 276k stars) and Golang Testing (context-labs/whip, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
radimsem (a GitHub user) maintains it in radimsem/remindb, which has 129 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 3, 2026.
Source: radimsem/remindb on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.