om-build-workflow

Build durable business workflows with activities, triggers, compensation, and idempotent state transitions.

1.7k|382|Updated Sep 10, 2025
One-click install
npx skills add https://github.com/open-mercato/open-mercato --skill om-build-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: om-build-workflow
Source: https://github.com/open-mercato/open-mercato/tree/main/packages/create-app/agentic/shared/ai/skills/om-build-workflow
Command: npx skills add https://github.com/open-mercato/open-mercato --skill om-build-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building long-running business workflows that survive restarts, handle retries, and coordinate human tasks is error-prone when done ad hoc. This Skill guides you through composing the installed workflow engine correctly so state transitions, event logs, and idempotency stay consistent.

Core Features & Use Cases

  • Workflow Design: Define steps, transitions, event triggers, user tasks, timers, and compensation in reverse dependency order with immutable event history.
  • Activity Contracts: Create custom activities with validated config/input/output, retry and timeout policies, SSRF protection, and workflow-safe command allowlisting.
  • Durability & Progress: Implement idempotency keys, stable output paths, tenant-scoped state, cancellation handling, and live progress reporting.
  • Use Case: Add an approval workflow where a manager completes a durable user task, an external API activity runs with retries, and compensation rolls back changes if a later step fails.

Quick Start

Ask the AI to add a durable approval workflow with a user task, an external API activity, and compensation logic for your module.

Frequently Asked Questions about om-build-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom workflow activity?

Define validated config, input, and output schemas, register the handler, and choose sync for short deterministic work or queued async for long work. Add editor fields and i18n only when users configure it, then run yarn generate for discovered changes.

How do I make workflow retries idempotent?

Persist one-time idempotency keys outside rollback loss and reuse them on retry. Append workflow events atomically with each state transition so recovery never duplicates external effects.

Can a workflow dispatch existing commands?

Yes, but every command ID a workflow dispatches must be allowlisted through registerWorkflowSafeCommands with the exact requiredFeatures. Registration on the command bus alone does not make a command workflow-safe.

Why does my WAIT_FOR_TIMER step fail validation?

Every WAIT_FOR_TIMER step needs config.duration as an ISO 8601 duration or config.until as an absolute timestamp. Omitting both fails validation with TIMER_CONFIG_MISSING.

How do external API activities stay secure?

External URL activities enforce SSRF protection, manual redirect handling, timeout and size bounds, allowlisted non-secret interpolation, and redacted logs. Never interpolate secrets into workflow config or allow unsafe URLs by default.