Jetstream Architecture logo

Jetstream Architecture

Community
lithqube
jetstream-architecture

Use this skill whenever users are designing, modeling, or writing code for NATS JetStream — including stream configuration, subject namespace design, consumer types (pull vs push), ack policies, retention policies, delivery guarantees, messaging patterns (fanout, work queue, request-reply), idempotent publishing, exactly-once semantics, or JetStream code examples in Go, JavaScript, or Python. Use this skill even when the user doesn't say "JetStream" explicitly — if they're asking how to build a message queue, event stream, or worker system on NATS, this skill applies. Do NOT use for deployment/clustering/Kubernetes questions (use jetstream-deployment) or troubleshooting/monitoring (use jetstream-operations).

Overview

Publisherlithqube
Repositorynats-jetstream-claude-skills
Skill namejetstream-architecture
Stars
28
Forks
2
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lithqube on GitHub. Read the source before you install it.

Installation

Install the Jetstream Architecture AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lithqube/nats-jetstream-claude-skills/tree/main/jetstream-architecture
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lithqube/nats-jetstream-claude-skills.git /tmp/nats-jetstream-claude-skills
mkdir -p .claude/skills
cp -r /tmp/nats-jetstream-claude-skills/jetstream-architecture .claude/skills/jetstream-architecture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Jetstream Architecture in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Jetstream Architecture on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Jetstream Architecture is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

JetStream Architecture

Design NATS JetStream streams, subjects, and consumers for event streaming and worker queue architectures.

For deployment/clustering/Kubernetes questions, defer to the jetstream-deployment skill. For troubleshooting, monitoring, or performance tuning, defer to the jetstream-operations skill. If the user is building AI agents that discover and prompt each other over NATS (the Synadia Agent Protocol / Synadia Agents SDK, the agents.* subjects), defer to the nats-agent-fabric skill — that fabric runs on the NATS Services API, not core JetStream. JetStream and KV come back in only as the durable memory/handoff layer behind those agents; designing the streams or KV buckets that back agent state is this skill's job (see nats-agent-fabric/patterns/durable-state.md for the agent-specific shape).

Reference Files

Read these files when they're relevant to the user's question — don't load all of them upfront, just the ones you need:

  • concepts/streams.md — stream config fields, retention policies, storage types, subject namespaces, mirroring/sourcing. Read when configuring a stream.
  • concepts/consumers.md — pull vs push comparison, ack policies, deliver policies, consumer groups, ordered consumers, backoff. Read when designing consumers.
  • concepts/server-features.md — which features need which server version, how to detect capability via api.level, per-message TTL, priority groups, atomic batch publish, and the 2.12 strict-mode breaking change. Read before recommending any feature newer than 2.10, and whenever a design depends on TTL, prioritised delivery, or multi-message atomicity.
  • patterns/fanout.md — fanout pattern with multiple independent consumers, LimitsPolicy vs InterestPolicy, scaling. Read when the user needs multiple services consuming the same events.
  • patterns/work-queue.md — work queue with competing consumers, DLQ, deduplication, priority queues. Read when the user needs task distribution or job processing.
  • examples/go.md — complete Go examples using nats.go. Read when the user wants Go code.
  • examples/python.md — complete Python examples using nats-py. Read when the user wants Python code.
  • examples/javascript.md — complete JavaScript/TypeScript examples using the modular @nats-io/* v3 client (not the legacy nats package). Read when the user wants JavaScript or TypeScript code.

Workflow

Step 1: Gather requirements — what data is being produced, who consumes it, what are the durability and ordering needs.

Step 2: Design the subject namespace — use hierarchical subjects with wildcards for flexible routing.

Step 3: Configure the stream — choose retention policy, storage type, replicas, limits, and discard policy.

Step 4: Select consumer strategy — pull for worker queues, push for event listeners, ordered for replay.

Step 5: Configure delivery guarantees — ack policy, max deliver, ack wait, backoff, dead letter handling.

Step 6: Provide implementation code — working examples with proper error handling in the user's language.

Core Principles

  • Use hierarchical subjects: {domain}.{entity}.{event} (e.g., orders.us-east.created)
  • Prefer one stream per bounded context with multiple subjects over many single-subject streams
  • Use pull consumers for worker queues — they allow backpressure and batch processing
  • Use push consumers for real-time event listeners that need immediate delivery
  • Always use AckExplicit in production — never rely on implicit acks
  • Set MaxDeliver with a dead letter strategy — don't retry forever. NATS has no built-in DLQ, so "dead letter strategy" means consuming the MAX_DELIVERIES advisory yourself; MaxDeliver alone means "retry then silently drop"
  • Use DuplicateWindow for publish-side deduplication (default 2 minutes). Size it against your slowest republish path: a transactional-outbox relay that retries hourly needs hours, not the default, or the dedup that prevents a double-book has already expired
  • Set Replicas: 3 for production streams — R1 is only for development
  • Prefer FileStorage for durability — use MemoryStorage only for ephemeral/cache streams
  • Design for idempotent consumers — messages may be redelivered after ack timeout

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Jetstream Architecture AI skill do?

Use this skill whenever users are designing, modeling, or writing code for NATS JetStream — including stream configuration, subject namespace design, consumer types (pull vs push), ack policies, retention policies, delivery guarantees, messaging patterns (fanout, work queue, request-reply), idempotent publishing, exactly-once semantics, or JetStream code examples in Go, JavaScript, or Python. Use this skill even when the user doesn't say "JetStream" explicitly — if they're asking how to build a message queue, event stream, or worker system on NATS, this skill applies. Do NOT use for deploym...

Why use Jetstream Architecture on TypingMind?

Because you install it once and use it with any model. Jetstream Architecture is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Jetstream Architecture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lithqube/nats-jetstream-claude-skills/tree/main/jetstream-architecture. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Jetstream Architecture?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Jetstream Architecture?

As many as you like. As long as a model supports skills, you can use Jetstream Architecture with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Jetstream Architecture AI skill free?

Yes. It is published on GitHub by lithqube under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇