# Agent Skills for production-ready Golang projects AI agent skills are reusable instruction sets that extend your coding assistant with domain-specific expertise, loaded on demand so they don't bloat your context. This repository covers **Go-specific** skills only (language, testing, security, observability, etc.); for dev workflow skills (git conventions, CI/CD, PR reviews) you'll want to add a separate skills plugin. For generic skills, please visit [cc-skills](https://github.com/samber/cc-skills). > [!IMPORTANT] Bootstrapped with Claude Code by distilling my Go project commits. **Edited, tested, reviewed and reworked by a human**. > > **No AI slop here.** AI-made skills are useless. image ## ๐Ÿš€ How to use **Install with [skills](https://skills.sh/) CLI** (universal, works with any [Agent Skills](https://agentskills.io)-compatible tool): ```bash npx skills add https://github.com/samber/cc-skills-golang --all # or a single skill: npx skills add https://github.com/samber/cc-skills-golang --skill golang-performance ```
Claude Code ```bash /plugin marketplace add samber/cc /plugin install cc-skills-golang@samber ```
Openclaw Copy skills into the cross-client discovery directory: ```bash git clone https://github.com/samber/cc-skills-golang.git ~/.openclaw/skills/cc-skills-golang # or in workspace: git clone https://github.com/samber/cc-skills-golang.git ~/.openclaw/workspace/skills/cc-skills-golang ```
Gemini CLI ```bash gemini extensions install https://github.com/samber/cc-skills-golang ``` Update with `gemini extensions update cc-skills-golang`.
Cursor Copy skills into the cross-client discovery directory: ```bash git clone https://github.com/samber/cc-skills-golang.git ~/.cursor/skills/cc-skills-golang ``` Cursor auto-discovers skills from `.agents/skills/` and `.cursor/skills/`.
Copilot Copy skills into the cross-client discovery directory: ```bash /plugin install https://github.com/samber/cc-skills-golang # or git clone https://github.com/samber/cc-skills-golang.git ~/.copilot/skills/cc-skills-golang ``` Copilot auto-discovers skills from `.copilot/skills/`.
OpenCode Copy skills into the cross-client discovery directory: ```bash git clone https://github.com/samber/cc-skills-golang.git ~/.agents/skills/cc-skills-golang ``` OpenCode auto-discovers skills from `.agents/skills/`, `.opencode/skills/`, and `.claude/skills/`.
Codex (OpenAI) Clone into the cross-client discovery path: ```bash git clone https://github.com/samber/cc-skills-golang.git ~/.agents/skills/cc-skills-golang ``` Codex auto-discovers skills from `~/.agents/skills/` and `.agents/skills/`. Update with `cd ~/.agents/skills/cc-skills-golang && git pull`.
Antigravity Clone and symlink into the cross-client discovery path: ```bash git clone https://github.com/samber/cc-skills-golang.git ~/.antigravity/skills/cc-skills-golang ``` Update with `cd ~/.antigravity/skills/cc-skills-golang && git pull`.
## ๐Ÿงฉ Skills These skills are designed as **atomic, cross-referencing units**. A skill may reference conventions defined in another (e.g. error-handling rules that affect logging live in `golang-error-handling`, not `golang-observability`). Installing only a subset will give you a partial and potentially inconsistent view of the guidelines. For best results, install all general-purpose skills together. - โญ๏ธ Recommended - โœ… Published - ๐Ÿ‘ท Work in progress - โŒ To-do - โšก Command available - ๐Ÿง  Ultrathink automatically - โš™๏ธ Overridable (see doc below) - **Description (tok)**: weight of the `description` field from YAML frontmatter, always loaded into Claude's context for skill triggering - **SKILL.md (tok)**: weight of the full `SKILL.md` file loaded when the skill triggers - **Directory (tok)**: weight of all files in the skill directory (SKILL.md + referenced markdown files) **General purpose:** | | Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) | | --- | --- | --- | --- | --- | --- | --- | | โญ๏ธ | โœ… `golang-code-style` | โšก โš™๏ธ | -40% | 31 | 2,069 | 2,685 | | โญ๏ธ | โœ… `golang-data-structures` | โšก | -39% | 92 | 2,464 | 6,176 | | โญ๏ธ | โœ… `golang-database` | โšก โš™๏ธ | -38% | 112 | 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-how-to` | | โ€” | 0 | 0 | 0 | | โญ๏ธ | โœ… `golang-modernize` | โšก | -61% | 113 | 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-security` | โšก ๐Ÿง  | -32% | 84 | 2,873 | 20,894 | | | โœ… `golang-benchmark` | โšก ๐Ÿง  | -50% | 92 | 2,135 | 29,248 | | | โœ… `golang-cli` | โšก | -43% | 73 | 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-structs-interfaces` | โšก โš™๏ธ | -35% | 110 | 2,999 | 2,999 | | | โœ… `golang-linter` | โšก | -41% | 119 | 1,714 | 5,493 | | | โœ… `golang-observability` | โšก โš™๏ธ | -37% | 144 | 2,921 | 18,453 | | | โœ… `golang-performance` | โšก ๐Ÿง  | -39% | 108 | 1,953 | 17,855 | | | โœ… `golang-popular-libraries` | โšก | -30% | 61 | 788 | 4,131 | | | โœ… `golang-project-layout` | โšก | -38% | 66 | 1,510 | 5,718 | | | โœ… `golang-stay-updated` | โšก | -56% | 43 | 1,916 | 1,916 | **Tools:** | Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) | | --- | --- | --- | --- | --- | --- | | โŒ `golang-google-wire` | | โ€” | 0 | 0 | 0 | | โŒ `golang-graphql` | | โ€” | 0 | 0 | 0 | | โœ… `golang-grpc` | โšก | -41% | 69 | 2,149 | 4,965 | | โŒ `golang-spf13-cobra` | | โ€” | 0 | 0 | 0 | | โŒ `golang-spf13-viper` | | โ€” | 0 | 0 | 0 | | โŒ `golang-swagger` | | โ€” | 0 | 0 | 0 | | โŒ `golang-uber-dig` | | โ€” | 0 | 0 | 0 | | โŒ `golang-uber-fx` | | โ€” | 0 | 0 | 0 | | โœ… `golang-samber-do` | โšก | -81% | 70 | 1,746 | 3,269 | | โœ… `golang-samber-hot` | โšก | -54% | 118 | 1,843 | 7,273 | | โœ… `golang-samber-lo` | โšก | -40% | 155 | 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-slog` | โšก | -19% | 118 | 2,588 | 9,234 | | โŒ `golang-temporal` | | โ€” | 0 | 0 | 0 | | โœ… `golang-stretchr-testify` | โšก | -47% | 89 | 1,714 | 2,533 | ## ๐Ÿงช Skill evaluations | | With Skill | Without Skill | Delta | | ----------- | ------------------- | ------------------- | --------- | | **Overall** | **3065/3141 (98%)** | **1691/3141 (54%)** | **+44pp** | See [EVALUATIONS.md](./EVALUATIONS.md) for the full per-skill breakdown. ## ๐ŸŽฏ Tuning Skill Triggers If a skill triggers too often or not often enough, please [open an issue](https://github.com/samber/cc-skills-golang/issues) suggesting a description change. The `description` field in SKILL.md frontmatter is the primary triggering mechanism โ€” small wording adjustments can significantly improve trigger accuracy. Some `SKILL.md` files might have a `When to use` section which is another level of exclusion. Finally, `SKILL.md` files are an entrypoint for lazy loading references with deep knowledge located in `references/`. ## ๐Ÿ”„ Overlap Claude reports very little overlap between skills in this repo, thanks to cross-reference. I suggest enabling most of the skills and leveraging lazy loading. The recommended โญ๏ธ skills load ~1,100 tokens of descriptions at startup; full skill content is only pulled in when relevant. Note: - I estimate that 50% of `golang-naming` and `golang-code-style` overlap with linters (golangci-lint). - A large part of the security rules in `golang-security` have been distilled from the Bearer (SAST) checklist. The skill is still useful for methodology. - If your team has its own conventions, create a company skill and declare the override explicitly near the top of its body: `This skill supersedes samber/cc-skills-golang@golang-naming skill for [company] projects.` Skills marked โš™๏ธ in the table above support this mechanism. ## โœ๏ธ Contribute - **100 tokens per skill description** - what? when to use this skill? - **1.000โ€“2.500 tokens per SKILL.md** โ€” keep the main file focused on essentials - **Use secondary markdown files for depth** โ€” reference them from SKILL.md with relative links (e.g., `[Logging](./logging.md)`). Claude reads these on demand when the topic is relevant, so they don't count against the context budget until needed - **Up to 10.000 tokens** for full skill and secondary files - **2โ€“4 skills loaded simultaneously** in a typical session โ€” design skills to coexist - **Stay below ~10k tokens of total loaded SKILL.md** anytime to avoid degrading response quality For more guidelines, please check `CLAUDE.md`. ## ๐Ÿ’ซ Fuel the Revolution - โญ๏ธ **Star this repo** - Your star powers the caffeine engine! - โ˜•๏ธ **Buy me a coffee** - I'll literally use it to build more skills while drinking actual coffee [![GitHub Sponsors](https://img.shields.io/github/sponsors/samber?style=for-the-badge)](https://github.com/sponsors/samber) ## ๐Ÿ“ License Copyright ยฉ 2026 [Samuel Berthe](https://github.com/samber). This project is under [MIT](./LICENSE) license.