Agent skill

Write Go Tests

by talkincode in talkincode/toughradius

Unified conventions for writing Go unit/integration tests (TR-F022).

MITAuto-check passedTesting & QA

Install Write Go Tests

skills CLI
$ npx skills add talkincode/toughradius --skill write-go-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install talkincode/toughradius write-go-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/talkincode/toughradius.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-go-tests .claude/skills/write-go-tests && rm -rf skills-src

Use ~/.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/

Facts

Skill name
write-go-tests
GitHub stars
691
Token cost
~437 tokens
SKILL.md length
135 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Unified conventions for writing Go unit/integration tests (TR-F022).

  • Works in 6 steps: Co-located tests: the test file is in… → Short-test marking: for slow /… → Database: dev / test use SQLite (pure… → …
  • Adding tests for any Go code change
  • SKILL.md covers When to use, Pre-research, Conventions and Run, plus 1 more section
  • Calls go

What it does

Write Go Tests is an agent skill from talkincode/toughradius. Unified conventions for writing Go unit/integration tests (TR-F022). Use when adding tests for any Go code change.

Its SKILL.md is about 440 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 Testing & QA, covering Integration testing. The repository describes itself as: A powerful, open-source RADIUS server designed for ISPs, enterprise networks, and carriers. Supports standard RADIUS protocols, a full EAP / 802.1X authentication suite (EAP-TLS… The licence is MIT.

When your agent uses it

  • Adding tests for any Go code change
  • Tasks that involve Integration testing

Example prompts

  • “/write-go-tests”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Co-located tests: the test file is in the same package and directory as the code under test, named _test.go.
  2. Short-test marking: for slow / externally dependent tests use if testing.Short() { t.Skip(...) }; CI runs go test -short.
  3. Database: dev / test use SQLite (pure Go, CGO_ENABLED=0); schema changes must be compatible with both databases.
  4. Coverage focus: success path + failure path (reject reasons, timeouts, validation failures, authz failures).
  5. Metrics / errors: auth-reject changes must assert the corresponding AuthError / metrics tag.
  6. Table-driven: use table-driven tests for multiple scenarios.

What it can do on your machine

Read from SKILL.md and the folder at commit ef9c294. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Write Go Tests loads about 437 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 135 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~437

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from talkincode/toughradius at commit ef9c294, republished under its MIT licence (© talkincode). 135 words, ~437 tokens.

Download SKILL.mdSave it as .claude/skills/write-go-tests/SKILL.md (or your agent's skills folder).
name
write-go-tests
description
Unified conventions for writing Go unit/integration tests (TR-F022). Use when adding tests for any Go code change.

Skill: Write Go Unit / Integration Tests

Feature ID: TR-F022

When to use

Any Go code change must ship with tests. This skill unifies the test conventions.

Pre-research

text
file_search "internal/**/*_test.go"            # find the closest template
view internal/adminapi/nodes_test.go           # API test template
view internal/radiusd/*_test.go                # protocol test template
view internal/app/*_test.go                    # app-layer test template

Conventions

  1. Co-located tests: the test file is in the same package and directory as the code under test, named <file>_test.go.
  2. Short-test marking: for slow / externally dependent tests use if testing.Short() { t.Skip(...) }; CI runs go test -short.
  3. Database: dev / test use SQLite (pure Go, CGO_ENABLED=0); schema changes must be compatible with both databases.
  4. Coverage focus: success path + failure path (reject reasons, timeouts, validation failures, authz failures).
  5. Metrics / errors: auth-reject changes must assert the corresponding AuthError / metrics tag.
  6. Table-driven: use table-driven tests for multiple scenarios.

Run

bash
go test ./...                       # all
go test -short ./...                # CI-equivalent (fast)
go test -run TestXxx ./internal/... # single test
go test -bench=. ./internal/radiusd/ # benchmark
golangci-lint run                   # lint (v2.12.2)

Acceptance

  • New / changed logic has test coverage
  • go test ./... and golangci-lint run pass
  • Critical failure paths are asserted

© talkincode, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/write-go-tests of talkincode/toughradius.

Open the folder on GitHubat commit ef9c294

Compare with similar skills

Write Go 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.

Write Go Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write Go Tests this skilltalkincode/toughradius691—~437Automated safety check: PassMIT
Plugin Testingpolyipseity/obsidian-terminal950—~828Automated safety check: PassAGPL-3.0
Create Modulecartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0
Td Integration Testmarcus/td251—~1.2kAutomated safety check: PassMIT
Integration E2E Testingshinpr/claude-code-workflows693—~3.5kAutomated safety check: PassMIT
JS-in-HTML Testingliaohch3/claude-tap3.3k—~924Automated safety check: PassMIT

Similar skills

  • Plugin Testing

    polyipseity/obsidian-terminal

    Skill for testing Obsidian plugin features in this repository.

    950 GitHub stars~828 tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

    251 GitHub stars~1.2k tokensUpdated 9 days ago
    Testing & QAAuto-check passed
  • Integration E2E Testing

    shinpr/claude-code-workflows

    Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria.

    693 GitHub stars~3.5k tokensUpdated 8 days ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 17 days ago
    Testing & QAAuto-check passed
  • Crosvm Testing

    google/crosvm

    Official

    Skill to assist with running tests and managing test VMs in the crosvm repository.

    1.3k GitHub stars~847 tokensUpdated today
    Testing & QAAuto-check passed

More from talkincode/toughradius

All 12 skills in this repo
  • Release Version

    talkincode/toughradius

    Review merged PRs since the last Git tag and decide whether a ToughRADIUS release is warranted.

    691 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Add Acceptance Test

    talkincode/toughradius

    Write CI-executable acceptance/integration tests for protocol or end-to-end changes (TR-F022).

    691 GitHub stars~827 tokensUpdated today
    Auto-check passed
  • Add Adminapi Endpoint

    talkincode/toughradius

    Add a group of Admin REST endpoints in the management backend (TR-F012).

    691 GitHub stars~461 tokensUpdated today
    Auto-check passed
  • Add Eap Method

    talkincode/toughradius

    Add an EAP authentication method (e.g. An agent skill from talkincode/toughradius.

    691 GitHub stars~802 tokensUpdated today
    Auto-check passed
  • Add Radius Vendor

    talkincode/toughradius

    Add or extend vendor VSA parsing and response enhancement (TR-F005).

    691 GitHub stars~590 tokensUpdated today
    Auto-check passed
  • Add React Admin Resource

    talkincode/toughradius

    Add a resource or page in the React Admin management backend (TR-F013).

    691 GitHub stars~429 tokensUpdated today
    Auto-check passed

Categories

Questions about Write Go Tests

What does Write Go Tests do?

Unified conventions for writing Go unit/integration tests (TR-F022). Write Go Tests is an agent skill from talkincode/toughradius. Unified conventions for writing Go unit/integration tests (TR-F022).

When should I use Write Go Tests?

Write Go Tests fits situations like: adding tests for any Go code change; tasks that involve Integration testing.

How do I install Write Go Tests in Claude Code?

Run `npx skills add talkincode/toughradius --skill write-go-tests -a claude-code`. Or copy the skill folder (.agents/skills/write-go-tests in talkincode/toughradius) into .claude/skills/write-go-tests in your project. Claude Code loads it when a task matches its description.

How do I install Write Go Tests in Codex?

Run `npx skills add talkincode/toughradius --skill write-go-tests -a codex`. Or copy the skill folder (.agents/skills/write-go-tests in talkincode/toughradius) into .agents/skills/write-go-tests in your project. Codex loads it when a task matches its description.

Can I use Write Go Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add talkincode/toughradius --skill write-go-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/write-go-tests, .gemini/skills/write-go-tests, .github/skills/write-go-tests and .opencode/skills/write-go-tests in your project.

What does Write Go Tests need to run?

Going by SKILL.md and its folder, Write Go Tests needs the command-line tools its instructions call (go).

Does Write Go Tests access the network?

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.

Is Write Go Tests safe to install?

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.

What licence does Write Go Tests use?

Write Go Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write Go Tests use?

About 437 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write Go Tests?

Skills that share tags, products or a category with Write Go Tests: Plugin Testing (polyipseity/obsidian-terminal, 950 stars), Create Module (cartography-cncf/cartography, 4.1k stars), Td Integration Test (marcus/td, 251 stars) and Integration E2E Testing (shinpr/claude-code-workflows, 693 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write Go Tests?

talkincode (a GitHub organization) maintains it in talkincode/toughradius, which has 691 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: talkincode/toughradius on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.