CO

coreex-subscriber

A tool to manage messaging subscribers in CoreEx architecture, delegating to services or adapters.

Install

mkdir -p .claude/skills/coreex-subscriber && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19359" && unzip -o skill.zip -d .claude/skills/coreex-subscriber && rm skill.zip

Installs to .claude/skills/coreex-subscriber

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Add or modify an event/command subscriber in a CoreEx Subscribe host. USE FOR: command subscriber (owns the contract, delegates to app service), event-data-sync subscriber (delegates to IXxxSyncAdapter), event-business-process subscriber (choreography step, delegates to app service). Covers SubscribedBase, SubscribedBase<T>, ValueValidator, ErrorHandler, and subject naming. DO NOT USE FOR: API controllers (use coreex-api), application services (use coreex-app-service), replication adapter implementations (use coreex-adapter), Subscribe host Program.cs setup (see coreex-host-setup.instructions.md), Subscribe-test integration tests (use coreex-test-subscribe).
666 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Create command subscribers
  • Implement event-data-sync subscribers
  • Configure business process choreography
  • Manage error handling and validation

How it works

Subscribers receive messages from a broker and delegate logic to application services or adapters using attributes like [ScopedService] and [Subscribe].

Inputs & outputs

You give it
Subscriber scenario and subject
You get back
Subscriber class with delegated service call

When to use coreex-subscriber

  • Adding a new command subscriber
  • Implementing an event-data-sync subscriber
  • Setting up a business process choreography subscriber
  • Updating error handling logic in a subscriber

About this skill

<!-- AI workflow asset — dual-audience notice: - In the Avanade/CoreEx repository: this file is the authored source. Edit it here. - In a consumer repository: this file was generated by `dotnet new coreex-ai` (or refreshed via `dotnet new coreex-ai --force` / the `/coreex-docs-sync` skill). Do not hand-edit it directly — propose the change upstream in Avanade/CoreEx instead, then refresh once it is released. -->

CoreEx: Subscriber

Guides you through adding or modifying a subscriber in a CoreEx Subscribe host. A subscriber is the messaging equivalent of a controller — it receives a command or event from the broker and immediately delegates to an Application-layer service or adapter. No business logic lives here.

When to Use

There are three distinct subscriber scenarios — determine which applies before writing any code:

ScenarioTriggerDelegates toExample
CommandA command addressed to this domain arrives on the brokerApplication servicee.g. {Entity}ConfirmSubscriberI{Entity}Service
Event — Data SyncAn event from another domain/system arrives; maintain a local cached copyReplication adapter (IXxxSyncAdapter)e.g. {Entity}ModifySubscriberI{Entity}SyncAdapter
Event — Business ProcessAn event from another domain arrives; trigger a choreography step in this domainApplication servicee.g. {Entity}PlacedSubscriberI{Entity}Service

Rule: Never subscribe to a command addressed to another domain — only to commands addressed to this domain, or to events from any domain. Subscribing to another domain's commands means you are not the intended recipient. Use events for cross-domain coordination.

When Not to Use

  • HTTP API controllers — use coreex-api
  • Application services that the subscriber calls — use coreex-app-service
  • Replication adapter implementations (IXxxSyncAdapter) — use coreex-adapter
  • Subscribe host Program.cs setup or Service Bus receiver wiring — see /.github/instructions/coreex-host-setup.instructions.md

Resolve project-wide choices from state before asking. Read the solution-root AGENTS.md Feature Configuration: messaging-provider gates this skill (a Subscribe host exists only when a messaging provider is configured); outbox-enabled determines whether the delegated service publishes resulting events transactionally; rop-enabled confirms Result/Result<T> return-style pipelines. Only prompt for what is unrecorded; re-state resolved values for confirmation.

Quick Reference

  • Untyped subscriber (SubscribedBase) — message carries data in the key only; extract with @event.Key.Required()
  • Typed subscriber (SubscribedBase<TValue>) — message carries a serialised payload; set ValueValidator to validate before OnReceiveAsync
  • [ScopedService] + one or more [Subscribe("subject")] attributes on every subscriber class
  • No Program.cs edit needed — AddSubscribersUsing<T>() discovers all [Subscribe]-decorated classes automatically
  • Subject format: {solution}.{domain}.{entity}.{action}[.v{n}] — include .v{n} only when the message carries a payload
  • EventData.CreateCommand(...) for commands; EventData.CreateEvent(...) / new EventData().WithTitle(...) for events
  • ErrorHandler for graceful not-found and retry/dead-letter control — share the same static instance across related subscribers
  • Integration tests use WithApiTester<Program> (Subscribe host); simulate receipt via ServiceBusSubscribedSubscriber.ReceiveAsync(sbm) — see coreex-test-subscribe for the full test workflow

For full workflow and code examples see references/workflow.md.

Key References

When not to use it

  • HTTP API controller development
  • Application service implementation
  • Replication adapter implementation

Prerequisites

CoreEx Subscribe host

Limitations

  • No business logic allowed in subscriber
  • Must not subscribe to commands addressed to other domains

How it compares

It enforces a strict separation where subscribers only handle message receipt and delegation, keeping business logic in application services.

Compared to similar skills

coreex-subscriber side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
coreex-subscriber (this skill)021dNo flagsIntermediate
fastapi-templates5202moNo flagsIntermediate
android-kotlin-development2684moReviewAdvanced
unity-developer1423moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

5201,086

android-kotlin-development

aj-geddes

Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.

268679

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

142357

supabase-developer

daffy0208

Build full-stack applications with Supabase (PostgreSQL, Auth, Storage, Real-time, Edge Functions). Use when implementing authentication, database design with RLS, file storage, real-time features, or serverless functions.

95185

payload

payloadcms

Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.

73206

architecture-patterns

wshobson

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.

55214

Search skills

Search the agent skills registry