ZimaOS-Blue: Skill for Claude Code

.agents/skills/golang-best-practices/SKILL.md

golang-best-practices is a skill for Claude Code, Codex from IceWhaleTech/ZimaOS-Blue. It costs 66 tokens per session (1,827 once invoked), scanned A, original, MIT.

A set of rules for writing and reviewing Go code in a project that uses test-driven development (TDD), meaning tests are written before the code they check.

In plain words
What is it for?
It guides database schema changes, architecture decisions, code reviews, bug fixes, performance work, command execution, and goroutine management in Go.
Why use it?
It gives coding-agent work a consistent order and helps catch design, database, concurrency, security, and performance problems during development.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is IceWhaleTech/ZimaOS-Blue's own configuration. It tells Claude Code and Codex how to work on ZimaOS-Blue itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ZimaOS-Blue configures →

Reuse

Borrowing it

Nothing to install: this file belongs to IceWhaleTech/ZimaOS-Blue. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/IceWhaleTech/ZimaOS-Blue/main/.agents/skills/golang-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/IceWhaleTech/ZimaOS-Blue

Made for: Claude Code, Codex.

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 golang-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/icewhaletech/zimaos-blue/golang-best-practices/github.svg)](https://agentmods.dev/skills/icewhaletech/zimaos-blue/golang-best-practices)
Your own site
<a href="https://agentmods.dev/skills/icewhaletech/zimaos-blue/golang-best-practices"><img src="https://agentmods.dev/badge/skills/icewhaletech/zimaos-blue/golang-best-practices/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 golang-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/icewhaletech/zimaos-blue/golang-best-practices"><img src="https://agentmods.dev/badge/skills/icewhaletech/zimaos-blue/golang-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,827 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.00066 $0.01827
Opus 5 $0.00033 $0.00914
Sonnet 5 $0.00013 $0.00365
Haiku 4.5 $0.00007 $0.00183

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

Security

Grade A, and why

golang-best-practices 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.

.agents/skills/golang-best-practices/SKILL.md · 267 lines

How it starts

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

Golang Best Practices Skill

This skill provides coding standards and best practices for Golang development in this project.

Development Mode: TDD (Test-Driven Development)

This project strictly follows TDD. No exceptions.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Red-Green-Refactor Cycle

  1. RED - Write a failing test first
  2. Verify RED - Watch it fail (MANDATORY)
  3. GREEN - Write minimal code to pass
  4. Verify GREEN - Watch it pass (MANDATORY)
  5. REFACTOR - Clean up while keeping tests green

TDD Rules

  • Write code before the test? Delete it. Start over.
  • Test passes immediately? Fix the test.
  • Can't explain why test failed? Stop and investigate.
  • "I'll test after"? No. Tests-after prove nothing.

See superpowers/skills/test-driven-development/SKILL.md for complete TDD guidelines.


Database Design

1. Backward Compatibility

  • Only add fields, never modify existing ones
  • Ensure schema migrations are always forward-compatible

2. SQL Injection Prevention

  • Always use ORM or parameterized queries
  • Never concatenate user input into SQL strings

3. Primary Key Requirements

  • Every table MUST have at least one primary key
  • Prefer using an id field as primary key

4. File Path Storage

When storing file paths in database:

  • If prefix matching is needed, always store paths with trailing /
  • CAUTION: filepath.Base() returns empty string for paths ending with /
  • Handle this edge case explicitly in code

Architecture Design

1. Trade-off Principle

There's no best solution, only the most suitable one for the current situation.

When facing multiple choices:

  1. Gather all evidence
  2. Compare pros/cons and ROI
  3. Choose the most appropriate solution
  4. Document the decision rationale

2. Avoid Over-Engineering

Say it three times: Don't over-design!

  • Don't implement features that "might" be needed in the future
  • Consider future migration paths and upgrade strategies
  • But don't implement them until actually needed

Read the full file on GitHub · 267 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 · 267 lines · 66 tokens per session scan A 288c3819b0c2

Subscribe to this mod's changes

golang-best-practices is a skill published in the GitHub repository IceWhaleTech/ZimaOS-Blue (25 stars, last pushed 4mo ago), licensed MIT. It adds 66 tokens to every session and 1,827 once invoked, about $0.0003 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.