Install
$ agentstack add skill-makigjuro-cloudstack-ai-plugins-add-event-handler ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Add Event Handler
When the user asks to add an event handler, scaffold a WolverineFx handler for a domain or integration event.
Arguments
{EventName}-- Name of the event to handle (e.g.,OrderCreatedEvent){Service}-- Target microservice (ask if ambiguous)
Configuration
Read cloudstack.json from the project root at the start of execution. Extract:
NAMESPACE=project.namespace(default: detect from*.slnname or first*.csprojroot namespace)DOMAIN_PATH=backend.sharedDomainPath(default: find directory matching**/Domain/containingEntities/)SERVICES=backend.services[](default: discover fromsrc/*/directories containing.Application/subfolders)
If cloudstack.json does not exist, auto-detect by scanning the project structure.
1. Find the Event
Search for the event class:
grep -rn "class {EventName}" src/
If the event doesn't exist, suggest running /add-entity first or create it inline.
2. Event Handler (Application/Events/{EventName}Handler.cs)
namespace {Namespace}.{Service}.Application.Events;
public class {EventName}Handler
{
// Constructor-inject repositories, services, or ILogger
public async Task Handle({EventName} @event, CancellationToken cancellationToken)
{
// React to the event:
// - Update read models
// - Send notifications
// - Publish integration events
// - Trigger side effects
}
}
For handlers that publish to a message broker:
public class {EventName}Handler
{
private readonly IMessagePublisher _messagePublisher;
private readonly ILogger _logger;
public {EventName}Handler(IMessagePublisher messagePublisher, ILogger logger)
{
_messagePublisher = messagePublisher;
_logger = logger;
}
public async Task Handle({EventName} @event, CancellationToken cancellationToken)
{
_logger.LogInformation("Handling {Event} for {Id}", nameof({EventName}), @event.Id);
await _messagePublisher.PublishAsync(
"{domain}.events.{event-type}",
@event,
cancellationToken);
}
}
3. Integration Event (if cross-service)
If the handler needs to publish an event for other services:
namespace {Namespace}.{Service}.Application.Events;
public record {Name}IntegrationEvent(
Guid Id,
// relevant fields
DateTimeOffset OccurredAt);
Checklist
- [ ] Handler class in
Application/Events/folder - [ ] Event parameter named
@event(reserved keyword escaping) - [ ] CancellationToken propagated
- [ ] Logging at appropriate level
- [ ] No return value (event handlers are fire-and-forget)
- [ ] Idempotent handling (events may be delivered more than once)
- [ ] No exceptions thrown for business logic (log and continue)
Guidelines
- WolverineFx discovers handlers by convention -- no explicit registration needed
- One handler per event per concern (don't mix read model updates with notifications)
- Use
ILoggerfor observability, notConsole.WriteLine - For message broker subjects/topics, follow the project's naming conventions
Output
After scaffolding, report:
## Scaffolded: {EventName}Handler
Files created:
- `src/{Service}/{Service}.Application/Events/{EventName}Handler.cs`
{if integration event:}
- `src/{Service}/{Service}.Application/Events/{Name}IntegrationEvent.cs`
Next: Run `/run-tests` to verify handler registration.
Error Handling
- Event class not found: Suggest running
/add-entityfirst to create the entity and its domain events. - Message publisher interface missing: Check if
IMessagePublisheris registered in the service's DI. If not, it may need to be added to the Infrastructure layer.
Related Skills
/add-entityto create the domain entity and events first/add-commandif the handler needs to trigger a command
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: makigjuro
- Source: makigjuro/cloudstack-ai-plugins
- License: MIT
- Homepage: https://github.com/makigjuro/cloudstack-ai-plugins#quick-start
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.