nats

Publish, subscribe, and make NATS request/reply calls from the Self Serve Express BFF.

12|6|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill nats-linuxfoundation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nats
Source: https://github.com/linuxfoundation/lfx-self-serve/tree/main/.claude/skills/nats
Command: npx skills add https://github.com/linuxfoundation/lfx-self-serve --skill nats-linuxfoundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend developers working in the Self Serve Express BFF need to communicate with other platform services over NATS without bypassing the protected nats.service.ts singleton, inventing unauthorized subjects, or mishandling timeouts and errors. ## Core Features & Use Cases - NATS Request/Reply Guidance: Enforces explicit timeouts, MicroserviceError propagation through next(error), and correct logger usage for subject tracing. - Subject Ownership Rules: Prevents inventing new NATS subjects from Self Serve by routing coordination to the owning service repositories. - Protected File Discipline: Directs all messaging through the existing nats.service.ts helper methods with code-owner review for new methods. - Use Case: When a backend endpoint must resolve a project ID via NATS request/reply, this Skill ensures the call uses the singleton connection, sets an explicit timeout, logs via the logger service, and surfaces failures as structured errors. ## Quick Start Ask the assistant to add a NATS request/reply call in the Express BFF that resolves a project by ID using nats.service.ts with proper timeout and error handling.

Frequently Asked Questions about nats

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a NATS request/reply call from an Express backend?▼

Use the existing helper methods in nats.service.ts rather than creating a new connection. Set an explicit timeout on the request, and route failures through next(error) as a MicroserviceError instead of calling res.status(500).json().

How do I publish or subscribe to a NATS subject in the Self Serve BFF?▼

Add new publish or subscribe logic through the nats.service.ts helper methods, which requires code-owner review since the file is protected. Do not invent new subjects; coordinate with the service that owns the subject first.

Why does my NATS request fail with a no responder or timeout error?▼

No responder errors occur when no service is subscribed to the subject or the connection is down. Check the singleton connection in nats.service.ts, verify the subject name against the owning service, and confirm your timeout is explicit.

Can I mock NATS for local development without the full platform stack?▼

Yes, follow the mock-mode setup described in docs/architecture/backend/nats-integration.md and the setup documentation. Do not introduce ad-hoc mocks inside production code paths.

What are the limitations of this NATS skill?▼

It does not cover platform NATS deployment, indexer or FGA-sync subject contracts, or upstream auth and persona NATS contracts. Those concerns route to their respective owning service repositories.