diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 9e601e4..bedb622 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "cc-skills-golang", "description": "AI Agent Skills for production-ready Go projects", - "version": "1.4.0", + "version": "1.5.0", "author": { "name": "Samuel Berthe", "email": "hey@samuel-berthe.fr" diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index b0c86f8..61786bc 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -2,7 +2,7 @@ "name": "cc-skills-golang", "displayName": "Skills for Golang", "description": "AI Agent Skills for production-ready Go projects", - "version": "1.4.0", + "version": "1.5.0", "author": { "name": "Samuel Berthe", "email": "hey@samuel-berthe.fr" diff --git a/CLAUDE.md b/CLAUDE.md index 653fb42..222426b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -170,6 +170,7 @@ Polanyi's paradox: most operational knowledge is tacit and resists explicit desc ### Token budgets - **~100 tokens per description** — loaded at startup for all skills +- **≤ 1,000 characters per description** — hard limit; keep descriptions focused and scannable - **< 5.000 tokens per SKILL.md** (spec recommendation) — keep focused on essentials - **< 2.500 tokens per SKILL.md** (project recommendation) - **< 500 lines per SKILL.md** — move detailed reference material to `references/` @@ -565,6 +566,13 @@ After making changes, suggest the following as next steps for the developer to r For initial evaluation of skills, use Human-as-Judge. +### After creating a new skill + +After writing a new skill body, run the description optimization loop before marking it ready: + +1. Verify the description against quality criteria: contains "Golang", has "Use when"/"Apply when" trigger clause with specific scenarios, no broad anti-patterns (`whenever writing Go code`, `Essential for ANY`, `proactively`), FQN cross-refs for competing skills (`samber/cc-skills-golang@`), library skills use `Apply when the codebase imports github.com/...` pattern. Description must stay ≤ 1,000 characters. +2. Follow the [After updating a skill](#after-updating-a-skill) checklist. + ### Checking for outdated skills Skills covering a specific library or framework can become stale when the project releases breaking changes or new APIs. Run this check periodically (e.g. monthly) to surface outdated skills. diff --git a/README.md b/README.md index 8f1b866..7a85017 100644 --- a/README.md +++ b/README.md @@ -182,32 +182,32 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re | | Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) | | --- | --- | --- | --- | --- | --- | --- | -| ⭐️ | ✅ `golang-code-style` | ⚡ ⚙️ | -40% | 31 | 2,069 | 2,685 | +| ⭐️ | ✅ `golang-code-style` | ⚡ ⚙️ | -40% | 115 | 2,069 | 2,685 | | ⭐️ | ✅ `golang-data-structures` | ⚡ | -39% | 92 | 2,464 | 6,176 | -| ⭐️ | ✅ `golang-database` | ⚡ ⚙️ | -38% | 112 | 2,725 | 7,248 | +| ⭐️ | ✅ `golang-database` | ⚡ ⚙️ | -38% | 97 | 2,725 | 7,248 | | ⭐️ | ✅ `golang-design-patterns` | ⚡ ⚙️ | -37% | 66 | 2,610 | 9,316 | | ⭐️ | ✅ `golang-documentation` | ⚡ ⚙️ | -53% | 73 | 2,678 | 10,549 | -| ⭐️ | ✅ `golang-error-handling` | ⚡ ⚙️ | -26% | 90 | 1,520 | 4,394 | +| ⭐️ | ✅ `golang-error-handling` | ⚡ ⚙️ | -26% | 139 | 1,520 | 4,394 | | ⭐️ | 👷 `golang-how-to` | | — | 0 | 0 | 0 | -| ⭐️ | ✅ `golang-modernize` | ⚡ | -61% | 113 | 2,476 | 7,599 | +| ⭐️ | ✅ `golang-modernize` | ⚡ | -61% | 68 | 2,476 | 7,599 | | ⭐️ | ✅ `golang-naming` | ⚡ ⚙️ | -23% | 158 | 2,865 | 7,233 | -| ⭐️ | ✅ `golang-safety` | ⚡ | -58% | 85 | 2,457 | 5,227 | -| ⭐️ | ✅ `golang-testing` | ⚡ 🧠 ⚙️ | -32% | 98 | 3,105 | 6,212 | -| ⭐️ | ✅ `golang-troubleshooting` | ⚡ 🧠 | -32% | 106 | 2,735 | 15,901 | +| ⭐️ | ✅ `golang-safety` | ⚡ | -58% | 78 | 2,457 | 5,227 | +| ⭐️ | ✅ `golang-testing` | ⚡ 🧠 ⚙️ | -32% | 113 | 3,105 | 6,212 | +| ⭐️ | ✅ `golang-troubleshooting` | ⚡ 🧠 | -32% | 126 | 2,735 | 15,901 | | ⭐️ | ✅ `golang-security` | ⚡ 🧠 | -32% | 84 | 2,873 | 20,894 | -| | ✅ `golang-benchmark` | ⚡ 🧠 | -50% | 92 | 2,135 | 29,248 | -| | ✅ `golang-cli` | ⚡ | -43% | 73 | 2,274 | 6,089 | +| | ✅ `golang-benchmark` | ⚡ 🧠 | -50% | 99 | 2,135 | 29,248 | +| | ✅ `golang-cli` | ⚡ | -43% | 122 | 2,274 | 6,089 | | | ✅ `golang-concurrency` | ⚡ ⚙️ | -39% | 71 | 1,873 | 6,338 | -| | ✅ `golang-context` | ⚡ ⚙️ | -34% | 41 | 1,144 | 3,940 | -| | ✅ `golang-continuous-integration` | ⚡ | -59% | 105 | 2,835 | 6,477 | -| | ✅ `golang-dependency-injection` | ⚡ ⚙️ | -47% | 104 | 2,842 | 5,113 | -| | ✅ `golang-dependency-management` | ⚡ | -54% | 94 | 1,877 | 4,957 | +| | ✅ `golang-context` | ⚡ ⚙️ | -34% | 80 | 1,144 | 3,940 | +| | ✅ `golang-continuous-integration` | ⚡ | -59% | 82 | 2,835 | 6,477 | +| | ✅ `golang-dependency-injection` | ⚡ ⚙️ | -47% | 176 | 2,842 | 5,113 | +| | ✅ `golang-dependency-management` | ⚡ | -54% | 77 | 1,877 | 4,957 | | | ✅ `golang-structs-interfaces` | ⚡ ⚙️ | -35% | 110 | 2,999 | 2,999 | -| | ✅ `golang-lint` | ⚡ | -41% | 119 | 1,714 | 5,493 | -| | ✅ `golang-observability` | ⚡ ⚙️ | -37% | 144 | 2,921 | 18,453 | -| | ✅ `golang-performance` | ⚡ 🧠 | -39% | 108 | 1,953 | 17,855 | +| | ✅ `golang-lint` | ⚡ | -41% | 98 | 1,714 | 5,493 | +| | ✅ `golang-observability` | ⚡ ⚙️ | -37% | 161 | 2,921 | 18,453 | +| | ✅ `golang-performance` | ⚡ 🧠 | -39% | 127 | 1,953 | 17,855 | | | ✅ `golang-popular-libraries` | ⚡ | -30% | 61 | 788 | 4,131 | -| | ✅ `golang-project-layout` | ⚡ | -38% | 66 | 1,510 | 5,718 | +| | ✅ `golang-project-layout` | ⚡ | -38% | 69 | 1,510 | 5,718 | | | ✅ `golang-stay-updated` | ⚡ | -56% | 43 | 1,916 | 1,916 | **Tools:** @@ -222,15 +222,15 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re | ✅ `golang-swagger` | ⚡ | — | 144 | 2,125 | 3,123 | | ✅ `golang-uber-dig` | ⚡ | -10% | 107 | 2,264 | 5,904 | | ✅ `golang-uber-fx` | ⚡ | -5% | 118 | 2,499 | 6,747 | -| ✅ `golang-samber-do` | ⚡ | -81% | 70 | 1,746 | 3,269 | +| ✅ `golang-samber-do` | ⚡ | -81% | 71 | 1,746 | 3,269 | | ✅ `golang-samber-hot` | ⚡ | -54% | 118 | 1,843 | 7,273 | -| ✅ `golang-samber-lo` | ⚡ | -40% | 155 | 2,410 | 10,031 | +| ✅ `golang-samber-lo` | ⚡ | -40% | 165 | 2,410 | 10,031 | | ✅ `golang-samber-mo` | ⚡ 🧠 | -48% | 81 | 2,800 | 11,215 | | ✅ `golang-samber-oops` | ⚡ | -59% | 69 | 2,380 | 2,692 | -| ✅ `golang-samber-ro` | ⚡ 🧠 | -50% | 140 | 2,845 | 11,136 | +| ✅ `golang-samber-ro` | ⚡ 🧠 | -50% | 152 | 2,845 | 11,136 | | ✅ `golang-samber-slog` | ⚡ | -19% | 118 | 2,588 | 9,234 | | ❌ `golang-temporal` | | — | 0 | 0 | 0 | -| ✅ `golang-stretchr-testify` | ⚡ | -47% | 89 | 1,714 | 2,533 | +| ✅ `golang-stretchr-testify` | ⚡ | -47% | 90 | 1,714 | 2,533 | ## 🧪 Skill evaluations diff --git a/gemini-extension.json b/gemini-extension.json index 1b2b92f..545bc27 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,5 +1,5 @@ { "name": "cc-skills-golang", - "version": "1.4.0", + "version": "1.5.0", "description": "AI Agent Skills for production-ready Go projects" } \ No newline at end of file diff --git a/skills/golang-benchmark/SKILL.md b/skills/golang-benchmark/SKILL.md index adfc1ce..345aabe 100644 --- a/skills/golang-benchmark/SKILL.md +++ b/skills/golang-benchmark/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-benchmark -description: "Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while golang-performance provides the optimization patterns." +description: "Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber/cc-skills-golang@golang-performance` provides the optimization patterns." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "📊" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-cli/SKILL.md b/skills/golang-cli/SKILL.md index eee2a90..d861c04 100644 --- a/skills/golang-cli/SKILL.md +++ b/skills/golang-cli/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-cli -description: "Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli." +description: "Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli. For cobra-specific APIs → See `samber/cc-skills-golang@golang-spf13-cobra` skill; for viper configuration layering → See `samber/cc-skills-golang@golang-spf13-viper` skill." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "💻" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-code-style/SKILL.md b/skills/golang-code-style/SKILL.md index 02d0057..8968872 100644 --- a/skills/golang-code-style/SKILL.md +++ b/skills/golang-code-style/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-code-style -description: "Golang code style, formatting and conventions. Use when writing Go code, reviewing style, configuring linters, writing comments, or establishing project standards." +description: "Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🎨" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-context/SKILL.md b/skills/golang-context/SKILL.md index f2b44dc..45a61c7 100644 --- a/skills/golang-context/SKILL.md +++ b/skills/golang-context/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-context -description: "Idiomatic context.Context usage in Golang — creation, propagation, cancellation, timeouts, deadlines, context values, and cross-service tracing. Apply when working with context.Context in any Go code." +description: "Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or unexpired contexts, choosing between context.Background/TODO/WithoutCancel, or storing values in context. Not for code that merely accepts ctx as first parameter." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.1" + version: "1.2.0" openclaw: emoji: "🔗" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-continuous-integration/SKILL.md b/skills/golang-continuous-integration/SKILL.md index 0f5128f..dbc0151 100644 --- a/skills/golang-continuous-integration/SKILL.md +++ b/skills/golang-continuous-integration/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-continuous-integration -description: "Provides CI/CD pipeline configuration using GitHub Actions for Golang projects. Covers testing, linting, SAST, security scanning, code coverage, Dependabot, Renovate, GoReleaser, code review automation, and release pipelines. Use this whenever setting up CI for a Go project, configuring workflows, adding linters or security scanners, setting up Dependabot or Renovate, automating releases, or improving an existing CI pipeline. Also use when the user wants to add quality gates to their Go project." +description: "CI/CD pipeline configuration using GitHub Actions for Golang projects — testing, linting, SAST, security scanning, code coverage, Dependabot, Renovate, GoReleaser, code review automation, and release pipelines. Use when setting up or improving Go project CI, configuring GitHub Actions workflows, adding linters or security scanners, automating dependency updates, or adding quality gates." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.2.0" + version: "1.3.0" openclaw: emoji: "🚀" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-database/SKILL.md b/skills/golang-database/SKILL.md index be0d65a..292d952 100644 --- a/skills/golang-database/SKILL.md +++ b/skills/golang-database/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-database -description: "Comprehensive guide for Go database access. Covers parameterized queries, struct scanning, NULLable column handling, error patterns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use this skill whenever writing, reviewing, or debugging Golang code that interacts with PostgreSQL, MariaDB, MySQL, or SQLite. Also triggers for database testing or any question about database/sql, sqlx, pgx, or SQL queries in Golang. This skill explicitly does NOT generate database schemas or migration SQL." +description: "Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL, MariaDB, MySQL, or SQLite; for database testing; or for questions about database/sql, sqlx, or pgx. Does NOT generate database schemas or migration SQL." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🗄️" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-dependency-injection/SKILL.md b/skills/golang-dependency-injection/SKILL.md index dd7a2be..218ad7e 100644 --- a/skills/golang-dependency-injection/SKILL.md +++ b/skills/golang-dependency-injection/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-dependency-injection -description: "Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go." +description: "Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go. For a specific DI library, → See `samber/cc-skills-golang@golang-google-wire`, `samber/cc-skills-golang@golang-uber-dig`, `samber/cc-skills-golang@golang-uber-fx`, or `samber/cc-skills-golang@golang-samber-do` skills." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🔌" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-dependency-management/SKILL.md b/skills/golang-dependency-management/SKILL.md index 7158a33..818e71f 100644 --- a/skills/golang-dependency-management/SKILL.md +++ b/skills/golang-dependency-management/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-dependency-management -description: "Provides dependency management strategies for Golang projects including go.mod management, installing/upgrading packages, semantic versioning, Minimal Version Selection, vulnerability scanning, outdated dependency tracking, dependency size analysis, automated updates with Dependabot/Renovate, conflict resolution, and dependency graph visualization. Use this skill whenever adding, removing, updating, or auditing Go dependencies, resolving version conflicts, setting up automated dependency updates, analyzing binary size, or working with go.work workspaces." +description: "Dependency management strategies for Golang projects — go.mod management, installing/upgrading packages, Minimal Version Selection, vulnerability scanning, outdated dependency tracking, binary size analysis, Dependabot/Renovate setup, conflict resolution, and go.work workspaces. Use when adding, removing, or upgrading Go dependencies, auditing vulnerabilities, resolving version conflicts, or setting up automated dependency updates." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "📦" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-error-handling/SKILL.md b/skills/golang-error-handling/SKILL.md index 2dc74df..dc561ed 100644 --- a/skills/golang-error-handling/SKILL.md +++ b/skills/golang-error-handling/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-error-handling -description: "Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code." +description: "Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops` skill; for slog handler ecosystem → See `samber/cc-skills-golang@golang-samber-slog` skill." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "⚠️" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-lint/SKILL.md b/skills/golang-lint/SKILL.md index 3fde158..4b4a149 100644 --- a/skills/golang-lint/SKILL.md +++ b/skills/golang-lint/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-lint -description: "Provides linting best practices and golangci-lint configuration for Go projects. Covers running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and managing linter settings. Use this skill whenever the user runs linters, configures golangci-lint, asks about lint warnings or suppressions, sets up code quality tooling, or asks which linters to enable for a Go project. Also use when the user mentions golangci-lint, go vet, staticcheck, revive, or any Go linting tool." +description: "Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code quality tooling, or choosing linters. Also use when the user mentions golangci-lint, go vet, staticcheck, or revive." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🧹" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-modernize/SKILL.md b/skills/golang-modernize/SKILL.md index 5a6fc61..7e7eb66 100644 --- a/skills/golang-modernize/SKILL.md +++ b/skills/golang-modernize/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-modernize -description: "Continuously modernize Golang code to use the latest language features, standard library improvements, and idiomatic patterns. Use this skill whenever writing, reviewing, or refactoring Go code to ensure it leverages modern Go idioms. Also use when the user asks about Go upgrades, migration, modernization, deprecation, or when modernize linter reports issues. Also covers tooling modernization: linters, SAST, AI-powered code review in CI, and modern development practices. Trigger this skill proactively when you notice old-style Go patterns that have modern replacements." +description: "Modernize Golang code to use recent language features, standard library improvements, and idiomatic patterns. Trigger proactively when writing or reviewing Go code and old-style patterns are detected, or when encountering a deprecation warning. Also use when the user explicitly asks for modernization, a Go version upgrade, or a CI/tooling refresh." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.4" + version: "1.2.0" openclaw: emoji: "🔄" homepage: https://github.com/samber/cc-skills-golang @@ -34,6 +34,8 @@ This skill helps you continuously modernize Go codebases by replacing outdated p You MUST NEVER conduct large refactoring if the developer is working on a different task. But TRY TO CONVINCE your human it would improve the code quality. +**Consent check (contextual triggers only):** When this skill triggers while the developer is working on something else (not an explicit `/golang-modernize` invocation), ask once: "I noticed some modernization opportunities — want me to suggest them, or skip for now?" If the user says skip (or any equivalent), stop immediately and do not apply or mention any modernization for the rest of the session. Do not ask again in the current session. + ## Workflow When invoked: diff --git a/skills/golang-observability/SKILL.md b/skills/golang-observability/SKILL.md index 94b93a7..6b451a9 100644 --- a/skills/golang-observability/SKILL.md +++ b/skills/golang-observability/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-observability -description: "Golang everyday observability — the always-on signals in production. Covers structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing, continuous profiling with pprof/Pyroscope, server-side RUM event tracking, alerting, and Grafana dashboards. Apply when instrumenting Go services for production monitoring, setting up metrics or alerting, adding OpenTelemetry tracing, correlating logs with traces, migrating legacy loggers (zap/logrus/zerolog) to slog, adding observability to new features, or implementing GDPR/CCPA-compliant tracking with Customer Data Platforms (CDP). Not for temporary deep-dive performance investigation (→ See golang-benchmark and golang-performance skills)." +description: "Golang everyday observability — the always-on signals in production. Covers structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing, continuous profiling with pprof/Pyroscope, server-side RUM event tracking, alerting, and Grafana dashboards. Apply when instrumenting Go services for production monitoring, setting up metrics or alerting, adding OpenTelemetry tracing, correlating logs with traces, migrating legacy loggers (zap/logrus/zerolog) to slog, adding observability to new features, or implementing GDPR/CCPA-compliant tracking with Customer Data Platforms (CDP). Not for temporary deep-dive performance investigation (→ See `samber/cc-skills-golang@golang-benchmark` and `samber/cc-skills-golang@golang-performance` skills)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "📡" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-performance/SKILL.md b/skills/golang-performance/SKILL.md index 37fda75..542cf8b 100644 --- a/skills/golang-performance/SKILL.md +++ b/skills/golang-performance/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-performance -description: "Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (see golang-benchmark skill) or debugging workflow (see golang-troubleshooting skill)." +description: "Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (→ See `samber/cc-skills-golang@golang-benchmark` skill) or debugging workflow (→ See `samber/cc-skills-golang@golang-troubleshooting` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🏎️" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-project-layout/SKILL.md b/skills/golang-project-layout/SKILL.md index d5e7383..8993046 100644 --- a/skills/golang-project-layout/SKILL.md +++ b/skills/golang-project-layout/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-project-layout -description: "Provides a guide for setting up Golang project layouts and workspaces. Use this whenever starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, or deciding on directory structure. Apply this for any Go project initialization or restructuring work." +description: "Provides a guide for setting up Golang project layouts and workspaces. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, deciding between cmd/internal/pkg directory conventions, or discussing package restructuring, package splits, or module splits." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "📁" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-safety/SKILL.md b/skills/golang-safety/SKILL.md index 56d3c5f..0fc0d4c 100644 --- a/skills/golang-safety/SKILL.md +++ b/skills/golang-safety/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-safety -description: "Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use whenever writing or reviewing Go code that involves nil-prone types (pointers, interfaces, maps, slices, channels), numeric conversions, resource lifecycle (defer in loops), or defensive copying. Also triggers on questions about nil panics, append aliasing, map concurrent access, float comparison, or zero-value design." +description: "Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use when encountering nil panics, append aliasing, map concurrent access, float comparison pitfalls, or zero-value design questions. Also use when reviewing code for nil-safety, numeric conversion overflow, resource lifecycle issues (defer in loops), or defensive copying of slices and maps." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🛡️" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-samber-do/SKILL.md b/skills/golang-samber-do/SKILL.md index b623738..aaf9034 100644 --- a/skills/golang-samber-do/SKILL.md +++ b/skills/golang-samber-do/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-samber-do -description: "Implements dependency injection in Golang using samber/do. Apply this skill when working with dependency injection, setting up service containers, managing service lifecycles, or when you see code using github.com/samber/do/v2. Also use when refactoring manual dependency injection, implementing health checks, graceful shutdown, or organizing services into scopes/modules." +description: "Dependency injection in Golang using samber/do — service containers, lifecycle management, scopes, health checks, graceful shutdown, and module organization. Apply when using or adopting samber/do, when the codebase imports github.com/samber/do or github.com/samber/do/v2, or when refactoring manual constructor injection into a DI container." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "💉" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-samber-lo/SKILL.md b/skills/golang-samber-lo/SKILL.md index 7597f04..86e9da2 100644 --- a/skills/golang-samber-lo/SKILL.md +++ b/skills/golang-samber-lo/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-samber-lo -description: "Functional programming helpers for Golang using samber/lo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurrency (Map, Filter, Reduce, GroupBy, Chunk, Flatten, Find, Uniq, etc.). Core immutable package (lo), concurrent variants (lo/parallel aka lop), in-place mutations (lo/mutable aka lom), lazy iterators (lo/it aka loi for Go 1.23+), and experimental SIMD (lo/exp/simd). Apply when using or adopting samber/lo, when the codebase imports github.com/samber/lo, or when implementing functional-style data transformations in Go. Not for streaming pipelines (→ See golang-samber-ro skill)." +description: "Functional programming helpers for Golang using samber/lo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurrency (Map, Filter, Reduce, GroupBy, Chunk, Flatten, Find, Uniq, etc.). Core immutable package (lo), concurrent variants (lo/parallel aka lop), in-place mutations (lo/mutable aka lom), lazy iterators (lo/it aka loi for Go 1.23+), and experimental SIMD (lo/exp/simd). Apply when using or adopting samber/lo, when the codebase imports github.com/samber/lo, or when implementing functional-style data transformations in Go. Not for streaming pipelines (→ See `samber/cc-skills-golang@golang-samber-ro` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.0.3" + version: "1.1.0" openclaw: emoji: "🧰" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-samber-ro/SKILL.md b/skills/golang-samber-ro/SKILL.md index 55570e0..74ef7b2 100644 --- a/skills/golang-samber-ro/SKILL.md +++ b/skills/golang-samber-ro/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-samber-ro -description: "Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure, error propagation, and Go context integration. Apply when using or adopting samber/ro, when the codebase imports github.com/samber/ro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (-> See golang-samber-lo skill)." +description: "Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure, error propagation, and Go context integration. Apply when using or adopting samber/ro, when the codebase imports github.com/samber/ro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (→ See `samber/cc-skills-golang@golang-samber-lo` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.0.4" + version: "1.1.0" openclaw: emoji: "👁️" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-stretchr-testify/SKILL.md b/skills/golang-stretchr-testify/SKILL.md index b6443db..01ef845 100644 --- a/skills/golang-stretchr-testify/SKILL.md +++ b/skills/golang-stretchr-testify/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-stretchr-testify -description: "Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use whenever writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Essential for testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Trigger on any Go test file importing testify." +description: "Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com/stretchr/testify." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "✅" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-testing/SKILL.md b/skills/golang-testing/SKILL.md index a1894ee..5799b57 100644 --- a/skills/golang-testing/SKILL.md +++ b/skills/golang-testing/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-testing -description: "Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, memory leaks, CI with GitHub Actions, and idiomatic naming conventions. Use this whenever writing tests, asking about testing patterns or setting up CI for Go projects. Essential for ANY test-related conversation in Go." +description: "Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber/cc-skills-golang@golang-benchmark`." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.3" + version: "1.2.0" openclaw: emoji: "🧪" homepage: https://github.com/samber/cc-skills-golang diff --git a/skills/golang-troubleshooting/SKILL.md b/skills/golang-troubleshooting/SKILL.md index 583ffd2..12743f8 100644 --- a/skills/golang-troubleshooting/SKILL.md +++ b/skills/golang-troubleshooting/SKILL.md @@ -1,12 +1,12 @@ --- name: golang-troubleshooting -description: "Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (see golang-benchmark skill) or applying optimization patterns (see golang-performance skill)." +description: "Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber/cc-skills-golang@golang-benchmark` skill) or applying optimization patterns (→ See `samber/cc-skills-golang@golang-performance` skill)." user-invocable: true license: MIT compatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang. metadata: author: samber - version: "1.1.2" + version: "1.2.0" openclaw: emoji: "🔍" homepage: https://github.com/samber/cc-skills-golang