Skip to content
Back to skills

Triggers

ASecurity

Manage Nuphos cron and webhook Triggers.

  • 843 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
ai-agentsgobashexpressawsgitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add nuphos/nuphos --skill triggers --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Triggers?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Triggers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nuphos-triggers/badge)](https://www.skillsdirectory.com/skills/nuphos-triggers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: triggers
description: "Manage Nuphos cron and webhook Triggers."
---

# Nuphos Triggers API

Every trigger belongs to one existing conversation (`targetSessionId`), and
each cron or webhook fire is delivered into it. There is no team-wide trigger
list: whoever can read that conversation can see its triggers, and only the
conversation's owner can change them. Triggers are not one-shot
reminders. Use the canonical API through the bundled script; do
not call `trigger_*` bound tools.

```bash
SCRIPT=skills/triggers/scripts/trigger-api.sh
bash "$SCRIPT" "$TEAM" GET "?targetSessionId=$NUPHOS_SESSION_ID"
bash "$SCRIPT" "$TEAM" POST '' @/tmp/trigger.json
bash "$SCRIPT" "$TEAM" PATCH "$TRIGGER" @/tmp/trigger-patch.json
bash "$SCRIPT" "$TEAM" POST "$TRIGGER/test-fire" @/tmp/test-payload.json
```

The script authenticates with the conversation token, formats JSON, and fails
on non-2xx responses. Put request bodies in files.

## Routes

All paths start with `/teams/{teamId}/agent-triggers`.

| Action | Method and suffix |
|---|---|
| List a conversation's triggers | `GET /?targetSessionId={sessionId}` |
| List your own triggers | `GET /` |
| Create | `POST /` |
| Read | `GET /{triggerId}` |
| Update | `PATCH /{triggerId}` |
| Delete | `DELETE /{triggerId}` |
| Test once | `POST /{triggerId}/test-fire` with optional `{ "payload": {...} }` |
| New webhook secret | `POST /{triggerId}/rotate-secret` |

Create body:

```json
{
  "name": "Weekday PR digest",
  "triggerType": "cron",
  "cronExpression": "0 9 * * 1-5",
  "messageTemplate": "Review open PRs and summarize blockers.",
  "targetSessionId": "<sessionId>"
}
```

For a webhook trigger, `triggerType` is `webhook`. Optional fields are
`expiresAt`, `dedupeKey`, and `minIntervalSeconds`. The create response returns
the only copy of `webhookSecret`, the external `webhookUrl`, and
`secretHeader`. Never print or persist the secret in a skill, log, or final
answer.

`minIntervalSeconds` limits how often a webhook Trigger wakes its Task. A
delivery inside the window is not rejected: the endpoint answers `202`
(`{ "ok": true, "held": true, "firesInSeconds": N }`), keeps up to 20 held
deliveries, and when the window ends fires once. A single held delivery reaches
the template as `payload`; several arrive as
`payload = { coalesced: N, deliveries: [...] }`, oldest first. Without a queue
to fire from, the endpoint answers `429` with `Retry-After`.

PATCH accepts `name`, `messageTemplate`, `enabled`, `cronExpression`,
`timeZone`, `minIntervalSeconds` and `expiresAt`. A new `expiresAt` must be a
future ISO timestamp; `null` removes the expiry. A Trigger the hourly sweep
already turned off stays off until you also send `{ "enabled": true }`.

A webhook trigger can also carry `payloadFilters`, so deliveries you do not care
about start no turn. Each rule is `{ "path": "action", "in": [...] }` and/or
`"notIn": [...]`; `path` is a dot path into the JSON payload and values are
compared as exact strings. A delivery fires only if every rule holds, otherwise
the endpoint answers `200 {"ok":true,"skipped":true,"reason":"filtered"}`. A
missing field fails `in` and passes `notIn`. `PATCH` with `[]` removes the rules.
For GitHub pull requests, `{ "path": "action", "in": ["opened", "synchronize",
"ready_for_review", "review_requested"] }` skips labeled, edited and closed.

`targetSessionId` is required on every create. It names the Task the trigger
belongs to, for good:

- The Task must be in the same team and owned by you. The trigger runs as the
  Task's owner, and only that owner can change or delete it.
- If the Task is mid-turn, the fire queues and runs when that turn ends.
  Archiving a Task deletes its Triggers. A fire that still reaches an archived
  Task is refused and its Trigger is paused; it stays paused after a restore.
- The session id is the last segment of its `/agent/<sessionId>` link; for the
  current conversation use `$NUPHOS_SESSION_ID`.
- A trigger cannot be unbound. To report to Slack, say the exact destination
  in `messageTemplate`; the bound conversation posts with `slack_post`.

A trigger cannot move to another Task: create a new one there and delete the
old one.

## Webhook senders

A webhook trigger is a plain URL plus secret. Whatever calls it (a Grafana
contact point, an SNS subscription, a CI job) is configured and owned in that
provider; Nuphos does not track it, and deleting the trigger leaves it in
place. Point the sender at `webhookUrl` with the secret in the
`X-Webhook-Secret` header, or as `?secret=` on the URL when the sender cannot
set headers. If the secret leaks, `rotate-secret` returns a new `webhookSecret`
with `webhookUrl` and `secretHeader`, shown only in that response. The old secret
is refused with 401 from the next delivery, so update the sender right away.
AWS SNS subscriptions to that URL are confirmed automatically and
CloudWatch alarm notifications arrive normalized. For monitoring alerts, load
`monitoring-workflow` for wiring and rollback rules.

## Safety and lifecycle

- List your own triggers first and avoid near-duplicates. If similar recurring work exists,
  ask whether to update it or create a separate trigger.
- Cron expressions are always evaluated in UTC: convert the user's local time
  to UTC when writing one, confirm both the UTC and local time before creating,
  and restate `nextRuns` (UTC instants) in their timezone after creation.
- A conversation fired by a trigger must not create another trigger.
- Confirm before DELETE; prefer PATCH `{ "enabled": false }` when reversible.
  When removing a webhook trigger, also remove or detach its sender in the
  provider if the user wants that; Nuphos does not do it.
- `test-fire` only proves the message was queued for the bound conversation,
  not that the run completed successfully.
- Only the owner of the trigger's Task can update, delete, test-fire it or rotate its secret.
  Creating one needs a team role above viewer.

Files in this skill

  • SKILL.md4 KB
  • scripts/trigger-api.sh535 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.