adding-a-trigger

Guides adding a new TriggerCrud-based trigger type across Windmill backend, frontend, CLI, and capture infrastructure.

Updated May 28, 2026
One-click install
npx skills add https://github.com/kma-core/windmill --skill adding-a-trigger-kma-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-a-trigger
Source: https://github.com/kma-core/windmill/tree/main/.agents/skills/adding-a-trigger
Command: npx skills add https://github.com/kma-core/windmill --skill adding-a-trigger-kma-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new trigger type to Windmill touches dozens of files across the Rust backend, Svelte frontend, TypeScript CLI, OpenAPI spec, and AI system prompts, and missing any one of them causes silent regressions like dropped syncs, broken capture buttons, or lost workspace forks. ## Core Features & Use Cases - Complete file checklist: Enumerates every file that must change, from SQLx migrations and the windmill-trigger-{kind} crate to sidebar entries, icons, and hardcoded trigger-kind arrays in ACL, offboarding, and trash modules. - Reference implementations: Points to GCP, Kafka, and Azure triggers as concrete patterns for push, pull, and streaming integrations. - Validation workflow: Provides exact cargo check, ./update_sqlx.sh, and npm run check:fast commands plus a final pre-PR checklist. - Use Case: When implementing a new Azure Event Grid trigger, follow the checklist to wire the database migration, feature-gated API routes, capture endpoint, CLI sync support, and frontend editor without missing the KINDS array length or OpenAPI enums. ## Quick Start Ask the AI to walk through the adding-a-trigger checklist to scaffold a new trigger kind such as MQTT across the Windmill backend, frontend, and CLI.

Frequently Asked Questions about adding-a-trigger

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

FAQPage Schema
How do I add a new trigger type to Windmill?

Create a SQLx migration for the trigger table, build a windmill-trigger-{kind} crate implementing TriggerCrud, wire it into windmill-api behind feature flags, extend the OpenAPI spec, and add CLI plus frontend components. The checklist covers every file including hardcoded kind arrays in ACL, offboarding, and trash modules.

What files must change when adding a Kafka-style trigger in Windmill?

Required changes span the database migration, backend trigger crate, TriggerKind enum, openapi.yaml, capture.rs, CLI types and sync logic, Svelte editor components, sidebar entries, and system prompt generators. Missing any one causes silent failures like dropped syncs or broken capture buttons.

Why does my new Windmill trigger not appear in CLI sync?

The CLI keeps hardcoded trigger-type lists in cli/src/types.ts, trigger.ts, and sync.ts that must each include the new kind. You must also regenerate cli/src/guidance/skills.ts by editing system_prompts/utils.py and running generate.py rather than editing the generated file directly.

Does this checklist apply to native triggers like Google Drive?

No, native triggers wired through windmill-native-triggers such as Nextcloud and Google Drive use a separate native-trigger skill. This checklist covers only TriggerCrud-based triggers like Kafka, GCP, Azure, MQTT, SQS, NATS, Postgres, and Email.

Why does cargo check fail after adding a trigger kind to granular ACLs?

The KINDS array in granular_acls.rs has a fixed length [&str; N] that must be incremented when adding a kind, and the mismatch only surfaces when the crate compiles with your feature flag. Run cargo check with your flag plus the other trigger features to catch it.