بنقرة واحدة
new-service
Scaffold a new ConnectRPC API service with proto, handler, registration, and tests
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Scaffold a new ConnectRPC API service with proto, handler, registration, and tests
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | new-service |
| description | Scaffold a new ConnectRPC API service with proto, handler, registration, and tests |
| disable-model-invocation | true |
| user-invocable | true |
| argument-hint | <service-name> (e.g., location, mesh-monitor) |
Create a new ConnectRPC API service for OpenMANETd following established patterns.
$ARGUMENTS contains the service nameCreate proto definition in proto/openmanet/<service>/v1/:
<service>_service.proto with service and RPC definitions<service>.proto for shared message types.claude/rules/api-design.md (Get/List/Set/Update/Execute/Stream verbs)buf.validate annotations for field validationgoogle.protobuf.Empty for RPCs with no meaningful request/responseGenerate code: Run make buf to generate Go stubs in internal/api/ and JS clients in frontend/src/gen/
Create handler at internal/openmanet/server/handlers/<service>.go:
Log zerolog.Logger + injected dependencies (interfaces, not concrete types)connect.NewError() with correct codes (see .claude/rules/api-design.md)Register in server at internal/openmanet/server/server.go:
api.Handle(...) call with the handler struct literalconnect.WithInterceptors(validateInterceptor)Wire dependencies in internal/openmanet/openmanet.go if needed
Create tests:
internal/openmanet/server/handlers/<service>_test.go (package handlers_test)mocks_test.go following the fake<Interface> pattern with mutex-protected statenewTestDB(t) for database, zerolog.Nop() for loggerintegration_test.gobuf.validate annotationsVerify: Run make test and make lint-go to confirm everything compiles and passes