AB golang-refactoring
Golang refactoring — the safe, at-scale process for restructuring 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 catalog mapped to Go, breaking import cycles, moving types across packages, and a human-in-the-loop workflow of small stacked PRs on a refactoring branch. Apply when code is hard to maintain, a function/type has grown too large, a code smell needs fixing, adding a feature is blocked by the current structure, or the user asks to clean up, refactor, or improve Go code — also for renaming at scale, extracting functions/interfaces, moving code between packages, splitting packages, or planning a multi-step refactor. Target styles owned elsewhere → See `samber/cc-skills-golang@golang-naming` (renames), `@golang-project-layout` (splits), `@golang-modernize` (idioms), `@golang-code-style` (control flow), `@golang-design-patterns` (patterns/DI).
Golang refactoring — the safe, at-scale process for restructuring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms…
As a process B 66/100 · Nearly there — weak spots: result and completion, inputs and preconditions, running it twice
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 0
✓ No critical or high findings
Files scanned: 7. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- note
frontmatter-keyunknown frontmatter key "paths"
Process rating: all ten parameters 66/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Progress reporting. Says nothing while it works
- 30Running it twice. 12 mutating operations with no state check
- 55Failures and branches. 1 branches
- 100Tools and files. Tools declared in frontmatter
- 100Steps. 79 steps
- 100When it triggers. States when to use and when not to
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 3633 tokens
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 998: 120–800 characters recommended
- +3Output format is not stated: the model decides each time
- +4No input/output examples
- -5TODO / placeholder text left in the skill
- +2Single-language instructions
- +4Structure: 8 headings
- +3Step-by-step instructions: 79 items
- +4Reference files are cited in the instructions (5 of 5)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 76.