cqrs-pattern
Implement CQRS pattern for Electron services. Use when creating service methods with Observable queries and ResultAsync commands.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Implement CQRS pattern for Electron services. Use when creating service methods with Observable queries and ResultAsync commands.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Advanced patterns for Hono-based Electron IPC including Zod validation and error handling. Use when adding validation or handling errors in routes.
Implement type-safe IPC routes in Electron using Hono RPC. Use when creating API routes between main and renderer processes.
Set up Hono-based type-safe IPC for Electron. Use when implementing IPC or migrating from ipcRenderer to type-safe RPC.
Implement reactive state management with Jotai atoms in Electron renderer. Use when creating atoms with real-time IPC updates or hybrid stream + HTTP patterns.
Design React Suspense boundaries interactively. Use when planning loading states, configuring boundary granularity, or combining with ErrorBoundary.
| name | cqrs-pattern |
| description | Implement CQRS pattern for Electron services. Use when creating service methods with Observable queries and ResultAsync commands. |
| allowed-tools | Read, Write, Edit, Grep, Glob |
| Aspect | Query (Read) | Command (Write) |
|---|---|---|
| Return Type | Observable<T> | ResultAsync<void, Error> |
| Side Effects | None | Database writes, notifications |
| Topic | File |
|---|---|
| Service interface design | SERVICE-INTERFACE.md |
| Observable patterns | OBSERVABLE-PATTERN.md |
| Result types | RESULT-TYPES.md |
| Main process subscription | MAIN-PROCESS-SUBSCRIPTION.md |
interface UserService {
// Queries → Observable
list(): Observable<User[]>;
get(id: string): Observable<User | undefined>;
// Commands → ResultAsync
create(data: CreateUserData): ResultAsync<void, ApplicationError>;
}
Use BehaviorSubject to bridge: commands trigger #notify.next(), queries subscribe to it.