What problem does it solve?
Enforce ConnectRPC usage rules and protobuf v2 discipline across codebases to prevent unsafe patterns, promote type safety, and ensure consistent transport.
Core Features & Use Cases
- Enforces banning raw useQuery/useMutation from @tanstack/react-query when ConnectRPC patterns are in use, with allowances for useTransport/callUnaryMethod.
- Bans invalidateQueries() with empty args to require a specific queryKey scope.
- Warns on axios or fetch usage to steer teams toward ConnectRPC transport.
- Enforces protobuf v2 norms: ban new Message(), ban PlainMessage/PartialMessage, ban manual $typeName literals.
- Provides an Escape hatch via // allow: direct-query [reason], and points to SETUP.md/REFERENCE.md for deeper guidance.
- Intended for setup-time enforcement and code-review guardrails to lock in patterns before deployment.
Quick Start
Configure Claude to run the connect-query-check.sh PostToolUse hook during edits and writes.