본문으로 건너뛰기
cccskills
무료GitHub에 공개

go-spec-reviewer

Review a Go design spec before implementation begins - dispatch a subagent that checks a design doc for completeness, consistency, and idiomatic Go (simplicity, small consumer-defined interfaces, explicit wrapped errors, context propagation) plus Cobra/Viper conventions where applicable. Use when a user has a Go spec to review, asks "is this spec ready?", or is about to implement from a written design. Distilled from spf13/go-skills and adapted to this repo's conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Go Spec Reviewer

Dispatch a subagent to verify a Go design spec is complete, consistent, and idiomatic before implementation begins - the cheapest place to catch a flawed design. The reviewer channels Rob Pike, the stdlib authors, and spf13: reject needless abstraction, demand explicit error handling and context propagation, expect the simplest design that works. It complements plan mode with a focused spec gate.

When to use

  • A spec or design doc to review, or the question "is this spec ready?"
  • About to implement from a written spec
  • A technical review of a planned feature before any code is written

How to dispatch

Spawn a general-purpose subagent (the Agent tool) pointed at the spec file, with the prompt below. It returns Status / Issues / Recommendations - it does not edit code.

You are a Go spec reviewer. Verify this spec is complete and ready for
implementation, through the lens of idiomatic Go.

Think like Rob Pike: is it simple, doing one thing well?
Think like the stdlib authors: small interfaces, defined at the point of use?
Think like spf13: if it's a CLI, does it follow Cobra/Viper conventions?

Spec to review: <SPEC_FILE_PATH>

Step 1 - Codebase context. Before reviewing, explore the repo for conventions and
conflicts: list packages under internal/ and cmd/; for a Cobra CLI, scan cmd/ for
package-level flag vars (all cmd files share one package -> name collisions); check
cmd/root.go for command registration; note existing types/interfaces the spec
should reuse rather than reinvent.

Step 2 - Go philosophy:
| Concern     | Look for |
| ----------- | -------- |
| Simplicity  | layers/abstractions with one implementation; over-engineering |
| Interfaces  | consumer-defined? small (1-3 methods)? real polymorphism? |
| Errors      | returned explicitly, wrapped with %w, never silently swallowed? |
| Context     | ctx threaded through I/O and long calls? timeouts set? |
| Concurrency | goroutines with clear ownership and a stop condition? races? |
| Packages    | one clear purpose each? new package justified vs extending one? |
| Naming      | short, no stutter (pkg.PkgThing)? |
| YAGNI       | driven by stated requirements, not speculative futures? |

Step 3 - Cobra/Viper (skip if not a CLI):
| Concern      | Look for |
| ------------ | -------- |
| Flag naming  | package-level flag vars unique across cmd/ (one shared package) |
| Registration | new subcommands added in cmd/root.go via AddCommand? |
| RunE vs Run  | RunE so errors propagate |
| Flag scope   | config-level on root (persistent); per-operation on the subcommand |
| Viper        | env names + config keys bound, defaults set? |

Step 4 - Completeness:
| Category     | Look for |
| ------------ | -------- |
| Completeness | TODO/TBD/placeholders, missing error paths |
| Consistency  | contradictions, types named differently across sections |
| Clarity      | ambiguity that would make two implementors build different things |
| Scope        | one focused implementation, not several subsystems |
| Security     | user input sanitized before shell/path/external use? |

Calibration: only flag issues that would cause real implementation problems - a
missing error path, a flag collision that won't compile, an abstraction that adds
complexity without enabling anything. Skip wording and formatting nits. Respect
THIS repo's established conventions (the internal/ domain-infra-services split, the
DI container, counterfeiter-generated mocks, the per-mode bash allow-list,
pluggable storage backends) - judge idiomaticity within them; do not flag the
chosen architecture itself as a defect. Approve unless gaps would lead to a flawed
or incomplete implementation.

Output:
## Go Spec Review
Status: Approved | Issues Found
Issues (if any):
- [Section X]: [specific issue] - [why it matters for implementation]
Recommendations (advisory, non-blocking):
- [correctness / idiomaticity / clarity suggestions]

Adapted from spf13/go-skills (MIT, by Steve Francia) for this repo's local subagent tooling and conventions. Pairs with go and cobra-viper.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

go

무료

Idiomatic Go - package and interface design, error wrapping, table-driven tests, generics, the modern standard library (slices/maps/cmp/errors.Join), current syntax, and logging discipline. Use when writing, reviewing, or refactoring any Go code, especially code drifting toward Java/Spring shapes (deep layer trees, generic repositories, heavy frameworks) - even if the user never says "idiomatic". Distilled from spf13/go-skills and adapted to this repo.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

inference-gateway/operator22026년 10월 13일 업데이트

Idiomatic Go concurrency - sync primitives, channel semantics, the select statement, and the standard channel patterns (cancellation/done-channel, fan-out/fan-in, pipeline, or-done, context, worker-pool). Use when writing or reviewing Go that spawns goroutines, shares state, or coordinates over channels, even if the user never says "concurrency" - e.g. data races, deadlocks, goroutine leaks, sync/context/select usage, or "make this parallel". Distilled from luk4z7/go-concurrency-guide.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

inference-gateway/operator22026년 10월 13일 업데이트

inference-gateway의 스킬 모두 보기

이 스킬의 문제 신고