← Back to list

nestjs-microservices
by HoangNguyen0403
A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages
⭐ 111🍴 40📅 Jan 23, 2026
SKILL.md
name: NestJS Microservices description: gRPC, RabbitMQ standards and Monorepo contracts. metadata: labels: [nestjs, microservices, grpc, rabbitmq] triggers: files: ['main.ts', '**/*.controller.ts'] keywords: [Transport.GRPC, Transport.RMQ, MicroserviceOptions]
Microservices & Transport Standards
Priority: P0 (FOUNDATIONAL)
Microservices communication patterns and transport layer standards.
- Synchronous (RPC): Use gRPC for low-latency, internal service-to-service calls.
- Why: 10x faster than REST/JSON, centralized
.protocontracts.
- Why: 10x faster than REST/JSON, centralized
- Asynchronous (Events): Use RabbitMQ or Kafka for decoupling domains.
- Pattern: Fire-and-forget (
emit()) for side effects (e.g., "UserCreated" -> "SendEmail").
- Pattern: Fire-and-forget (
Monorepo Architecture
- Contracts:
- Pattern: Store all DTOs,
.protofiles, and Interfaces in a Shared Library (libs/contracts). - Rule: Services never import code from other services. They only import from
contracts.
- Pattern: Store all DTOs,
- Versioning: Semantic versioning of messages is mandatory. Never change a field type; add a new field.
Exception Handling
-
Propagation: Standard
HttpExceptionis lost over Rpc/Tcp. -
Standard: Use
RpcExceptionand generic Filters.// Global RPC Filter @Catch() export class RpcExceptionFilter implements RpcExceptionFilter<RpcException> { catch(exception: RpcException, host: ArgumentsHost): Observable<any> { return throwError(() => exception.getError()); } }
Serialization
- Message DTOs: Use
class-validatorjust like HTTP.- Config: Apply
useGlobalPipes(new ValidationPipe({ transform: true }))in theMicroserviceOptionssetup, not just HTTP app setup.
- Config: Apply
Score
Total Score
85/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
✓人気
GitHub Stars 100以上
+5
✓最近の活動
1ヶ月以内に更新
+10
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

