What problem does it solve?
This Skill helps you write production-grade Connect RPC handlers by standardizing proto-driven CRUD behavior, RBAC enforcement, pagination semantics, and consistent error handling so clients receive correct codes without leaking internals.
Core Features & Use Cases
- Proto-to-handler conventions: Define RPCs in the expected proto paths to unlock auto-generated CRUD handlers, AIP-158 cursor pagination, optional List filters, per-method required_roles RBAC, and Idempotency-Key support.
- Handler anatomy for maintainability: Implement handlers as thin, wire-format glue by validating inputs, extracting auth context via middleware, converting proto types to internal input types, calling service-layer contracts, mapping internal results back to proto, and wrapping errors consistently.
- Safety-focused error handling: Use connect.NewError with the correct Connect codes (InvalidArgument, NotFound, PermissionDenied, Unauthenticated, Internal) and keep server details out of client responses.
- Transactional database access patterns: For multi-step mutations, use ORM operations from internal/db within explicit transactions to ensure consistency.
Quick Start
Use the api Skill to implement a new Connect service by adding your proto definitions (CRUD naming, optional List filters, required_roles, and pagination fields) and then writing any hand-crafted handler methods in the service layer’s handler location using connect.NewError for precise error codes.