ワンクリックで
add-event
Add a new domain event with its publisher call and background event handler. Use for async side effects.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Add a new domain event with its publisher call and background event handler. Use for async side effects.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Add a complete REST endpoint from command to controller route. Use when building new API endpoints.
Summarize the API interface changes made during THIS session for the frontend, then optionally spawn an agent to implement them in the frontend repo. Use after changing endpoints, request/response DTOs, or auth.
One-shot guided session — prunes unused code, scaffolds new entities/endpoints, updates project identity config, and replaces the init migration for a specific project.
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"
Implement a change with a pipeline scaled to its complexity. Single entry point for all code changes — auto-detects effort or accepts small|mid|tuff override.
Run a Linear task end-to-end — creates an isolated tmux session + worktree, starts a Claude agent to implement it, opens a PR, and watches for review feedback automatically.
| name | add-event |
| description | Add a new domain event with its publisher call and background event handler. Use for async side effects. |
| argument-hint | <event-name> |
Create a domain event, publish it from a handler, and create a background event handler.
$0 -- Event name in PascalCase (e.g., InvoiceSent, UserDeactivated, OrderCompleted)Definitions:
!find backend/app/shared/events -name "*.py" -not -name "__init__.py" -not -name "__pycache__" -not -name "base.py" 2>/dev/null | sort
Handlers:
!find backend/app/events -name "*.py" -not -name "__init__.py" -not -name "__pycache__" -not -path "*/base/*" 2>/dev/null | sort
File: backend/app/shared/events/v1/{name}.py
from typing import ClassVar
from uuid import UUID
from backend.app.shared.events.base import BaseEvent
class {EventName}(BaseEvent):
name: ClassVar[str] = "{event_name_snake_case}"
# payload fields
user_id: UUID
reason: str
File: backend/app/shared/events/v1/__init__.py
Add to imports and __all__.
In the handler that triggers the event, inject dbus: DBus and publish:
from backend.app.shared.db.dbus import DBus
from backend.app.shared.events.v1.{name} import {EventName}
@dataclass
class SomeHandler(Handler[...]):
db: Database
dbus: DBus
async def __call__(self, cmd, _ctx=None):
async with self.db:
# ... business logic ...
await self.dbus.publish(
{EventName}(user_id=user.id, reason="...")
)
await self.db.commit()
File: backend/app/events/v1/handlers/{domain}/{name}.py
from dataclasses import dataclass
from backend.app.events.v1.handlers.base import EventHandler
from backend.app.shared.events.v1.{name} import {EventName}
@dataclass
class {EventName}Handler(EventHandler[{EventName}]):
# inject dependencies for the side effect
email_sender: EmailSender
async def __call__(self, event: {EventName}, /) -> None:
# handle the event (send email, update analytics, etc.)
await self.email_sender.send(
to=event.email,
type=EmailType.NOTIFICATION,
params={"reason": event.reason},
)
File: backend/app/events/v1/handlers/__init__.py
Import the handler's domain module:
from . import auth, {domain}
If this is a new domain, create backend/app/events/v1/handlers/{domain}/__init__.py with the handler import.
If the event handler has dependencies not already in the queue's DI container, add them to backend/entry/queue/ioc.py.
Run just check.