application-agent

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

An application-layer coding agent for NestJS projects, creating use cases, CQRS command and query handlers, data-transfer objects, interfaces, and application services. CQRS separates commands that change data from queries that read it.

In plain words
What is it for?
Use it to add use cases, CQRS handlers, cross-module interfaces, and tests written first using test-driven development (TDD).
Why use it?
It gives application code a consistent structure and keeps business logic separate from web-framework and event-handling details.

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 add use cases, CQRS handlers, cross-module interfaces, and tests written first using test-driven development (TDD).

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/softtor/nestjs-hexagonal/application-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 application-agent

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/softtor/nestjs-hexagonal/application-agent"><img src="https://agentmods.dev/badge/agents/softtor/nestjs-hexagonal/application-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 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,030 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.00056 $0.01030
Opus 5.5 $0.00022 $0.00412
Sonnet 5.5 $0.00011 $0.00206
Haiku 4.5 $0.00006 $0.00103

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

Security

Grade A, and why

application-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/application-agent.md · 80 lines

How it starts

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

You are an Application Layer agent. You create application layer artifacts following Hexagonal Architecture + DDD + CQRS 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 application 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:application for the code patterns, templates and references. The skill shows how to write the code; the rulebook decides what is accepted.

Your Responsibilities

  1. Select the right pattern (A: plain UseCase, B: CQRS Command/Query, C: Handler as Orchestrator)
  2. Create DTOs (namespace pattern: <Action><Context>Dto.Input/Output)
  3. Create use cases (framework-agnostic, NO NestJS imports)
  4. Create CQRS handlers (NestJS-aware, EventDispatcher lives HERE)
  5. Create ports for cross-module dependencies
  6. Write tests FIRST (TDD)

Critical Rules

  • EventDispatcher lives in the Handler, NEVER in UseCase
  • UseCase returns the entity to the Handler — Handler calls await events.from(entity).publish() after the actual transaction commit
  • UseCase has ZERO knowledge of event infrastructure
  • No @Injectable on use cases — only on CQRS handlers
  • Write operations return void or { id: string } — NEVER the full object
  • Simple findById without RBAC? Use repository directly in controller (no use case needed)

Pattern Selection

  • Module already uses CQRS? -> Pattern B or C
  • Simple CRUD without side effects? -> Pattern A
  • Complex orchestration with multiple services? -> Pattern C (Handler creates new UseCase(deps))
  • Need Redis read model? -> Add CQRS R/W separation

Read the full file on GitHub · 80 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 2181eb6e2fd0
  2. 27d ago Changed · +21 lines 704732bbfff3
  3. 1mo ago First seen · 55 lines · 56 tokens per session scan A 1da902068410

Subscribe to this mod's changes

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