go-testing
Skill2 starsChanged 22 days agoMITView on GitHub
Write, review or diagnose Go tests, choosing table-driven tests, stubs, httptest, concurrency, fuzzing and isolated integration verification by public behaviour. Existing healthy tests are not rewritten because the skill is used, and coverage does not replace fault-detection power.
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Create synthetic fixtures with an explicit lifecycle.
- Distinctive: line 32
Add no framework when the standard library suffices.
- Distinctive: line 34
Start from the smallest affected package and widen by risk.
- Distinctive: line 38
Do not auto-rewrite golden files, delete flaky tests or loosen assertions to get green.
- Distinctive: line 39
After a fix, rerun the affected part.
- Very specific: line 51
Follow the local resource cleanup rule of task-implementation: register identity on creation, reclaim only objects registered by this run …
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go behaviour tests
Inputs: this change's acceptance and risks, affected public boundaries, independent expectations, Go and test-dependency versions, allowed environments, resource and concurrency constraints, and existing tests. Without an explicit expectation, find the contract first; never compute want from the return value of the function under test. Ordinary low-risk text or mechanical changes do not get forced tests.
Choose the method by risk
- Inputs, outputs, errors and HTTP contracts: read Unit and contract. First verify observable behaviour at the smallest stable layer, then choose table-driven or separate cases.
- Cancellation, shared state, order sensitivity, parsers or performance: read Concurrency, fuzzing and measurement. These tools are enabled by risk; do not add race/fuzz/benchmark to every test by default.
- Databases, time, external protocols and shared resources: read Integration isolation. Distinguish what stubs cover from real implementation semantics; use only authorised synthetic environments.
- Delivery: use Test evidence; raw logs stay in the consuming project, and the status must not just say "go test passed".
Procedure
- List normal and failure boundaries for new or changed behaviour: choose nil/empty, no permission, conflict, cancellation or recovery by actual risk. Reuse valid existing cases; do not rewrite them all because an internal function was refactored.
- First write the independent oracle, the required fixtures and which faults the test can detect. A defect regression runs before the fix and is confirmed to fail for the target fault, then passes on the fixed version; if the old version cannot run, state the gap rather than manufacturing a red history. Cases without a known fault may verify detection power via counter-examples, assertion review or isolated fault injection; not every test must be made red first.
- Create synthetic fixtures with an explicit lifecycle. Add no framework when the standard library suffices; follow project conventions for existing frameworks. A missing version or dependency blocks only the affected tests; do not install or upgrade to make them pass.
- Start from the smallest affected package and widen by risk. Record the packages run, filters, build tags, version, actual command, timeout, exit code, and run and skipped items. Explain separately: zero tests matched, compile failure, timeout and cached results.
- On failure, first preserve the seed/order/input/logs, then distinguish implementation, oracle, fixture or environment. Do not auto-rewrite golden files, delete flaky tests or loosen assertions to get green. After a fix, rerun the affected part; repeat wider tests only for new evidence or risk.
- Report the actual final state: passed, failed, blocked/not run, not applicable. Skipped integration tests do not count as passed; list cleanup failures and leftovers separately. On a process timeout, first confirm whether test child processes have terminated; interrupted output is not the end.
Normal example: fixing a pagination bug with empty results, use the contract-defined empty array and cursor expectation to prove the old version fails and the new one passes; no need to raise repository-wide coverage. Misuse example: the mock always returns success and the test only asserts err is nil, so it cannot detect real error mapping; add a failing stub and assert the code and side effects.
Mechanical command/result tidying may use low/low; ordinary test design uses normal/medium; concurrency, authorisation, time or conflicting independent expectations use normal/high. Grade words map to actual execution configuration through the project resource mapping. Allocate concurrency quota by isolated resources, not by number of cases.
Wrap-up cleanup: child processes, listening ports, containers, temporary directories and test databases/namespaces started by tests are reclaimed after the tests end; external resources not covered by t.Cleanup/TempDir are registered separately.
Follow the local resource cleanup rule of task-implementation: register identity on creation, reclaim only objects registered by this run at wrap-up, write retained evidence and cleanup failures into the receipt, and use no global cleanup commands.
Sources
- Pinned source: EC05 golang-testing.
- Adopted table-driven tests, cleanup, httptest and the race/fuzz/benchmark layering; isolation, clock/time zone, result summary and detection-power boundaries are own-authored for this package. Dropped fixed coverage targets, mandatory red-green for every case, automatic golden updates and assertion-free examples. Before upgrading testing APIs, verify the minimum toolchain.
- License: shipped with the package as LICENSE-EC.txt (EC, MIT); library-wide third-party summary in the root THIRD_PARTY_NOTICES.md. Copy the license file along when copying this package alone.
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- Gentleman-Programming/Gentleman.Dots★ 2ksame name
- alex-ilgayev/MCPSpy★ 519same name
- Rain-kl/OpenFlare★ 296same name
- Integralist/agent-skills★ 20same name
- h0rn3t/golang-skills★ 7same name
- martinhg/capiko-ai★ 2same name
- AllThingsSmitty/proven-skills★ 1same name
- els0r/skills★ 1same name
- svg153/skills★ 1same name
- AndyTechnologies/my-own-skills★ 0same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use go-performance, chained-pr and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
els0rSkillgo-performance
Go performance analysis: memory allocation, CPU bottlenecks, concurrency contention, struct alignment, escape analysis, and benchmarking patterns. Use this skill whenever writing performance-sensitive Go code, reviewing Go code for efficiency, discussing allocations or GC pressure, benchmarking, profiling with pprof, or optimizing hot paths. Also trigger when the user mentions sync.Pool, atomic operations, pre-allocation, or escape analysis — even without saying "performance."
Also in 4 projects that use this
svg153Skillchained-pr
Split large or review-heavy changes into stacked PRs to main or a feature-branch chain with a tracker. Use when the user requests PR slicing, stacked changes or reviewer-load control, or the effective project delivery strategy requires a split. Define slice boundaries, dependencies, review order and checks without replacing the selected delivery mode or imposing a universal line-count gate.
Also in 3 projects that use this
svg153Skillcomment-writer
Write warm, direct collaboration comments. Trigger: PR feedback, issue replies, reviews, Slack messages, or GitHub comments.
Also in 3 projects that use this
wpankSkillgo-concurrency
Production Go concurrency patterns — goroutines, channels, sync primitives, context, worker pools, pipelines, and graceful shutdown. Use when building concurrent Go applications or debugging race conditions.
Also in 4 projects that use this
Gentleman-ProgrammingSkillbranch-pr
Also in 3 projects that use this
Gentleman-ProgrammingSkillissue-creation
Also in 3 projects that use this
- +2 more from svg153
In this repository39 other files it gives its agents.
- ai-trace-auditSkill
- ai-workspace-governanceSkill
- archive-maintenanceSkill
- change-reviewSkill
- cloud-api-integrationSkill
- coding-conventionsSkill
- container-image-managementSkill
- context-handoffSkill
- deployment-patternsSkill
- docker-local-environmentSkill
- documentation-authoringSkill
- estimationSkill
- external-dependency-simulationSkill
- gitlab-webhook-local-gitSkill
- go-patternsSkill
- grpc-proto-contractSkill
- guided-evidence-collectionSkill
- http-api-designSkill
- jenkins-pipeline-jjbSkill
- ldap-rbacSkill
- mysql-migration-safetySkill
- plan-designSkill
- plan-reviewSkill
- playwright-e2eSkill
- project-contextSkill
- pytest-patternsSkill
- readonly-ops-diagnosticsSkill
- redis-patternsSkill
- release-readinessSkill
- role-bootstrapSkill
- security-reviewSkill
- skill-maintenanceSkill
- subtask-dispatchSkill
- systematic-diagnosisSkill
- task-implementationSkill
- test-strategySkill
- verification-gateSkill
- vue3-developmentSkill
- vue-testingSkill
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.

