Guidelines
akash-network/node
Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.
Write Go table-driven tests following Go community best practices and this repository's conventions.
$ npx skills add Xe/x --skill go-table-driven-tests -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Xe/x go-table-driven-tests --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/Xe/x.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .claude/skills/go-table-driven-tests && 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 "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .claude/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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/Xe/x/tree/master/.claude/skills/go-table-driven-testsType 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 Xe/x --skill go-table-driven-tests -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Xe/x go-table-driven-tests --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xe/x.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .agents/skills/go-table-driven-tests && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .agents/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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 Xe/x --skill go-table-driven-tests -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Xe/x go-table-driven-tests --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xe/x.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .cursor/skills/go-table-driven-tests && 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 "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .cursor/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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/Xe/x.git --path .claude/skills/go-table-driven-tests--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 Xe/x --skill go-table-driven-tests -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Xe/x go-table-driven-tests --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xe/x.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .gemini/skills/go-table-driven-tests && 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 "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .gemini/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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 Xe/x go-table-driven-testsInstalls 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 Xe/x --skill go-table-driven-tests -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Xe/x.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .github/skills/go-table-driven-tests && 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 "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .github/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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 Xe/x --skill go-table-driven-tests -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Xe/x go-table-driven-tests --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Xe/x.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/go-table-driven-tests .opencode/skills/go-table-driven-tests && 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 "go-table-driven-tests" agent skill from https://github.com/Xe/x/tree/master/.claude/skills/go-table-driven-tests into .opencode/skills/go-table-driven-tests/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "go-table-driven-tests", 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.
go-table-driven-testsWrite Go table-driven tests following Go community best practices and this repository's conventions.
Go Table Driven Tests is an agent skill from Xe/x. Write Go table-driven tests following Go community best practices and this repository's conventions. Use when writing or refactoring Go tests, especially when you notice repeated test patterns or copy-pasted test code.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Refactoring. The repository describes itself as: Various tools, trinkets and experiments. The licence is CC0-1.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 42a5acb. 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.
Links to these hosts (documentation or services it may open):
go.devpkg.go.devdave.cheney.netFrom 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.
Go Table Driven Tests loads about 2k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 435 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 Xe/x at commit 42a5acb, republished under its CC0-1.0 licence (© Xe). 435 words, ~1,998 tokens.
.claude/skills/go-table-driven-tests/SKILL.md (or your agent's skills folder).Table-driven tests are a Go testing idiom that reduces code duplication and makes tests more maintainable. Instead of writing separate test functions for each case, you define a table of test cases and iterate over it.
Use table-driven tests when:
Do NOT use for: Completely unrelated test scenarios, or when each test requires substantially different setup/teardown logic.
This is the most common pattern in this codebase:
func TestFunctionName(t *testing.T) {
cases := []struct {
name string
input string
want string
err error
}{
{
name: "simple case",
input: "a/b/c",
want: "a,b,c",
},
{
name: "empty input",
input: "",
want: "",
},
{
name: "invalid input",
input: "!!!",
want: "",
err: ErrInvalid,
},
}
for _, tt := range cases {
t.Run(tt.name, func(t *testing.T) {
got, err := FunctionName(tt.input)
if !errors.Is(err, tt.err) {
t.Errorf("FunctionName(%q) error = %v, want %v", tt.input, err, tt.err)
}
if got != tt.want {
t.Errorf("FunctionName(%q) = %q, want %q", tt.input, got, tt.want)
}
})
}
}Use a map when you want to ensure test independence:
func TestFunctionName(t *testing.T) {
tests := map[string]struct {
input string
want string
}{
"simple case": {input: "a/b/c", want: "a,b,c"},
"empty input": {input: "", want: ""},
"trailing sep": {input: "a/b/c/", want: "a,b,c"},
}
for name, tc := range tests {
t.Run(name, func(t *testing.T) {
got := FunctionName(tc.input)
if got != tc.want {
t.Fatalf("%s: expected %q, got %q", name, tc.want, got)
}
})
}
}This codebase consistently uses these variable names:
| Purpose | Variable Name | Example |
|---|---|---|
| Test cases slice | cases, tt, cs | cases := []struct{...} |
| Loop variable | tt, cs, tc | for _, tt := range cases |
| Input field | input, in, inp | input: "test" |
| Expected output | want, expected | want: "result" |
| Actual output | got, output | got := Function() |
| Error field | err, wantErr | err: ErrInvalid |
| Name field | name | name: "descriptive name" |
// Always use named fields (not anonymous structs in this codebase)
cases := []struct {
name string // Descriptive test name (REQUIRED when using slice pattern)
input Type // Input to function under test
want Type // Expected output
err error // Expected error (use errors.Is for comparison)
wantErr bool // Alternative: true if error is expected
precondition func(*testing.T) // Optional setup function
}{ ... }This repository uses these patterns:
// For error checking (preferred)
if !errors.Is(err, tt.err) {
t.Errorf("error = %v, want %v", err, tt.err)
}
// For simple comparisons
if got != tt.want {
t.Errorf("got %q, want %q", got, tt.want)
}
// Use t.Fatalf only when continuing doesn't make sense
// Use t.Errorf to see all test failures before stoppingWhen tests need specific setup:
for _, tt := range []struct {
name string
precondition func(*testing.T)
input string
err error
}{
{
name: "with listener",
precondition: func(t *testing.T) {
ln, err := net.Listen("tcp", ":8081")
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { ln.Close() })
},
input: "test",
err: nil,
},
} {
t.Run(tt.name, func(t *testing.T) {
if tt.precondition != nil {
tt.precondition(t)
}
// test logic
})
}For independent tests that can run in parallel:
func TestFunctionName(t *testing.T) {
cases := []struct {
name string
input string
want string
}{
// ... test cases
}
for _, tt := range cases {
tt := tt // Capture range variable (Go < 1.22)
t.Run(tt.name, func(t *testing.T) {
t.Parallel() // Marks this subtest as parallel
got := FunctionName(tt.input)
if got != tt.want {
t.Errorf("got %q, want %q", got, tt.want)
}
})
}
}t.Run() for subtests - This is 100% consistent in this codebasename field should clearly describe what is being testederrors.Is for error comparison - Not == or reflect.DeepEqualt.Errorf over t.Fatalf - See all failures before stoppingt.Run() - Without subtests, all failures appear at the same lineFatalf immediately - You won't see other test failurestt := tt before t.Runcases, tt, want, got)| Traditional | Table-Driven |
|---|---|
func TestFoo(t *testing.T) { ... } | func TestFoo(t *testing.T) { cases := []struct{...}{...} } |
| One test function per case | Single function, many cases |
| Hard to add new cases | Just add a row to the table |
| Verbose boilerplate | Concise, DRY code |
go test -run TestFoo_SpecificCase | go test -run TestFoo/name |
# Run all tests in a function
go test -run TestFunctionName
# Run a specific subtest
go test -run TestFunctionName/descriptive_name
# Run all tests matching a pattern
go test -run TestFunctionName/.*/empty
# Verbose mode (see all test output)
go test -v
# Run with race detector
go test -race© Xe, CC0-1.0. 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/go-table-driven-tests of Xe/x.
Open the folder on GitHubat commit 42a5acb
Go Table Driven Tests 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 |
|---|---|---|---|---|---|---|
| Go Table Driven Tests this skillXe/x | 337 | — | ~2k | Automated safety check: Pass | CC0-1.0 | |
| Guidelinesakash-network/node | 1.1k | 22 repos | ~577 | Automated safety check: Pass | MIT | |
| Component Refactoringlangflow-ai/langflow | 156k | — | ~3.5k | Automated safety check: Pass | MIT | |
| Migrate Core Code to Submodulestinyhumansai/openhuman | 42k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Codexskills-directory/skill-codex | 1.5k | 3 repos | ~1.8k | Automated safety check: Pass | MIT |
akash-network/node
Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.
langflow-ai/langflow
Refactor high-complexity React components in Langflow frontend.
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
skills-directory/skill-codex
A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing
DavidObando/gsharp
Forces the laziest solution that actually works, simplest, shortest, most minimal.
Xe/x
Transform unstructured notes into polished blog posts in Xe Iaso's voice.
Xe/x
Build interactive hypermedia-driven applications with templ and HTMX.
Xe/x
Write Go code following the conventions and patterns used in the within.website/x repository, including CLI patterns with internal.HandleStartup(), error handling, logging with slog, HTTP handlers…
Categories
Write Go table-driven tests following Go community best practices and this repository's conventions. Go Table Driven Tests is an agent skill from Xe/x. Write Go table-driven tests following Go community best practices and this repository's conventions.
Go Table Driven Tests fits situations like: refactoring Go tests; especially when you notice repeated test patterns; copy-pasted test code.
Run `npx skills add Xe/x --skill go-table-driven-tests -a claude-code`. Or copy the skill folder (.claude/skills/go-table-driven-tests in Xe/x) into .claude/skills/go-table-driven-tests in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Xe/x --skill go-table-driven-tests -a codex`. Or copy the skill folder (.claude/skills/go-table-driven-tests in Xe/x) into .agents/skills/go-table-driven-tests 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 Xe/x --skill go-table-driven-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-table-driven-tests, .gemini/skills/go-table-driven-tests, .github/skills/go-table-driven-tests and .opencode/skills/go-table-driven-tests in your project.
Going by SKILL.md and its folder, Go Table Driven Tests needs the command-line tools its instructions call (go).
SKILL.md names 3 domains. As links in the text: go.dev, pkg.go.dev and dave.cheney.net. 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.
Go Table Driven Tests is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 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 Go Table Driven Tests: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 156k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and Systematic Code Refactoring (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Xe (a GitHub user) maintains it in Xe/x, which has 337 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 8, 2026.
Source: Xe/x on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.