> ## Documentation Index
> Fetch the complete documentation index at: https://docs.factorize.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and edit triggers

> Configure skill event sources and retain compatibility with trigger clients.

In the browser, open a [skill](https://docs.factorize.sh/work/skills.md), then **Triggers**. Each skill has at most one optional trigger, which can contain several event sources. Execution configuration belongs to SKILL.md and its referenced presets, and the browser uses its name to label the trigger.

The following describes the compatible REST/MCP trigger interface. Existing trigger IDs, names and write omission semantics remain available to external clients.

Ask: “List execution integrations and triggers, then create a review trigger for this repository.” Use [the first-trigger input](https://docs.factorize.sh/quickstart.md) and [MCP tool contract](https://docs.factorize.sh/mcp/tools.md). Reuse an existing trigger when its name/purpose matches; trigger creation has no idempotency key.

`update_trigger` **replaces configuration**, rather than patching one field. Always call `get_trigger` first. Build a write object containing `triggerId`, `name`, `prompt`, `requiresVm`, optional `executionConfigId`, `runNameTemplate`, `concurrencyLimit`, `model`, optional `effort`, and the full intended `events` array. Preserve each existing event's `id`, `slug`, `kind`, `enabled`, and writable `config`. Strip read-only response fields (`triggerId` inside events, timestamps, reflection, secretConfigured and destination). Do not pass the entire read response unchanged.

Triggers using exe.dev may set optional `vmImage` to a public Docker/OCI image reference such as `ghcr.io/org/image:tag`. Leaving it blank uses exe.dev's default image. In the trigger editor, **Verify image** creates a temporary owned VM, checks SSH and workspace prerequisites, and deletes the VM; it never runs the trigger prompt. Verification is explicit and autosaving does not create VMs. Private images and registry credentials are not supported. Verification records what worked at that time; mutable tags may later resolve to a different image.

Supply `expectedUpdatedAt` from the fetched trigger's `updatedAt` to protect against concurrent edits. On `stale_trigger`, fetch again and reapply the desired changes. Omitting it retains last-writer-wins behavior. Omitted optional configuration resets to defaults; omitted events remove the configured automatic events. Preserve all events you want to keep.

After saving, call `get_trigger` and compare prompt, target and events. `enable_trigger` and `disable_trigger` change enabled state without rebuilding configuration. Disabling automation does not stop an existing run. Trigger saves can event `edited` lifecycle subscribers. Deleting a Trigger removes its template and events. Runs and artifacts follow their normal retention period.

## Names

The browser displays the owning skill name and has no separate trigger-name field or skill selector. Skill renames preserve IDs and run history. The compatibility API still accepts a trigger's internal name in its existing shared resource namespace; use the name returned by `get_trigger` when updating through that interface.

## Team and skill defaults

Skills select VM, permission and model presets through SKILL.md frontmatter. Missing selections inherit the corresponding team default. Preset configurations are resolved and frozen before a run queues. Configure only automation on the skill Triggers page; legacy manual events are hidden. See [Skills and presets](https://docs.factorize.sh/work/skills.md) for metadata, concurrency, disabled behavior and migration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.