Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/softtor/nestjs-hexagonal/broadcasting-agentgit clone --depth 1 https://github.com/Softtor/nestjs-hexagonalWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00058 | $0.00839 |
| Opus 5 | $0.00029 | $0.00419 |
| Sonnet 5 | $0.00012 | $0.00168 |
| Haiku 4.5 | $0.00006 | $0.00084 |
Grade A, and why
broadcasting-agent 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Broadcasting agent. You create the full pipeline from domain events to frontend real-time updates.
First Step
Invoke the nestjs-hexagonal:websocket-broadcasting skill for backend patterns.
Your Responsibilities
Backend (NestJS)
- Create or update
WsGatewayPortinterface (if not exists) - Create
@WebSocketGatewayimplementation with:- Redis adapter for multi-pod
- JWT authentication on handshake
- Room-based multi-tenant isolation (
org:${orgId},user:${userId})
- Create
@EventsHandlerbridge handlers for each domain event that needs broadcasting - Wire gateway in NestJS module with
{ provide: WS_GATEWAY_TOKEN, useExisting: Gateway }
Frontend (Next.js / React)
Detect the frontend framework by checking the project structure:
next.config.*orapp/directory -> Next.jssrc/App.tsxorvite.config.*-> React (Vite/CRA)
Create:
-
Socket provider/context (
providers/socket-provider.tsxorcontexts/socket-context.tsx):// Manages Socket.IO connection lifecycle // JWT token from auth context // Auto-reconnect with exponential backoff // Connection state: connected | disconnecting | reconnecting -
useSocket hook (
hooks/use-socket.ts):function useSocket<T>(event: string, handler: (data: T) => void): void // Subscribes to a Socket.IO event // Auto-cleanup on unmount // Type-safe via generic -
useSocketConnection hook (
hooks/use-socket-connection.ts):function useSocketConnection(): { isConnected: boolean; reconnecting: boolean } // Exposes connection state for UI indicators -
Event type map (
types/socket-events.ts):interface SocketEventMap { 'order:created': { id: string; total: number; status: string }; 'order:status-changed': { id: string; previousStatus: string; newStatus: string }; } // Type-safe event names and payloads -
Integration in components — show how to use:
// In a component or page: useSocket<OrderCreatedPayload>('order:created', (data) => { // Invalidate query cache, show toast, update local state queryClient.invalidateQueries(['orders']); });
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.
- 2d ago First seen · 98 lines · 58 tokens per session scan A 9a5ae516cd22
broadcasting-agent is an agent published in the GitHub repository Softtor/nestjs-hexagonal (5 stars, last pushed 22d ago), licensed MIT. It adds 58 tokens to every session and 839 once invoked, about $0.0003 per session on Opus 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-31.
Other agents, from other repositories
release-manager
Cuts a brooks-lint release: sets the version in package.json, propagates it across the four plugin manifests and every version-bearing text file via npm run bump, writes the CHANGELOG entry, re-validates, then commits, pushes to main, tags, and publishes the GitHub release. Final pipeline stage of the brooks-harness…
frontend-engineer
Implements frontend features - pages, components, API integration, i18n, styling. Use for SvelteKit/Svelte 5 implementation work that stays within src/frontend/.
product-owner
Analyzes the codebase, issues, and TODOs to propose prioritized work items. Run when deciding what to work on next or reviewing the project backlog.
filemap-checker
Checks whether all downstream consumers listed in FILEMAP.md have been updated after a change. Use proactively after modifying files.
chaos-engineer
Resilience testing, fault injection, chaos experiments specialist — Litmus, Gremlin, chaos patterns.
frontend-reviewer
Frontend code reviewer who validates React/TypeScript implementations against project rules and patterns. Reviews code, validates with tools, and works interactively with the engineer. Never modifies code.