goWrite reliable Go code avoiding goroutine leaks, interface traps, and common concurrency bugs.
Install via ClawdBot CLI:
clawdbot install ivangdavila/goRequires:
| Topic | File |
|-------|------|
| Concurrency patterns | concurrency.md |
| Interface and type system | interfaces.md |
| Slices, maps, strings | collections.md |
| Error handling patterns | errors.md |
for range on channel loops forever until channel closedâsender must close(ch)ctx.Done() in loopselect with multiple ready cases picks randomlyânot first listeddefer log(time.Now()) captures nowdefer func() { err = wrap(err) }() worksvar p *MyType; var i interface{} = p; i != nil is truev, ok := i.(Type)any accepts anything but loses type safetyâavoid when possible*T has the methoderr != nil after every callâunchecked errors are silent bugserrors.Is for wrapped errorsâ== doesn't work with fmt.Errorf("%w", err)var ErrFoo = errors.New() not recreateda[1:3] shares memory with avar s []int vs s := []int{}copy() copies min of lengthsâdoesn't extend destinationsync.Map or mutex&m[key] doesn't compilerange over string iterates runes, not bytesâindex jumps for multi-byte charslen(s) is bytes, not charactersâuse utf8.RuneCountInString()var wg sync.WaitGroup works, no constructor neededgo build caches aggressivelyâuse -a flag to force rebuild_ import for side effects onlyinit() runs before main, order by dependencyânot file ordergo:embed paths relative to source fileânot working directoryGOOS=linux GOARCH=amd64 go buildâeasy but test on targetGenerated Mar 1, 2026
Develop a low-latency trading platform using Go's concurrency features like goroutines and channels to process real-time market data and execute trades. This scenario requires careful handling of goroutine leaks and channel synchronization to ensure system reliability and avoid deadlocks under heavy load.
Build scalable microservices for an e-commerce platform, leveraging Go's efficient error handling and interface system to manage product catalogs, user authentication, and payment processing. This involves avoiding interface traps and ensuring robust error propagation across distributed services.
Create a dashboard that aggregates and visualizes streaming data from IoT devices, using Go's slices and maps for in-memory data processing. This scenario focuses on preventing memory leaks from goroutines and optimizing slice and map usage for performance in data-intensive applications.
Implement a Go-based application for cloud environments, utilizing build traps and cross-compilation features to ensure consistent deployment across Linux and Windows servers. This includes managing dependencies and avoiding common pitfalls with struct memory alignment and defer usage in cleanup operations.
Offer a subscription-based software service for developers, providing tools and libraries to write reliable Go code, with features like automated leak detection and concurrency debugging. Revenue is generated through monthly or annual licenses, targeting teams in tech startups and enterprises.
Provide expert consulting services to companies adopting Go, including code reviews, performance optimization, and training workshops on avoiding common traps like goroutine leaks and interface errors. Revenue comes from project-based contracts and per-session training fees.
Develop and maintain open-source Go packages focused on concurrency and error handling, monetizing through premium support, custom integrations, and enterprise features. This model builds community trust while generating revenue from large organizations needing dedicated assistance.
đŹ Integration Tip
Integrate this skill into development workflows by using it for code reviews and automated testing to catch common Go pitfalls early, ensuring robust application performance and reducing debugging time.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.