agentleFS
martinhgmartinhg/capiko-ai/skills/go-testing/SKILL.md

go-testing

Skill2 starsChanged 20 days agoMITView on GitHub

Go and Bubbletea testing patterns for this repo. Trigger: writing or reviewing tests, golden files, or coverage.

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Filesystem: always t.TempDir(); never touch the real home directory.

    line 9
  2. Very specific:

    Test state transitions by calling Model.Update(msg) directly with a tea.Msg (use the key(...) helper for tea.KeyMsg).

    line 16
  3. Very specific:

    Test rendered output with golden files (golden(t, name, view)).

    line 19
  4. Distinctive:

    Keep screen tests hermetic — build the screen struct directly when you only need navigation, so you don't trigger real detection/exec.

    line 21
  5. Very specific:

    Run the narrow package first, then go test -race ./...

    line 26

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Patterns

  • Table-driven tests for multiple cases; name cases by scenario, use t.Run.
  • Filesystem: always t.TempDir(); never touch the real home directory.
  • Seams over mocks: swap package-level function vars (e.g. lookPath, userHomeDir, runVersion, runInstall, reExec) and restore via t.Cleanup. This is how exec/network/home paths are tested here.

Bubbletea / TUI

  • Test state transitions by calling Model.Update(msg) directly with a tea.Msg (use the key(...) helper for tea.KeyMsg). Assert the returned screen, state, and emitted tea.Cmd (call cmd() and type-assert the message).
  • Test rendered output with golden files (golden(t, name, view)); update via go test ./internal/tui -update and inspect the diff.
  • Keep screen tests hermetic — build the screen struct directly when you only need navigation, so you don't trigger real detection/exec.

Run

  • Run the narrow package first, then go test -race ./... before a PR.

Download now (ZIP)

  • Other versions13 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 13

    1. Gentleman-Programming/Gentleman.Dots★ 2ksame name
    2. alex-ilgayev/MCPSpy★ 519same name
    3. Rain-kl/OpenFlare★ 296same name
    4. Integralist/agent-skills★ 20same name
    5. h0rn3t/golang-skills★ 7same name
    6. yuanJewel/skills★ 2same name
    7. AllThingsSmitty/proven-skills★ 1same name
    8. els0r/skills★ 1same name
    9. svg153/skills★ 1same name
    10. 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 and go-concurrency.

    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.
    • els0rSkill

      go-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

    • wpankSkill

      go-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

  • In this repository9 other files it gives its agents.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.