home/dot_agents/skills/golang-best-practices/SKILL.md
Comprehensive Go best practices for writing production-ready, idiomatic, secure, and maintainable code. Use when: (1) writing or reviewing Go code, (2) designing project structure and layout, (3) handling errors and contexts, (4) implementing concurrency, (5) writing tests or benchmarks, (6) optimizing performance, (7) applying security practices, (8) modernizing Go codebases. Covers coding style, project organization, error handling, testing, concurrency, performance, security, and modernization.
npx skillsauth add hayatosc/dotfiles golang-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Load the appropriate reference when working on a specific area:
gofmt and goimports on every save. Do not fight the formatter. MixedCaps or mixedCaps; never snake_case in identifiers.func F(ctx context.Context, ...) error._ unless justified.crypto/rand for security-sensitive randomness, never math/rand.panic for normal error handling. Return error values.project-layout.md first.code-style.md.error-handling.md.concurrency.md.testing.md.performance.md.security.md.modernize.md.tools
Recommend a modern TypeScript toolchain. Use when choosing or updating a TypeScript stack for Node or CLI projects, libraries or packages, and web apps or APIs; selecting tsgo as the primary typechecker with tsc as compatibility fallback; recommending Hono, tsx, tsdown, Vite, Vitest, oxlint, oxlint-tsgolint, oxfmt, or deciding between bun and pnpm.
development
Implement, review, and refactor TypeScript code with a strong bias toward type safety. Use to fix TypeScript errors, remove `any` or unsafe `as`, review type safety, tighten TypeScript or lint settings, and ship ESM-first code that passes the repository's typecheck without weakening types.
development
Self-review, improve, commit, and push code that Claude has just written. Use this skill when the user asks Claude to "self-ship", "review and ship", "review then commit and push", or wants Claude to autonomously review its own output, apply improvements, and publish the changes to the remote repository. Triggered by: "self-ship", "ship it", "review and push", "review my changes and commit", or similar requests to complete the full write → review → commit → push cycle.
development
Analyze and execute behavior-preserving refactors in small, verified steps. Use when the user asks to refactor, clean up code structure, extract functions or modules, reduce duplication, improve maintainability, or modernize code without changing external behavior.