MCPInstall
iii-hq/iii avatar

iii-trigger-conditions

Registers a boolean condition function and attaches it to triggers via conditionfunctionid so handlers only fire when the condition passes. Use when gating triggers on business rules, checking user permissions, validating data before processing, filtering high-value orders, rate-limiting events, or conditionally skipping handlers based on payload content.

Installs
193
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/iii-hq/iii --skill iii-trigger-conditions
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads iii-trigger-conditions automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Trigger Conditions

Comparable to: Middleware guards, event filters

Key Concepts

Use the concepts below when they fit the task. Not every trigger needs a condition.

  • A Condition Function is a registered function that returns a boolean (true or false)
  • The engine calls the condition function before the handler; the handler runs only if true
  • Attach a condition to any trigger type via condition_function_id in the trigger config
  • The condition function receives the same event data as the handler would
  • Works with all trigger types: http, durable:subscriber, cron, state, stream, subscribe

Architecture

When a trigger fires, the engine first invokes the condition function with the event data. If the condition returns true, the handler executes normally. If false, the handler is skipped silently with no error or retry.

iii Primitives Used

PrimitivePurpose
registerFunction(id, handler) (condition)Register the condition function (returns boolean)
registerFunction(id, handler) (handler)Register the handler function
registerTrigger({ type, function_id, config: { condition_function_id } })Bind trigger with condition gate

Reference Implementation

See ../references/trigger-conditions.js for the full working example — a condition-gated trigger where a business rule function filters events before the handler processes them.

Also available in Python: ../references/trigger-conditions.py

Also available in Rust: ../references/trigger-conditions.rs

Common Patterns

Code using this pattern commonly includes, when relevant:

  • registerFunction('conditions::is-high-value', async (input) => input.new_value?.amount >= 1000) — condition function
  • registerFunction('orders::notify-high-value', async (input) => { ... }) — handler function
  • registerTrigger({ type: 'state', function_id: 'orders::notify-high-value', config: { scope: 'orders', key: 'status', condition_function_id: 'conditions::is-high-value' } }) — bind with condition
  • Condition returns true — handler executes
  • Condition returns false — handler is skipped silently
  • Use conditions:: prefix for condition function IDs to keep them organized

Adapting This Pattern

Use the adaptations below when they apply to the task.

  • Replace the condition logic with your business rules (threshold checks, role validation, feature flags)
  • Conditions work on all trigger types — use them on HTTP triggers for auth guards, on durable:subscriber triggers for message filtering
  • Keep condition functions lightweight and fast since they run on every trigger fire
  • Combine multiple business rules in a single condition function rather than chaining conditions
  • Condition functions can call trigger() internally to check state or other functions

Pattern Boundaries

  • For registering functions and triggers in general, prefer iii-functions-and-triggers.
  • For state change triggers specifically, prefer iii-state-reactions.
  • For invocation modes (sync/void/enqueue), prefer iii-trigger-actions.
  • Stay with iii-trigger-conditions when the primary problem is gating trigger execution with a condition check.

When to Use

  • Use this skill when the task is primarily about iii-trigger-conditions in the iii engine.
  • Use this skill when the request directly asks for this pattern or an equivalent implementation.

Boundaries

  • Never use this skill as a generic fallback for unrelated tasks.
  • You must not apply this skill when a more specific iii skill is a better fit.
  • Always verify environment and safety constraints before applying examples from this skill.

FAQ

What does the iii-trigger-conditions skill do?

Registers a boolean condition function and attaches it to triggers via conditionfunctionid so handlers only fire when the condition passes. Use when gating triggers on business rules, checking user permissions, validating data before processing, filtering high-value orders, rate-limiting events, or conditionally skipping handlers based on payload content.

How do I install iii-trigger-conditions?

Run npx skills add https://github.com/iii-hq/iii --skill iii-trigger-conditions in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iii-trigger-conditions/ (personal) or .claude/skills/iii-trigger-conditions/ (project).

Which AI agents can use iii-trigger-conditions?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is iii-trigger-conditions safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains iii-trigger-conditions?

It is published by iii-hq/iii in iii-hq/iii. It has 193 recorded installs.

More from iii-hq/iii

View all →

Configure a managed iii engine through worker-compose.yaml or a directly supervised engine through config.yaml. Use for engine ports, RBAC via the rbac-proxy worker, observer limits, streams, sandboxes, and configuration storage.

5.5K installs

Install the iii engine, set up your first worker, and get a working backend running. Use when a user wants to start a new iii project, install the SDK, or needs help with initial setup and configuration.

Backend & APIs5.5K installs

Handle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.

Backend & APIs5.3K installs

Use when composing iii primitives into backend architectures: durable workflows, reactive backends, observer side effects, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.

Use when working with iii SDK APIs across Node.js, browser, Python, Rust, or Go: package installation, worker initialization, function/trigger registration, observers, invocation, local dispatch, channels, logging, OpenTelemetry, and language-specific caveats.

Backend & APIs5.2K installs

Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.

Backend & APIs5.2K installs

Popular business & finance skills

View category →
flowkit-labs avatar

website-builder

flowkit-labs/skills

Build and preview a hosted website for a business from a plain-language brief. Use for a new business homepage, landing page, service showcase, portfolio, online store, or customer portal, and for updates to sites hosted by this builder. Add bookings, checkout, or member accounts as needed and automate reminders, customer follow-ups, and reports after launch. Follow the user's choice when they specify another host or ask to edit an existing codebase.

Business & Finance191.7K installs
autonnel avatar

sales-funnel-blueprint

autonnel/autonnel-skills

Turn an offer into a concrete multi-step sales funnel spec - page-by-page structure, price ladder, copy outline and the metrics each step must hit. Use when asked to build a sales funnel, marketing funnel, landing page flow, lead magnet funnel, webinar funnel, tripwire or VSL funnel, when planning a product launch page flow, or when someone asks "what pages do I need" for selling something online.

Business & Finance137.1K installs
coreyhaines31 avatar

sales-enablement

coreyhaines31/marketingskills

When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'battle card,' 'battlecard,' 'competitive one-pager,' 'win-loss analysis,' 'why are we losing deals,' 'loss reasons,' 'how do I respond to this objection,' 'prospect just said,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps,' 'cold call script,' or 'voicemail script.' Use this for any document or asset that helps a sales team close deals. For public competitor comparison pages, see competitors. For running buyer interviews or churn research, see customer-research. For marketing website copy, see copywriting. For cold outreach emails, see cold-email. For the offer being sold (bonuses, guarantees, pricing structure),

Business & Finance135.5K installs
coreyhaines31 avatar

revops

coreyhaines31/marketingskills

When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'outbound pipeline stages,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see emails. For pricing decisions, see pricing.

Business & Finance129K installs
coreyhaines31 avatar

pricing

coreyhaines31/marketingskills

When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' 'should I offer a free plan,' 'pricing page teardown,' 'pricing page audit,' 'is my pricing page AI-readable,' or 'can AI read my pricing.' Use this whenever someone is figuring out what to charge, how to structure their plans, or wants to audit a pricing page (for humans and for the AI agents that shortlist tools). For in-app upgrade screens, see paywalls. For offer construction (bonuses, guarantees, value framing, naming) on services/courses/coaching/high-ticket B2B, see offers.

Business & Finance98K installs
coreyhaines31 avatar

offers

coreyhaines31/marketingskills

When the user wants to design, construct, or improve an offer — the thing they actually sell — including value framing, bonus stacking, guarantee design, scarcity/urgency, naming, and payment structure. Also use when the user mentions 'offer,' 'offer design,' 'build an offer,' 'grand slam offer,' 'irresistible offer,' 'value stack,' 'bonus stack,' 'guarantee,' 'risk reversal,' 'money-back guarantee,' 'scarcity,' 'urgency,' 'high-ticket offer,' 'productize a service,' 'naming an offer,' 'payment plan,' 'down-sell,' 'upsell offer,' or 'why isn't my offer converting.' Best for services, agencies, courses, coaching, info products, high-ticket B2B, and direct-response. If you run pure self-serve SaaS, read pricing first — tiers and packaging do more work there. For price level itself (tiers, freemium, value metric), see pricing. For the page that presents the offer, see copywriting. For the launch moment, see launch. For sales collateral, see sales-enablement.

Business & Finance75.6K installs