MCPInstall

go-best-practices

Production Go patterns — lifecycle, concurrency, config, testing, CI. Use when writing, reviewing, or refactoring Go code. Triggers on Go code review, Go refactoring, or 'go best practices'.

Installs
200
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/poteto/noodle --skill go-best-practices
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads go-best-practices automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Go Best Practices

PatternWhen to apply
Minimal mainNew binaries
Single bootstrapApp wiring across modes
Ordered shutdownLong-running processes
Non-blocking fanoutChannel-based event systems
Concurrency testingAny goroutine code
Layered configMulti-source configuration
Cross-platform pathsFile/config path resolution
Secure debug loggingHTTP client instrumentation
Golden test matricesRendering / output components
Focused lintersCI pipeline setup

Read references/patterns.md for code examples.

Rules

  1. main.go is a stub. Call cmd.Execute() and nothing else. Gate diagnostics (pprof) behind env vars.

  2. One bootstrap path. All modes (interactive, headless, test) share the same initialization function. Two paths will drift.

  3. Ordered shutdown. Cancel dependents before their dependencies, then run independent cleanup in parallel under a timeout context. WaitGroup the parallel phase.

  4. Never block the sender. Non-blocking channel sends with an explicit drop policy. Log drops at debug level. Document the policy.

  5. Test concurrency mechanically. testing/synctest for deterministic timing, goleak.VerifyNone for leak detection, dedicated regression tests for timer/channel deadlocks.

  6. Explicit config precedence. Global → project → flags. Walk up from CWD to discover project configs, reverse so closest wins, deep-merge.

  7. Centralize platform paths. One function per concern. Resolution order: env override → XDG → platform default → fallback.

  8. Redact secrets in debug logs. Wrap http.RoundTripper. Filter headers matching authorization, api-key, token, secret. Gate on debug level to skip allocation in prod.

  9. Golden tests over matrices. Cross dimensions (layout × theme × size) as parallel subtests. Sweep continuous ranges to catch off-by-one bugs.

  10. Focused linters, not all linters. Enable what catches real bugs (bodyclose, noctx, tparallel). Disable noisy defaults. Add project-specific checks as scripts. Always -race in tests.

FAQ

What does the go-best-practices skill do?

Production Go patterns — lifecycle, concurrency, config, testing, CI. Use when writing, reviewing, or refactoring Go code. Triggers on Go code review, Go refactoring, or 'go best practices'.

How do I install go-best-practices?

Run npx skills add https://github.com/poteto/noodle --skill go-best-practices in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/go-best-practices/ (personal) or .claude/skills/go-best-practices/ (project).

Which AI agents can use go-best-practices?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is go-best-practices safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains go-best-practices?

It is published by poteto in poteto/noodle. It has 200 recorded installs.

More from poteto/noodle

View all →

adversarial-review

poteto/noodle

Adversarial code review using cross-model approach. Spawns reviewers on the opposing model (Claude uses Codex, Codex uses Claude) to challenge work from distinct critical lenses. Produces a synthesized verdict with findings and lead judgment. Triggers: "adversarial review".

unslop

poteto/noodle

Remove AI writing patterns from prose. Use for docs, READMEs, blog posts, any non-code text that should sound human. Triggers: "unslop", "humanize", "make this sound human", "clean up this writing", "edit for voice", "de-AI this text".

Docs & Writing907 installs

ts-best-practices

poteto/noodle

TypeScript type safety guidelines for writing maximally type-safe code. Apply these patterns when writing or reviewing any TypeScript: discriminated unions, type narrowing, type guards, exhaustiveness checks, avoiding as casts, preferring unknown over any, and making impossible states unrepresentable. Use this skill whenever writing TypeScript code, reviewing TypeScript for type safety issues, or when the user mentions type safety, type narrowing, discriminated unions, or asks to make types stricter/more explicit.

debugging

poteto/noodle

Systematic root-cause debugging methodology. Use for any technical problem — errors, failures, unexpected behavior, or when stuck. Triggers: "debug", "fix this", "what's wrong", "investigate".

quality

poteto/noodle

Post-cook quality gate. Reviews completed cook work for correctness, scope discipline, and principle compliance. Emits stagemessage events with findings. Triggers after execute stages, on '/quality', 'review this', 'check the work', 'assess quality'.

commit

poteto/noodle

Create conventional commit messages. Use when the user says "commit this", "save changes", "git commit", asks to commit code, write a commit message, or format git history. Follows conventional commits specification.

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.