
iii-functions-and-triggers
Registers functions and triggers on the iii engine across TypeScript, Python, and Rust. Use when creating workers, registering function handlers, binding triggers, or invoking functions across languages.
- 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-functions-and-triggers- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads iii-functions-and-triggers automatically when relevant.
- 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.
Functions & Triggers
Comparable to: Serverless function runtimes, Lambda, Cloud Functions
Key Concepts
Use the concepts below when they fit the task. Not every worker needs all of them.
- A Function is an async handler registered with a unique ID
- A Trigger binds an event source to a function — types include http, durable:subscriber, cron, state, stream, and subscribe
- Functions invoke other functions via
trigger()regardless of language or worker location - The engine handles serialization, routing, and delivery automatically
- HTTP-invoked functions wrap external endpoints as callable function IDs
- Functions can declare request/response formats for documentation and discovery — auto-generated from types in Rust (via
schemars::JsonSchema) and Python (via type hints / Pydantic), or manually provided in Node.js
Architecture
registerWorker() connects the worker to the engine, registerFunction defines handlers, registerTrigger binds event sources to those handlers, and the engine routes incoming events to the correct function. Functions can invoke other functions across workers and languages via trigger().
iii Primitives Used
| Primitive | Purpose |
|---|---|
registerWorker(url, options?) | Connect worker to engine |
registerFunction(id, handler) | Define a function handler |
registerTrigger({ type, function_id, config, metadata? }) | Bind an event source to a function |
trigger({ function_id, payload }) | Invoke a function synchronously |
trigger({ ..., action: TriggerAction.Void() }) | Fire-and-forget invocation |
trigger({ ..., action: TriggerAction.Enqueue({ queue }) }) | Durable async invocation via queue |
Reference Implementation
- TypeScript: ../references/functions-and-triggers.js
- Python: ../references/functions-and-triggers.py
- Rust: ../references/functions-and-triggers.rs
Each reference shows the same patterns (function registration, trigger binding, cross-function invocation) in its respective language.
Common Patterns
Code using this pattern commonly includes, when relevant:
registerWorker('ws://localhost:49134', { workerName: 'my-worker' })— connect to the engineregisterFunction('namespace::name', async (input) => { ... })— register a handlerregisterTrigger({ type: 'http', function_id, config: { api_path, http_method, middleware_function_ids? } })— HTTP trigger (with optional middleware)registerTrigger({ type: 'durable:subscriber', function_id, config: { topic } })— queue triggerregisterTrigger({ type: 'cron', function_id, config: { expression } })— cron triggerregisterTrigger({ type: 'state', function_id, config: { scope, key } })— state change triggerregisterTrigger({ type: 'stream', function_id, config: { stream } })— stream triggerregisterTrigger({ type: 'subscribe', function_id, config: { topic } })— pubsub subscriber- Cross-language invocation: a TypeScript function can trigger a Python or Rust function by ID
registerTrigger({ ..., metadata: { owner: 'team', priority: 'high' } })— optional trigger metadata
Request/Response Format (Auto-Registration)
Functions can declare their input/output schemas for documentation and discovery:
- Rust: Derive
schemars::JsonSchemaon handler input/output types —RegisterFunction::new()auto-generates JSON Schema (Draft 7) from the type - Python: Use type hints (Pydantic models or primitives) on handler parameters and return types —
register_function()auto-extracts JSON Schema (Draft 2020-12) - Node.js: Pass
request_format/response_formatmanually in the registration message (e.g., via Zod'stoJSONSchema())
Adapting This Pattern
Use the adaptations below when they apply to the task.
- Replace placeholder handler logic with real business logic (API calls, DB queries, LLM calls)
- Use
namespace::nameconvention for function IDs to group related functions - For HTTP endpoints, configure
api_pathandhttp_methodin the trigger config - For durable async work, use
TriggerAction.Enqueue({ queue })instead of synchronous trigger - For fire-and-forget side effects, use
TriggerAction.Void() - Multiple workers in different languages can register functions that invoke each other by ID
Pattern Boundaries
- For HTTP endpoint specifics (request/response format, path params), prefer
iii-http-endpoints. - For queue processing details (retries, concurrency, FIFO), prefer
iii-queue-processing. - For cron scheduling details (expressions, timezones), prefer
iii-cron-scheduling. - For invocation modes (sync vs void vs enqueue), prefer
iii-trigger-actions. - Stay with
iii-functions-and-triggerswhen the primary problem is registering functions, binding triggers, or cross-language invocation.
When to Use
- Use this skill when the task is primarily about
iii-functions-and-triggersin the iii engine. - Triggers 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-functions-and-triggers skill do?
Registers functions and triggers on the iii engine across TypeScript, Python, and Rust. Use when creating workers, registering function handlers, binding triggers, or invoking functions across languages.
How do I install iii-functions-and-triggers?
Run npx skills add https://github.com/iii-hq/iii --skill iii-functions-and-triggers 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-functions-and-triggers/ (personal) or .claude/skills/iii-functions-and-triggers/ (project).
Which AI agents can use iii-functions-and-triggers?
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-functions-and-triggers 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-functions-and-triggers?
It is published by iii-hq/iii in iii-hq/iii. It has 193 recorded installs.
More from iii-hq/iii
iii-engine-config
iii-hq/iii
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.
iii-getting-started
iii-hq/iii
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.
iii-error-handling
iii-hq/iii
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.
iii-architecture-patterns
iii-hq/iii
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.
iii-sdk-reference
iii-hq/iii
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.
iii-core-primitives
iii-hq/iii
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.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.