Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Nats

ASecurity

Expert coverage of NATS 2.x messaging system (2.10-2.12): Core NATS pub/sub, JetStream persistence, KV Store, Object Store, clustering, leaf nodes, super-clusters, and decentralized security. Use for \"NATS\", \"nats-server\", \"JetStream\", \"NATS stream\", \"NATS consumer\", \"subject\", \"queue group\", \"leaf node\", \"gateway\", \"super-cluster\", \"NATS KV\", \"Key-Value store NATS\", \"Object Store NATS\", \"nats CLI\", \"nsc\", \"NKey\", \"JWT auth NATS\", \"nats pub\", \"nats sub\", ...

4 stars
0 votes
0 copies
0 views
Added 9/24/2026
toolsbashnodesecurity

Works with

cli

Security Analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned 9/24/2026

$npx -y skills add chrishuffman5/domain-expert --skill nats --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nats?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Nats
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chrishuffman5-nats/badge)](https://www.skillsdirectory.com/skills/chrishuffman5-nats)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: nats
description: "Expert coverage of NATS 2.x messaging system (2.10-2.12): Core NATS pub/sub, JetStream persistence, KV Store, Object Store, clustering, leaf nodes, super-clusters, and decentralized security. Use for \"NATS\", \"nats-server\", \"JetStream\", \"NATS stream\", \"NATS consumer\", \"subject\", \"queue group\", \"leaf node\", \"gateway\", \"super-cluster\", \"NATS KV\", \"Key-Value store NATS\", \"Object Store NATS\", \"nats CLI\", \"nsc\", \"NKey\", \"JWT auth NATS\", \"nats pub\", \"nats sub\", \"nats request\", \"nats reply\", \"Core NATS\", \"nats-top\", \"NATS account\", \"NATS mirror\", \"NATS source\", \"atomic publish\", \"message TTL NATS\"."
license: MIT
---

# NATS

This skill covers NATS across versions 2.10 through 2.12, including:

- Core NATS (fire-and-forget pub/sub, subject-based addressing, queue groups, request/reply)
- JetStream (persistent streams, consumers, deduplication, exactly-once, retention policies)
- KV Store (bucket CRUD, watch, history, compare-and-swap, per-key TTL)
- Object Store (large file chunking, metadata, links)
- Clustering (route-based full mesh, RAFT consensus for JetStream, multi-route connections)
- Super-clusters (gateways for cross-cluster connectivity, interest propagation)
- Leaf nodes (hub-and-spoke, edge/IoT, hybrid cloud)
- Security (accounts, NKey, JWT decentralized auth, auth callout, mTLS)
- Monitoring (HTTP endpoints, nats-top, Prometheus exporter, system account events)
- Stream mirrors and sources (geographic distribution, aggregation, mirror promotion)

## How to Approach Tasks

1. **Classify** the request:
   - **Troubleshooting** -- Load `references/diagnostics.md` for consumer lag, stream issues, cluster health, connectivity, and CLI tools
   - **Architecture / design** -- Load `references/architecture.md` for Core NATS, JetStream, clustering, security, KV/Object Store
   - **Best practices** -- Load `references/best-practices.md` for subject design, stream configuration, consumer tuning, security, monitoring

2. **Identify version** -- Key version gates:
   - Multi-filter consumers, S2 compression, subject transforms, auth callout (2.10)
   - Per-message TTL, consumer pausing, priority groups, distributed tracing (2.11)
   - Atomic batch publish, distributed counters, delayed scheduling, mirror promotion, strict mode default (2.12)

3. **Load context** -- Read the relevant reference file before answering.

4. **Recommend** -- Provide actionable guidance with `nats` CLI commands, server config, and SDK examples.

## Core Architecture

### Core NATS (Fire-and-Forget)

Sub-millisecond latency. No persistence. If no subscriber exists, message is dropped. Optimized for speed and simplicity.

### Subject-Based Addressing

Subjects use `.` as token separator. Wildcards (subscribers only): `*` (single token), `>` (multi-token tail).
```
orders.us.created       -- specific subject
orders.*.created        -- matches orders.us.created, orders.eu.created
orders.>                -- matches orders.us, orders.us.east.created
```

### Queue Groups

Built-in load balancing. Multiple subscribers on same queue group receive messages round-robin:
```bash
nats sub --queue workers "orders.>"    # subscriber 1
nats sub --queue workers "orders.>"    # subscriber 2 (load-balanced)
```

### JetStream

Built-in persistence engine. Streams capture messages from subjects. Consumers track position independently.

**Retention policies:** `LimitsPolicy` (default, retain to limits), `WorkQueuePolicy` (consume-once), `InterestPolicy` (retain while consumers exist).

**Consumer types:** Pull (recommended) or Push. Durable (named, persistent state) or Ephemeral.

### KV Store and Object Store

KV: Built on JetStream streams. Consistent key-value with watch, history, CAS. Object Store: Large binary chunking with metadata and SHA-256 checksums.

## Anti-Patterns

| Anti-Pattern | Why It Fails | Instead |
|---|---|---|
| Using Core NATS for critical business events | No persistence; messages dropped if no subscriber | Use JetStream with explicit ack |
| Unbounded streams without limits | Disk fills up; no backpressure | Set MaxAge, MaxBytes, MaxMsgs |
| Push consumers for work queue patterns | Less control over flow; harder to scale | Use pull consumers |
| Publishing to wildcards | Not supported; server rejects | Publish to specific subjects |
| Large deduplication windows | Memory overhead per tracked ID | Keep Duplicates window as short as practical (default 2min) |
| Even-sized clusters | Split-brain risk | Use odd node counts (3 or 5) |

## Reference Files

- `references/architecture.md` -- Core NATS, JetStream streams/consumers, KV Store, Object Store, clustering (routes, gateways, leaf nodes), security (accounts, NKey, JWT, auth callout), monitoring
- `references/best-practices.md` -- Subject namespace design, stream configuration, consumer tuning, deduplication, security hardening, monitoring setup, version-specific features
- `references/diagnostics.md` -- Stream lag, consumer issues, cluster health, RAFT troubleshooting, connectivity, slow consumers, CLI reference, health checks

## Cross-References

- The `overview` skill -- cross-broker comparisons and event-driven architecture design

Attribution

chrishuffman5chrishuffman5
View sourceSee grades on GitHubMore from chrishuffman5 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

ucoz-landing-skill

Create and edit uCoz homepage landing pages via MCP: custom templates, hero sections, lead forms, navigation menus, SEO, and responsive layout. Includes a visual design system (style selection, layout/grid, section recipes, typography/spacing, color tokens, component states, icons, modern CSS/JS, motion, imagery, social proof, copy/voice, accessibility). Uses ucoz-mcp tools for templates, site file uploads, and site modules.

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953191 votes

Pptx

Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.

471861 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes
View all in tools →