New API Service Scaffolding

SkillDev tools

Scaffold a new ConnectRPC API service with proto, handler, registration, and tests

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the New API Service Scaffolding skill

What this skill tells your AI

The instructions your AI receives, as published by openmanet/openmanetd in .claude/skills/new-service/SKILL.md and read by ahel’s review.

Create a new ConnectRPC API service for OpenMANETd following established patterns.

Arguments

  • $ARGUMENTS contains the service name

Steps

  1. Create proto definition in proto/openmanet/<service>/v1/:

    • <service>_service.proto with service and RPC definitions
    • <service>.proto for shared message types
    • Follow naming conventions from .claude/rules/api-design.md (Get/List/Set/Update/Execute/Stream verbs)
    • Use buf.validate annotations for field validation
    • Use google.protobuf.Empty for RPCs with no meaningful request/response
  2. Generate code: Run make buf to generate Go stubs in internal/api/ and JS clients in frontend/src/gen/

  3. Create handler at internal/openmanet/server/handlers/<service>.go:

    • Struct with Log zerolog.Logger + injected dependencies (interfaces, not concrete types)
    • Implement the generated handler interface
    • Use connect.NewError() with correct codes (see .claude/rules/api-design.md)
    • Log before returning errors
    • Add overrideable function fields for I/O operations
  4. Register in server at internal/openmanet/server/server.go:

    • Add api.Handle(...) call with the handler struct literal
    • Include connect.WithInterceptors(validateInterceptor)
  5. Wire dependencies in internal/openmanet/openmanet.go if needed

  6. Create tests:

    • Unit tests in internal/openmanet/server/handlers/<service>_test.go (package handlers_test)
    • Add fakes to mocks_test.go following the fake<Interface> pattern with mutex-protected state
    • Use newTestDB(t) for database, zerolog.Nop() for logger
    • Add integration test cases in integration_test.go
    • Add proto validation tests if using buf.validate annotations
  7. Verify: Run make test and make lint-go to confirm everything compiles and passes

Signals

GitHub stars
50
Forks
17
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
new-service-openmanet
Source
github.com/openmanet/openmanetd