con un clic
ds-go-review
Review Go code with Tiger Style constraints and Go idioms.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Review Go code with Tiger Style constraints and Go idioms.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Design a target architecture for a new system — module boundaries, dependency rules, seams, and build order — from its requirements. Reports a blueprint; changes nothing.
Analyze an existing codebase's architecture and produce a sequenced refactoring plan — assess module boundaries, dependency structure, and layering, then lay out ordered, risk-tagged steps. Language-agnostic. Reports a plan; changes nothing.
Turn a goal or another command's output into an ordered task roadmap.
Find the root cause of a failure with the scientific method — reproduce, isolate, fix, then prove it.
Interview the user relentlessly about a plan or design until reaching shared understanding.
Run an extremely strict maintainability + single-source-of-truth review of code changes — abstraction quality, file sprawl, spaghetti-condition growth, and duplicate/competing implementations. Reports findings by default; `--fix` applies the mechanical, unambiguous ones — structural/code-judo restructurings rest on judgment and stay reported.
| name | ds-go-review |
| description | Review Go code with Tiger Style constraints and Go idioms. |
| disable-model-invocation | true |
Applies to: Go 1.24+. Backend services, CLIs, APIs.
Scan the invocation for the --no-tiger, --fix, and --full flags. Treat every other argument as review scope (files or directories); if no scope is given, review the changed files on the current branch.
--no-tiger present → skip the Tiger Style section; run Go Idioms, Performance, Security, and Testing only.--no-tiger absent → run all sections (default).--fix → after reporting, apply only the violations whose fix is mechanical and unambiguous (a rename to the idiom, a missing error check the review is certain about). Anything that changes logic or rests on an unverified assumption — especially security and correctness findings — stays report-only. After applying, re-run any build/test/lint check already in the loop and revert any fix that breaks it — or that touched more than the intended mechanical edit. End with a summary of what was applied and what was left.--full → review the entire codebase instead of just the branch's changes. Explicit positional scope still wins; --full only replaces the no-scope default.Example: /ds-go-review --no-tiger dir1/ dir2/ reviews dir1/ and dir2/ without Tiger Style.
Use the checklist as a lens, not a scorecard: reason about the actual change, report real violations anchored to file:line, and flag issues even when they aren't listed. Don't manufacture findings to fill a category. Report only violations — no praise, no summary.
Skip this section entirely if --no-tiger was passed. Otherwise it is mandatory.
_ discard of error returnsfmt.Errorf("op: %w", err)func F(ctx context.Context, ...)init() functions that have side effectsslices/maps/cmp and the min/max/clear builtins over hand-rolled equivalents; for i := range n for integer countsiter.Seq/iter.Seq2 where iteration is the public API (Go 1.23+)json:",omitzero" (not omitempty) when the intent is to omit zero values — notably zero time.Timego.mod (go get -tool, run via go tool), not a legacy tools.go blank-import shim (Go 1.24+)log/slog (Go 1.21+), not the unstructured log package or a third-party logger pulled in out of habitslices/maps helpers, interface{} over any, manual b.N loops (run golangci-lint's modernize, or go fix on Go 1.26+)Idiom-level checks only — for a ranked, costed optimization plan, use /ds-perf-plan.
go test -benchmem if critical)make([]T, 0, knownCap) where capacity is knownsync.Pool used for frequently allocated/freed objects in hot pathsruntime.GOMAXPROCS tuning or automaxprocs in containers — Go 1.25+ honors the cgroup CPU quota automaticallyfmt.Sprintf constructing SQL queries — use parameterized queriesexec.Command with unsanitized user inputos.OpenRoot/*os.Root, not manual filepath.Clean/prefix checks — blocks traversal and symlink escape (Go 1.24+)http.Server sets ReadTimeout/WriteTimeout/IdleTimeout; http.Client sets Timeout or uses context deadlinesfor b.Loop() rather than a manual for i := 0; i < b.N loop (Go 1.24)time.Sleep in tests — use channels or sync primitives, or testing/synctest's fake clock for time-dependent concurrency (Go 1.25+)Read the target Go version from go.mod (the go directive). Run the checklist above for every project. If it targets Go 1.26 or newer, also read 1.26.md in this skill directory and apply its checks on top. If the version can't be determined, run the base and note that version-specific checks were skipped.
<file>:<line>: <severity>: <problem>. <fix>.
Severity levels: critical (correctness/security), major (reliability/performance), minor (idiom/style).
Skip formatting nits unless they affect correctness or readability significantly.