Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

review-microservice

БесплатноБез исполняемых скриптовНе проверен

Performs a thorough review of a single Microbus microservice. Checks for completeness, framework compliance, code quality, security, test coverage…

microbus-ioот microbus-io★ 173 звезды на GitHub

Об этом скилле

CRITICAL: Scope this review strictly to the microservice directory you are asked to review. Do NOT explore or analyze other microservices.

CRITICAL: Perform this review sequentially in the current context. Do NOT launch subagents to parallelize the steps unless the user explicitly asks to run the review concurrently or asks for a faster review.

Naming convention used in this skill: service.go refers collectively to all hand-written .go implementation files in the microservice directory (excluding intermediate.go, mock.go, and test files). service_test.go refers collectively to all *_test.go files. In most microservices these are single files, but they may be split across multiple files in rare cases. Step 1 identifies the actual files; subsequent steps use these shorthand names.

Workflow

Copy this checklist and track your progress:

Microservice review:
- [ ] Step 1: Read the microservice
- [ ] Step 2: Implementation completeness
- [ ] Step 3: Framework compliance
- [ ] Step 4: Test quality
- [ ] Step 5: Spec consistency
- [ ] Step 6: Code quality
- [ ] Step 7: Security
- [ ] Step 8: Documentation
- [ ] Step 9: API design
- [ ] Step 10: Performance and data access
- [ ] Step 11: Run vet and tests
- [ ] Step 12: Produce the report

Step 1: Read the Microservice

List the directory to identify all files. Read myserviceapi/definition.go (the API spec), manifest.yaml, and the generated intermediate.go, client.go, and mock.go. Read all hand-written .go implementation files (service.go and any others) and all *_test.go files.

Build a feature inventory from the define.* vars in definition.go. This is the ground truth for what the microservice exposes; each var's kind (define.Function, define.Web, define.Config, define.Task, define.Workflow, define.OutboundEvent, define.InboundEvent, define.Metric, define.Ticker) gives the feature type directly.

Step 2: Implementation Completeness

For each feature in the inventory (each define.* var in definition.go), verify it is implemented and tested:

  • Functions, webs, tasks, inbound events, tickers - a handler method in service.go, and at least one test case in service_test.go.
  • Workflows - a graph builder method in service.go, and a test.
  • Config callbacks / observable metrics - an OnChangedFeatureName / OnObserveFeatureName method in service.go when the var sets Callback: true / Observable: true; service_test.go coverage is desirable but optional.
  • Outbound events, non-callback configs, non-observable metrics - no service.go handler is expected.

Report any feature whose required handler or test is missing.

The generated files (intermediate.go, client.go, mock.go, mock_test.go, manifest.yaml) are projections of definition.go and are always mutually consistent, so they are not audited feature-by-feature here. Instead, run go run github.com/microbus-io/fabric/cmd/genservice -check <microservice dir> and flag any file it reports as out of date (the generated files were edited by hand or never regenerated).

Step 3: Framework Compliance

Grep the hand-written .go files (same set as Step 1) for violations of Microbus framework conventions:

  • http.Client, http.Get, http.Post, http.DefaultClient - outbound HTTP must go through the HTTP egress proxy (httpegressapi)
  • Bare goroutines - go func or go followed by a function call must use svc.Go(ctx, func) instead
  • fmt.Errorf - must use errors.New instead
  • return err without errors.Trace(err) - all non-nil error returns must be traced (allow exceptions for nil checks and errors.Trace already applied in the same line)
  • fmt.Print, log.Print, println - structured logging must use svc.LogDebug/Info/Warn/Error
  • context.Background() or context.TODO() - handlers must propagate the received context, not create a new root context
  • errors.Newc, errors.Newf, errors.Newcf - deprecated constructors; use errors.New instead
  • httpx.PathValues - deprecated; use r.PathValue("name") instead
  • Resource lifecycle - resources opened or subscribed in OnStartup (connections, file handles, hooks) should have a corresponding release or unsubscribe in OnShutdown. Flag asymmetric lifecycle management.
  • Foreman call sites (foremanapi.NewClient) - grep this microservice's hand-written files for foremanapi.NewClient. The foreman is the execution engine, not a downstream dependency, so most call sites are anti-patterns. Flag each of these:
    • a function or web handler that calls foremanapi...Run (or Create+Await) and returns the flow's result - a synchronous endpoint wrapping a workflow, running an open-ended flow on the caller's request budget and coupling an API provider to the foreman (wrong whether the workflow is this service's or another's; fix with a shared Go helper the handler and the tas
Полный SKILL.md на GitHub

Установить review-microservice в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл review-microservice?

Performs a thorough review of a single Microbus microservice. Checks for completeness, framework compliance, code quality, security, test coverage, documentation, API design, and data access performance. Produces a structured report with findings and recommendations.

Как установить скилл review-microservice?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл review-microservice запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить review-microservice с