mirror of
https://github.com/samber/cc-skills-golang.git
synced 2026-09-11 19:46:44 +03:00
feat(skills): add golang-refactoring skill (#76)
* feat(skills): add golang-refactoring skill Adds a new skill covering the safe, at-scale process of refactoring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms (gopls Rename/Inline/Extract, gofmt -r, eg, gopatch, go/analysis fixers), the Fowler refactoring catalog mapped to Go, breaking import cycles and moving types across packages via type-alias gradual code repair, and a human-in-the-loop workflow of small staged PRs landed on a refactoring branch. The workflow persists its plan in the code itself via `// REFACTOR(step N): ...` markers (seeded when the refactoring branch is created, for large refactors only) since a multi-step refactor outlasts any single session's context, delegates each staged change to a sub-agent so the orchestrating session only keeps short results, and keeps intermediate PRs out of draft while the final merge-to-main PR is opened as one. The skill owns the process; it cross-references golang-naming, golang-project-layout, golang-code-style, golang-design-patterns, golang-modernize, golang-security/golang-safety, golang-lint, golang-testing, golang-benchmark, and golang-gopls for target-state rules and mechanics owned elsewhere, and those first five skills gained a reciprocal cross-reference back. golang-how-to's skill loading table, categories, and competing-clusters disambiguation are updated accordingly. * docs(golang-refactoring): reformat skill body into concise bullet lists Convert dense prose paragraphs across SKILL.md and all references/*.md into nested bullet points for scannability, without changing any rule, rationale, table, code block, or cross-reference. * chore(skills): bump version of skills cross-referencing golang-refactoring code-style, design-patterns, how-to, modernize, naming, and project-layout each gained a cross-reference to the new golang-refactoring skill; bump their patch version per the repo version-discipline convention. * fix(golang-refactoring): correct grammar in persona line (land change -> land changes)
This commit is contained in:
@@ -151,7 +151,7 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
|
||||
│ structs-iface│ │ data-structs │ │ observability │ │ stay-updated │
|
||||
│ documentation│ │ database │ │ │ │ dep-management │
|
||||
│ lint │ │ modernize │ │ │ │ gopls │
|
||||
│ security │ │ │ │ │ │ │
|
||||
│ security │ │ refactoring │ │ │ │ │
|
||||
└──────────────┘ └──────────────┘ └─────────────────┘ └──────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────────────┐
|
||||
@@ -197,6 +197,7 @@ These skills are designed as **atomic, cross-referencing units**. A skill may re
|
||||
| ⭐️ | ✅ `golang-how-to` | ⚡ | — | 165 | 2,254 | 10,372 |
|
||||
| ⭐️ | ✅ `golang-modernize` | ⚡ 🤖 | -61% | 68 | 2,780 | 9,093 |
|
||||
| ⭐️ | ✅ `golang-naming` | ⚡ ⚙️ | -23% | 158 | 2,865 | 7,233 |
|
||||
| ⭐️ | ✅ `golang-refactoring` | ⚡ 🧠 🤖 ⚙️ | — | 246 | 3,639 | 19,840 |
|
||||
| ⭐️ | ✅ `golang-safety` | ⚡ | -58% | 78 | 2,457 | 5,227 |
|
||||
| ⭐️ | ✅ `golang-testing` | ⚡ 🧠 🤖 ⚙️ | -32% | 113 | 3,105 | 6,212 |
|
||||
| ⭐️ | ✅ `golang-troubleshooting` | ⚡ 🧠 🤖 | -32% | 126 | 2,735 | 15,901 |
|
||||
@@ -314,6 +315,10 @@ Idiomatic Go design patterns. Functional options, constructors, builder pattern,
|
||||
|
||||
Modernize Go code to use recent language features. Range-over-int, min/max builtins, iterators, slices/maps/cmp/slog stdlib packages, testing patterns (t.Context, b.Loop, synctest), and tooling upgrades.
|
||||
|
||||
#### `golang-refactoring`
|
||||
|
||||
Safe, at-scale refactoring process for existing Go code. Coverage-adaptive safety net, tool-driven behavior-preserving transforms (gopls Rename/Inline/Extract, gofmt -r, eg, gopatch), the Fowler catalog mapped to Go, breaking import cycles, type-alias gradual code repair, and a human-in-the-loop workflow of staged PRs on a refactoring branch.
|
||||
|
||||
### QA & Performance
|
||||
|
||||
#### `golang-benchmark`
|
||||
|
||||
Reference in New Issue
Block a user