go-tdd-baby-steps

go-tdd-baby-steps is a skill for Claude Code from gonzaloserrano/gopilot. It costs 92 tokens per session (1,321 once invoked), scanned A, original, MIT.

A test-first workflow for Go that breaks coding into very small cycles: write a failing test, add just enough code to pass it, then clean up. TDD means Test-Driven Development.

In plain words
What is it for?
Writing Go tests, developing features incrementally, using table-driven tests, and practicing the red-green-refactor cycle.
Why use it?
It reduces the risk of taking steps that are too large and makes it easier to return to the last working version when you get stuck.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the gopilot plugin — 3 skills, 2 hooks shipped together

Good fit Writing Go tests, developing features incrementally, using table-driven tests, and practicing the red-green-refactor cycle.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gonzaloserrano/gopilot/go-tdd-baby-steps
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gonzaloserrano/gopilot --skill go-tdd-baby-steps
Clone the repo
git clone --depth 1 https://github.com/gonzaloserrano/gopilot

Made for: Claude Code.

Or install gopilot, the plugin that ships this one along with the rest of its 3 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-tdd-baby-steps

README.md
[![agentmods](https://agentmods.dev/badge/skills/gonzaloserrano/gopilot/go-tdd-baby-steps/github.svg)](https://agentmods.dev/skills/gonzaloserrano/gopilot/go-tdd-baby-steps)
Your own site
<a href="https://agentmods.dev/skills/gonzaloserrano/gopilot/go-tdd-baby-steps"><img src="https://agentmods.dev/badge/skills/gonzaloserrano/gopilot/go-tdd-baby-steps/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-tdd-baby-steps

Your own site · 80×15
<a href="https://agentmods.dev/skills/gonzaloserrano/gopilot/go-tdd-baby-steps"><img src="https://agentmods.dev/badge/skills/gonzaloserrano/gopilot/go-tdd-baby-steps.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00092 $0.01321
Opus 5 $0.00046 $0.00660
Sonnet 5 $0.00018 $0.00264
Haiku 4.5 $0.00009 $0.00132

Measured 12d ago against content hash aeb5b904e6a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

go-tdd-baby-steps scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/go-tdd-baby-steps/SKILL.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go TDD Baby Steps

Test-Driven Development using the smallest possible increments, with Go idioms.

Three Laws of TDD

  1. Don't write production code until you have a failing test
  2. Don't write more test code than is sufficient to fail (compilation failures count)
  3. Don't write more production code than is sufficient to pass the currently failing test

These laws create a tight feedback loop: write a tiny test, watch it fail, write just enough code to pass.

Red-Green-Refactor

  1. Red - Write a small test that fails
  2. Green - Write the minimal code to make it pass
  3. Refactor - Clean up while keeping tests green

Each cycle should take ~2 minutes. If longer, the step is too big.

The Revert Rule

If stuck or code is getting messy:

  1. Revert to the last green state
  2. Rethink the approach
  3. Take a smaller step

Never debug longer than the cycle itself. Revert instead.

Baby Steps with Go Table-Driven Tests

Build up the test table incrementally — each row adds ONE behavior.

Step 1: Zero/empty case

func TestParseAmount(t *testing.T) {
	tests := []struct {
		name    string
		input   string
		want    int
		wantErr bool
	}{
		{name: "empty string", input: "", want: 0, wantErr: true},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			got, err := ParseAmount(tt.input)
			if tt.wantErr {
				require.Error(t, err)
				return
			}
			require.NoError(t, err)
			assert.Equal(t, tt.want, got)
		})
	}
}

Production code (fake it):

func ParseAmount(s string) (int, error) {
	return 0, errors.New("empty")
}

Step 2: Single simple case

Add one row, generalize production code:

{name: "single digit", input: "5", want: 5},
func ParseAmount(s string) (int, error) {
	if s == "" {
		return 0, errors.New("empty input")
	}
	return strconv.Atoi(s)
}

Step 3: Edge cases, one at a time

{name: "negative number", input: "-3", want: -3},
{name: "leading zeros", input: "007", want: 7},
{name: "non-numeric", input: "abc", wantErr: true},

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 190 lines · 92 tokens per session scan A aeb5b904e6a4

Subscribe to this mod's changes

go-tdd-baby-steps is a skill published in the GitHub repository gonzaloserrano/gopilot (17 stars, last pushed 2mo ago), licensed MIT. It adds 92 tokens to every session and 1,321 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.