golang-structs-interfacesGolang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfa...
Install via ClawdBot CLI:
clawdbot install samber/golang-structs-interfacesGrade Fair — based on market validation, documentation quality, package completeness, maintenance status, and authenticity signals.
Calls external URL not in known-safe list
https://github.com/samber/cc-skills-golangAudited Apr 17, 2026 · audit v1.0
Generated May 6, 2026
A fintech company needs to integrate multiple payment providers (Stripe, PayPal, Square) without coupling to a specific vendor. Using the 'accept interfaces, return structs' principle, they define a small `PaymentProcessor` interface consumed by the checkout service, and each provider implements it with a concrete struct. This allows easy addition of new providers and simplifies testing with mocks.
A SaaS startup uses a Postgres database but may migrate to MySQL or use in-memory caches for testing. They define `UserRepository` and `OrderRepository` interfaces in the service layer where they're consumed, and implement concrete structs for each database backend. This enables swapping databases without changing business logic and allows parallel development.
A DevOps team builds a centralized logging library that writes to stdout, files, and Elasticsearch. They define a small `LogWriter` interface with a single `Write` method, and compose it into a `MultiWriter` using interface embedding. Each output is a concrete struct implementing `LogWriter`, and the library returns concrete loggers while accepting `LogWriter` for outputs.
A microservices platform needs a caching layer that works with Redis, Memcached, or in-process maps. They define a generic `CacheStore[T any]` interface with `Get`, `Set`, `Delete` methods, and provide concrete implementations for each backend. Services accept the interface as a dependency, allowing runtime configuration and easy addition of new cache backends.
A data engineering team builds a serialization toolkit that converts Go structs to JSON, YAML, and Parquet. They use struct field tags (`json:`, `yaml:`, `parquet:`) to define field mappings, and use type assertions at runtime to handle different serialization formats. The framework relies on small interfaces like `json.Marshaler` for custom types, ensuring flexibility without heavy abstraction.
Offer expert Go development services focused on building maintainable, testable systems using proper struct and interface design. Clients pay for architecture reviews, code audits, or custom development that emphasizes small interfaces, dependency injection, and zero-value usability.
Release a Go library implementing these design patterns (e.g., for service composition or data serialization) under an MIT license. Offer a commercial license with additional features, compliance support, or priority bug fixes to enterprises. Revenue from licensing fees and support contracts.
Provide online or in-person training courses, workshops, and certification programs for Go developers focusing on advanced struct/interface design, dependency injection, and code quality. Target teams wanting to adopt Go best practices.
💬 Integration Tip
Start with small interfaces consumed by your service layer, then implement concrete structs for each dependency. Use compile-time interface checks to ensure correctness early.
Scored Jun 29, 2026
Control desktop applications on Windows — launch, close, focus, resize, move windows, simulate keyboard/mouse input, manage processes, control VSCode, read clipboard, and capture screen info. Use when the user wants to interact with any running program, switch windows, type text, press shortcuts, open files in VSCode, manage running processes, or get system display information.
Conduct rigorous, adversarial code reviews with zero tolerance for mediocrity. Use when users ask to "critically review" my code or a PR, "critique my code", "find issues in my code", or "what's wrong with this code". Identifies security holes, lazy patterns, edge case failures, and bad practices across Python, R, JavaScript/TypeScript, SQL, and front-end code. Scrutinizes error handling, type safety, performance, accessibility, and code quality. Provides structured feedback with severity tiers (Blocking, Required, Suggestions) and specific, actionable recommendations.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.
Pragmatic coding standards for writing clean, maintainable code — naming, functions, structure, anti-patterns, and pre-edit safety checks. Use when writing new code, refactoring existing code, reviewing code quality, or establishing coding standards.
Claude Code integration for OpenClaw. This skill provides interfaces to: - Query Claude Code documentation from https://code.claude.com/docs - Manage subagents and coding tasks - Execute AI-assisted coding workflows - Access best practices and common workflows Use this skill when users want to: - Get help with coding tasks - Query Claude Code documentation - Manage AI-assisted development workflows - Execute complex programming tasks
Plan, draft, version, and refine written content with enforced versioning and quality audits.