Install any skill in seconds. Free to start, no credit card required.
Get Started Free →iii-hq/iii-architecture-patterns
Use when composing iii primitives into backend architectures: durable workflows, reactive backends, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.
Passed 19 of 22 test cases with the skill, and 5 of 22 without it.
and 18 more in the full report
14 fixed5 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
What does an event-driven CQRS command function return after publishing its domain event?
| Checked | Without skill | With skill |
|---|---|---|
| Returns an acceptance payload object such as { accepted: true } | Missed | Passed |
The instructions your model reads when the skill loads.
Use this skill when the task is larger than one function or trigger. Pick the pattern from the
requirement, then implement it with Function, Trigger, Worker, state, queues, streams, and
pub/sub.
| Requirement | Pattern | iii shape |
|---|---|---|
| Sequential work with retries, DLQ, step tracking | Durable workflow | Functions chained through named queues, progress in state |
| Keep views, metrics, cache, or clients in sync | Reactive backend | State triggers plus stream/pubsub side effects |
| Specialized AI agents hand work to each other | Agentic backend | One function per agent, queue handoffs, shared state |
| Commands publish events and projections update independently | Event-driven CQRS | Command functions, event log in state, subscribe triggers |
| Pure, traceable composition | Effect pipeline | Small functions composed synchronously with trigger() |
| Webhook/cron automation chains | Low-code automation | Trigger, transform, action nodes chained by enqueue |
Use named queues when steps need different retry, FIFO, or concurrency policy.
import { registerWorker, TriggerAction } from "iii-sdk";
const iii = registerWorker("ws://localhost:49134", { workerName: "order-workflow" });
async function track(orderId: string, step: string, status: string) {
await iii.trigger({
function_id: "state::update",
payload: { scope: "orders", key: orderId, ops: [{ op: "set", path: `/steps/${step}`, value: status }] },
});
}
iii.registerFunction("orders::validate", async (order) => {
await track(order.id, "validate", "done");
return iii.trigger({
function_id: "orders::charge",
payload: order,
test cases passed, vs 5 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.