Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill golang-mvc명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | golang-mvc |
| description | > Use when this capability is needed. |
Go MVC implementation conventions for feature work and refactoring. This skill guides code generation and actively enforces layer boundaries — it modifies and refactors code that violates MVC conventions.
| Layer | Package | Responsibility | May import | Must NOT import |
|---|---|---|---|---|
| Handler | handler/ | HTTP entry point; orchestrate business rules; validate and map input/output | service/, model/, validation/ | config/, DB drivers, repository/ |
| Service | service/ | Thin adapter over external APIs, queues, caches | model/, config/ | handler/ |
| Repository | repository/ | DB access only; returns domain objects | model/, config/ | handler/, service/ |
| Model | model/ | Pure data: domain structs + conversion methods (ToDTO, FromRow) | nothing internal | handler/, service/, repository/ |
| Validation | validation/ | Named validators for domain rules | model/ | handler/, service/ |
| Config | config/ | Load env/files; construct and wire concrete types | all | — |
Build in this order. Do not skip steps.
model/)model/ (use model (singular) as the default package for domain models, unless there are more than 30 models, in which case they must be split into domain-specific packages).ToDTO(), FromRow()).repository/ package. One file per aggregate root.service/ package. Retry + timeout logic only; no business decisions.handler/)func NewUserHandler(getter UserGetter, notifier NotifySender, log Logger) *UserHandlerRegisterRoutes(r *gin.RouterGroup) method; never inline in main.go.validation/)Validate() error method.ValidateCreateOrderRequest, not validate.validation.Error{Field: "...", Reason: "..."} — never raw strings.main.go or bootstrap.go)main.go/bootstrap.go.config.Default() from github.com/bizshuk/gosdk, falling back to raw viper manual setup only if the SDK is not supported/available.Interfaces are defined where consumed, not where implemented.
// In handler/user.go — NOT in repository/user.go
type userGetter interface {
GetByID(ctx context.Context, id string) (*model.User, error)
}
This means handler tests can mock the interface without importing the repository package, breaking the import cycle and enabling true unit isolation.
| Dependency count | Pattern |
|---|---|
| ≤ 4 deps | Plain constructor params |
| 5+ deps | HandlerOptions struct |
| Many optional knobs | Functional options ...Option |
fmt.Errorf("handler.GetUser: %w", err)var ErrNotFound = errors.New("not found")SCREAMING_SNAKE_CASE (e.g. MAX_RETRIES, DEFAULT_TIMEOUT).ctx context.Context is always the first parameter of any function that does I/Octx in a structctx, cancel := context.WithTimeout(ctx, cfg.DBTimeout); defer cancel()| Layer | Test approach |
|---|---|
| Handler | Mock all interfaces; use httptest.NewRecorder(); assert status + response body |
| Repository | Use sqlmock or a real test DB via docker-compose; never mock the DB driver itself |
| Service | Mock external HTTP/gRPC clients with interface mocks |
| Validation | Table-driven tests required; cover valid, missing, and out-of-range inputs |
All test files: _test.go suffix, same package as the code under test (prefer white-box
tests for internal helpers, _test package suffix for public API contracts).
Source: BizShuk/gosdk — distributed by TomeVault.