Skip to content
Agentmart
Submit a tool

sre-triggers

Trigger declaration reference for Sentinel SRE flow files.

Skill by ndx-au

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/ndx-au-sre-triggers

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Trigger declaration reference for Sentinel SRE flow files. Use this skill when declaring or configuring cron triggers, webhook triggers (auth, HMAC, rate limiting, CIDR), event triggers (exact match and wildcard patterns), form triggers (events.yaml wiring), or manual triggers. Also covers trigger ID prefixes, params injection, sentinel.emit(), and events.yaml structure.

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/sre-triggers

What's inside

Skill name
sre-triggers
Description
Trigger declaration reference for Sentinel SRE flow files. Use this skill when declaring or configuring cron triggers, webhook triggers (auth, HMAC, rate limiting, CIDR), event triggers (exact match and wildcard patterns), form triggers (events.yaml wiring), or manual triggers. Also covers trigger ID prefixes, params injection, sentinel.emit(), and events.yaml structure.
License
MIT
Instructions
195 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Cron, Webhooks, Events, Forms

## Trigger Declaration

Triggers are declared at the top of a flow file as a global `triggers` table:

```lua
triggers = {
  cron("*/5 * * * *"),
  webhook("/my/hook", {auth="hmac", key="webhook_secret"}),
  event("order.created"),
}
```

Multiple triggers can be declared; each fires the same flow independently.

---

## Cron Triggers

```lua
cron("*/5 * * * *")           -- every 5 minutes
cron("0 9 * * 1-5")           -- 9am Mon-Fri
cron("@hourly")               -- descriptor shorthand
```

- Standard 5-field cron expression (minute hour dom month dow) + descriptors
- Parser: robfig/cron/v3 with UTC timezone
- Behavior: `SkipIfStillRunning` — skips next fire if previous execution is still running
- Recovery chain: `Recover` — panics are caught and logged

**Params injected into flow:**
```lua
params.trigger_type    -- "cron"
params.trigger_id      -- "cr_xxxxxxxx"
params.trigger_name    -- display name
params.scheduled_at    -- RFC3339 scheduled fire time
```

---

## Webhook Triggers

```lua
webhook("/path", {
  auth    = "hmac",          -- "none"|"hmac"|"bearer"
  key     = "vault_key",     -- vault secret key (for hmac/bearer)
  alg     = "sha256",        -- "sha256"|"sha512" (hmac only)
  sig_hdr = "X-Signature",   -- signature header name (hmac only)
  cidrs   = {"10.0.0.0/8"},  -- IP allowlist (optional)
  rps     = 100,             -- per-endpoint rate limit req/s (optional)
})
```

**Security stack** (applied in order): rate limiting → IP/CIDR filter → HMAC verification → execute flow

- HMAC format in header: `sha256=<hex_signature>`
- Constant-time comparison for HMAC
- Global rate limit: 100 req/s burst 50; per-endpoint if `rps` set
- All webhook responses: HTTP 200, errors in body

**Webhook URL:** `{base}/wh{path}` or `{base}/kt/{ns}/{name}/wh/{path}`

**Params injected into flow:** query params + JSON body merged (body wins conflicts), plus:
```lua
params.trigger_type   -- "webhook"
params.trigger_id     -- "wh_xxxxxxxx"
params.trigger_path   -- the webhook path (e.g. "/my/hook")
-- All merged query+body fields available as params.{field_name} (string values)
-- Also set: ctx.params (same merged fields as table) and ctx.req ({method, path, headers, files})
```

---

## Event Triggers

```lua
event("order.created")    -- exact match
event("order.*")          -- wildcard: matches order.created, order.updated
                          -- does NOT match "order" or "orders.created"
```

Pattern matching rules:
- Exact: `"order.created"` matches only `"order.created"`
- Wildcard `"order.*"`: prefix must be followed by `.` then one or more chars
- Pattern `"order.*"` does NOT match `"order"` (no suffix) or `"orders.x"` (wrong prefix)

**Params injected into flow:**
```lua
params.trigger_type    -- "event"
params.trigger_id      -- "ev_xxxxxxxx"
params.event_id        -- UUID of the event
params.event_pattern   -- the pattern that was emitted
params.event_source    -- flow that emitted the event
params.event_payload   -- table of event data
params.event_time      -- RFC3339 timestamp
```

**Emitting events from Lua:**
```lua
sentinel.emit("order.created", {id=123, customer="abc"})
```

Flows can also subscribe to harness-emitted operational events such as:
- `backup.schedule.synced`
- `backup.run.started`
- `backup.run.completed`
- `backup.run.failed`

---

## Form Triggers

Forms wire to flows via `events.yaml`:
```yaml
events:
  "kf.{ns}.{name}.{form}":
    flows:

From ndx-au/sre-init, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jun 16, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ndx-au

Cite this page

sre-triggers skill. Agent Mart. https://agentmart.dev/skills/ndx-au-sre-triggers (last updated 2026-10-24)