Ipc contract design

From muratgur/ordinus · View interactive version

Ipc contract design is an AI agent skill from the GitHub repository muratgur/ordinus. Design and maintain Ordinus typed IPC contracts. Use when adding or changing window.ordinus APIs, ipcMain handlers, ipc channel names, shared request/response types, Zod schemas, preload bridge methods, or renderer calls into main process.

How to use this skill

Skill file

IPC Contract Design

Objective

Keep Ordinus IPC small, typed, explicit, and stable enough for the renderer to act as a safe UI over main-process capabilities.

Contract Shape

Workflow

  1. Name the user-facing capability before creating an IPC method.
  2. Add or update shared types and Zod schemas.
  3. Add the IPC channel constant.
  4. Implement the main handler and validate untrusted input.
  5. Add the narrow preload method that invokes that channel.
  6. Consume the method in renderer through window.ordinus.
  7. Run typecheck, lint, and build.

Guidelines

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.