Design and review maintainable Go CLI application boundaries, package layout, dependency direction, command factories, configuration ownership, adapters, services, storage, and composition roots.
SkillScore91Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 20 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill91%
Checks it passed that the model alone missed
Recommend passing dependencies directly to application services.
Recommend organizing packages around dependency direction and application behavior.
Recommend explicitly tracking resource ownership and registration of cleanup routines.
3 fixed17 passed either way2 still failing0 broke
Pass-rate lift
+14 pp
Tokens
+6%
Agent turns
0%
Response time
-15%
Model gemini-3.6-flashMeasured 8/16/2026v120 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
Our Go CLI tool spins up background log flushers and worker goroutines, and opens local database handles during execution. Currently, when `main()` exits or receives a signal, these resources are left open. How should resource lifecycles be managed?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommend explicitly tracking resource ownership and registration of cleanup routines.
Missed
Passed
Recommend ensuring cleanup logic executes before application exit.
Passed
Passed
case-12 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md48 linessingle file
Go CLI Application Architecture
Organize around dependency direction and testable behavior, not a copied folder
template. Keep CLI framework code as an adapter around application services.
Core Workflow
Identify commands, domain actions, external effects, and shared policies.
Separate parsing/rendering from application orchestration and adapters.
Define interfaces at the consumer that needs substitution.
Construct dependencies once in a composition root and pass them explicitly.
Keep configuration immutable after validation; give mutable state a dedicated store.
Record ownership and cleanup for every acquired resource and background task.
Test inward from pure logic to adapters and one assembled executable path.
Do not put domain behavior in Cobra Run functions.
Avoid a central interfaces package and broad catch-all service abstractions.
Do not use package globals or init for dependency construction.
Keep fallible I/O and order-dependent startup out of init; use explicit composition.
Keep runtime configuration distinct from mutable application storage.
Add layers only when they create a real seam, invariant, or dependency boundary.
Source Notes
Guidance is transformed and paraphrased from Marian Montagnino,
Building Modern CLI Applications in Go (Packt, 2023), especially Chapters
2-3, with original adaptations aligned to current Go conventions.