lfx-self-serve: Skill for Claude Code

.claude/skills/nats/SKILL.md

nats is a skill for Claude Code from linuxfoundation/lfx-self-serve. It costs 72 tokens per session (627 once invoked), scanned A, original, MIT.

A guide for sending and receiving messages with NATS, a system that lets services communicate by sending messages. It applies to the Self Serve Express backend-for-frontend, a server that connects the web app to other services.

In plain words
What is it for?
Use it when publishing messages, subscribing to them, making request-and-reply calls, resolving project IDs, or investigating NATS connection and timeout problems.
Why use it?
It helps avoid incorrect message destinations, bypassed connection handling, and unclear timeout or connection failures. It also explains how errors should reach callers.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is linuxfoundation/lfx-self-serve's own configuration. It tells Claude Code how to work on lfx-self-serve itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lfx-self-serve configures →

Reuse

Borrowing it

Nothing to install: this file belongs to linuxfoundation/lfx-self-serve. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/linuxfoundation/lfx-self-serve/main/.claude/skills/nats/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/linuxfoundation/lfx-self-serve

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nats

README.md
[![agentmods](https://agentmods.dev/badge/skills/linuxfoundation/lfx-self-serve/nats/github.svg)](https://agentmods.dev/skills/linuxfoundation/lfx-self-serve/nats)
Your own site
<a href="https://agentmods.dev/skills/linuxfoundation/lfx-self-serve/nats"><img src="https://agentmods.dev/badge/skills/linuxfoundation/lfx-self-serve/nats/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nats

Your own site · 80×15
<a href="https://agentmods.dev/skills/linuxfoundation/lfx-self-serve/nats"><img src="https://agentmods.dev/badge/skills/linuxfoundation/lfx-self-serve/nats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.00627
Opus 5.5 $0.00029 $0.00251
Sonnet 5.5 $0.00014 $0.00125
Haiku 4.5 $0.00007 $0.00063

Measured 2mo ago against content hash 28df3c5a2767, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nats scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/nats/SKILL.md · 36 lines

How it starts

The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self Serve NATS Skill

You are publishing, subscribing, or making NATS request/reply calls from the Self Serve Express BFF.

When to use

  • A backend endpoint needs to look up a resource via NATS request/reply (e.g., project RPC for ID resolution).
  • A backend service consumes a NATS subject (e.g., listening for indexer or persona updates).
  • A new server-side code path needs to publish to NATS.
  • Investigating "no responder" / timeout / connection errors in nats.service.ts.

Workflow

  1. Re-read docs/architecture/backend/nats-integration.md (the reference linked below). It documents the singleton connection, request/reply timeout defaults, project resolution, and the subject conventions Self Serve consumes.
  2. Do not bypass nats.service.ts — it is a protected file. Use the existing helper methods; add new methods through code-owner review.
  3. Use the right subject vocabulary — subjects are owned by their producing service (per /lfx-skills:lfx). Do not invent new subjects from Self Serve; coordinate with the owning service repo first.
  4. Set explicit timeouts on request/reply calls. Failures must surface as MicroserviceError (or equivalent) and route through next(error) — never res.status(500).json().
  5. Log via the logger service (not serverLogger). Use logger.debug for subject + reply tracing, logger.error for failed requests.
  6. Mock mode — for local dev without the full platform stack, follow docs/architecture/backend/nats-integration.md and the mock-mode setup in /setup. Do not introduce ad-hoc mocks inside production code paths.

Reference

Scope boundaries

  • This skill does NOT cover the platform NATS deployment (routes to lfx-v2-helm).
  • It does NOT cover indexer or FGA-sync subject contracts (routes to lfx-v2-indexer-service and lfx-v2-fga-sync via /lfx-skills:lfx).
  • It does NOT cover the upstream auth or persona NATS contracts (route to lfx-v2-auth-service / lfx-v2-persona-service).

Read the full file on GitHub · 36 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 36 lines · 72 tokens per session scan A 28df3c5a2767

Subscribe to this mod's changes

nats is a skill published in the GitHub repository linuxfoundation/lfx-self-serve (16 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 627 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

fastapi-router-py

Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.

microsoft/skills · 46 tokens

dev-runtime

How the Node side of a dev stack runs without haven, and the backend host: pnpm dev (UI built once, backend reloading), pnpm dev:hmr (adds the Vite ui lane), tools/dev-runtime (api + worker in one Node process), backend reload on a file change, the debounce (quiet window + max wait), ports derived from PORT. Use when…

langwatch/langwatch · 172 tokens

api-design

Use when settling the contract of an API you expose, before implementation: resources/URLs, REST vs GraphQL, versioning, one RFC 9457 error envelope, pagination, idempotency — emitted as OpenAPI 3.1. NOT implementing the endpoints (that is fastapi/nestjs/go/nodejs), NOT auth hardening (that is secure-coding), NOT…

ericrisco/rsc-harness · 105 tokens