listener-agent

listener-agent is an agent for Claude Code from Softtor/nestjs-hexagonal. It costs 93 tokens per session (1,184 once invoked), scanned A, original, MIT.

A coding agent that creates event listeners for reactions to domain events. It first identifies whether the reaction stays within one bounded context, crosses into another, or sends data to an outside system.

In plain words
What is it for?
Use it to implement projection updates, audit logging, cache invalidation, cross-context commands, WebSocket broadcasts, RabbitMQ publishing, emails, or webhooks.
Why use it?
It removes guesswork about listener placement and behavior. It also adds the handler, tests, and module registration needed to connect the listener to the application.

Agent for Claude Code

Written for Claude Code: SubagentStop hook event. Also seen: model in frontmatter.

Part of the nestjs-hexagonal plugin — 12 skills, 9 agents, 4 hooks shipped together

Good fit Use it to implement projection updates, audit logging, cache invalidation, cross-context commands, WebSocket broadcasts, RabbitMQ publishing, emails, or webhooks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/softtor/nestjs-hexagonal/listener-agent
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Softtor/nestjs-hexagonal

Made for: Claude Code.

Or install nestjs-hexagonal, the plugin that ships this one along with the rest of its 12 skills, 9 agents, 4 hooks.

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 listener-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/softtor/nestjs-hexagonal/listener-agent/github.svg)](https://agentmods.dev/agents/softtor/nestjs-hexagonal/listener-agent)
Your own site
<a href="https://agentmods.dev/agents/softtor/nestjs-hexagonal/listener-agent"><img src="https://agentmods.dev/badge/agents/softtor/nestjs-hexagonal/listener-agent/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 listener-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/softtor/nestjs-hexagonal/listener-agent"><img src="https://agentmods.dev/badge/agents/softtor/nestjs-hexagonal/listener-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,184 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.00093 $0.01184
Opus 5.5 $0.00037 $0.00474
Sonnet 5.5 $0.00019 $0.00237
Haiku 4.5 $0.00009 $0.00118

Measured 9d ago against content hash 15a6b686dc10, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

listener-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 9d 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.

agents/listener-agent.md · 94 lines

How it starts

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

You are a Listener agent. You create event listeners following the hexagonal architecture patterns.

Where the rules come from

  • Rulebook slice (authoritative). When the project opted in (.claude/rulebook.yaml), the SubagentStart hook of this plugin injects the slice of the composed rulebook for the infrastructure and presentation layer(s) as additional context: rule ids, titles, severity and the fix of every FAIL rule. Treat that slice as the contract for this run; it already reflects the project's own rules and overrides. Without a slice (project not opted in), the rules in this file and in the skill still apply.
  • Layer skill (patterns and references). Load nestjs-hexagonal:event-listeners for the code patterns, templates and references. The skill shows how to write the code; the rulebook decides what is accepted.

Identification

Before creating anything, determine the listener TYPE:

  1. Same-BC Listener — event and listener are in the SAME bounded context

    • Purpose: projection update, audit log, cache invalidation
    • Location: <bc>/infrastructure/listeners/
  2. Cross-BC Listener — listener reacts to an event from ANOTHER bounded context

    • Purpose: trigger own business logic in response to external change
    • Location: <consuming-bc>/infrastructure/listeners/
    • Key: dispatches a COMMAND in its own BC, never calls external services directly
  3. Bridge Listener — transforms domain event into external output

    • Purpose: WebSocket broadcast, RabbitMQ publish, email, webhook
    • Location: <bc>/infrastructure/listeners/
    • Key: uses port (WsGatewayPort, MessageBrokerPort, EmailPort)

Process

  1. Ask or determine: which event? which BC? what side effect?
  2. Identify listener type (same-BC / cross-BC / bridge)
  3. Check if event class exists — if not, create it first
  4. Write test FIRST (TDD)
  5. Write listener implementation
  6. Register in consuming module's providers
  7. Verify: types compile, test passes

Critical Rules

Read the full file on GitHub · 94 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. 9d ago Changed · +4 lines 15a6b686dc10
  2. 27d ago Changed · +21 lines 686040fb24be
  3. 1mo ago First seen · 69 lines · 93 tokens per session scan A fb3c664dc9ff

Subscribe to this mod's changes

listener-agent is an agent published in the GitHub repository Softtor/nestjs-hexagonal (5 stars, last pushed 10d ago), licensed MIT. It adds 93 tokens to every session and 1,184 once invoked, about $0.0004 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-31.

Related

Other agents, from other repositories

api-platform-builder

Creates and configures API Platform resources with operations, DTOs, state providers, processors, and security. Handles full resource scaffolding from entity to tested API endpoint. Use for building APIs, creating resources, or configuring API Platform.

dev-toolings/superpowers-symfony · 50 tokens

symfony-engineer

Implements Symfony application code following framework best practices, drawing on the superpowers-symfony skill library. Use for general Symfony coding — controllers, services, dependency injection, value objects/DTOs, forms, Twig components, configuration — when no more specialized agent (api-platform-builder…

dev-toolings/superpowers-symfony · 76 tokens

migrator

Migration specialist — executes schema, each independently deployable and reversible. Invoke when transitioning code or data from version A to version B across multiple deployments — never for single-commit refactors.

lugassawan/swe-workbench · 41 tokens

do-setup-assistant

Autonomous Durable Objects project scaffolder. Analyzes user requirements and automatically sets up complete DO project with proper configuration, code, and tests.

secondsky/claude-skills · 35 tokens

symfony-security-auditor

Read-only security audit of Symfony authentication and authorization: firewalls, accesscontrol, voters, API Platform security, rate limiting, CSRF, password hashing, and input validation. Use proactively after changes to security.yaml, voters, controllers, forms, or API resources.

dev-toolings/superpowers-symfony · 60 tokens

symfony-tdd-coach

Guides TDD workflow for Symfony projects using Pest PHP or PHPUnit. Drives strict RED-GREEN-REFACTOR cycles with proper test isolation, Foundry factories, and regression protection. Use when writing tests, adding test coverage, or practicing TDD.

dev-toolings/superpowers-symfony · 58 tokens