skills/automation-triggers/SKILL.md
Use this skill when designing, reviewing, or validating event triggers, schedule triggers, automation jobs, CI/CD pipeline triggers, deployment workflows, and their edge cases.
npx skillsauth add chatandbuild/skills-repo Automation TriggersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Specify dependable trigger logic for automation and release workflows.
Enumerate trigger sources: List all event types (push, pull_request, tag, schedule, workflow_dispatch, repository_dispatch, webhook), target branches, and which workflows or jobs each triggers. Map external systems (Slack, Jira, deploy tools) that emit webhooks or API calls.
Define conditions explicitly: Use branch filters (branches, branches-ignore), path filters (paths, paths-ignore) to narrow when jobs run. For tag-based releases, use tags: ['v*'] or tags: ['release-*'] with explicit patterns. For cron, specify timezone (schedule: cron('0 9 * * 1-5', 'America/New_York')) to avoid drift. For manual runs, use workflow_dispatch with optional inputs; for cross-repo or API-triggered runs, use repository_dispatch with event types.
Add safety checks: Use concurrency groups (concurrency: group: deploy-${{ github.ref }}, cancel-in-progress: false) to prevent duplicate deploys. Require manual approval for production via environment: production with protection rules. Add idempotency keys for webhook-triggered jobs. Configure retry limits and backoff for flaky triggers.
Test representative scenarios: Run workflows for push to feature branch, PR open/update, merge to main, tag push, cron fire, and manual dispatch. Verify path filters exclude irrelevant changes. Simulate webhook retries and ensure idempotency.
Document ownership: Record who owns each trigger, how to change it, and what downstream systems depend on it. Include runbook links for troubleshooting.
Missing concurrency controls: Without concurrency, multiple pushes or rapid webhook retries can start duplicate deploy jobs. Use concurrency: group: <unique-key> and decide whether to cancel in-progress or queue.
Overly broad path triggers: paths: ['**'] or omitting path filters causes every push to run expensive jobs. Restrict to relevant dirs (e.g., paths: ['app/', 'lib/']) so docs-only or config changes skip builds.
Cron drift: Cron runs in UTC by default; specify timezone to match team hours. Avoid overlapping schedules that can double-run jobs. Use schedule with workflow_dispatch so cron can be tested manually.
Webhook retry storms: External systems often retry failed webhooks. Without idempotency keys or deduplication, each retry starts a new run. Use X-Request-Id or payload hash to dedupe; respond 200 quickly and process async.
GitHub Actions:
on:
push:
branches: [main]
paths: ['src/**', 'package.json']
pull_request:
branches: [main]
paths-ignore: ['docs/**', '*.md']
schedule:
- cron: '0 9 * * 1-5'
workflow_dispatch:
inputs:
env: { type: choice, options: [staging, prod], default: staging }
repository_dispatch:
types: [deploy-request]
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: false
GitLab CI:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+/
- when: manual
only:
changes: [src/**/*, package.json]
except:
changes: [docs/**]
Generic webhook (e.g., Jenkins, CircleCI): Use a single endpoint with X-Event-Type or X-Signature for validation. Parse payload to determine job; include idempotency_key in body. Return 200 within 5s to avoid retries; process asynchronously.
## Trigger Matrix
| Event | Condition | Workflow/Job | Environment |
|-------|-----------|--------------|-------------|
| push | main, paths: src/ | build-and-deploy | production |
| pull_request | main | test | - |
| schedule | cron 0 9 * * 1-5 | weekly-report | - |
| workflow_dispatch | manual | deploy | staging |
| repository_dispatch | type: deploy-request | deploy | production |
## Safety Controls
- Concurrency: group by ref/env; cancel-in-progress: false for deploys
- Approval gates: production requires manual approval
- Retry policy: webhook endpoint returns 200 immediately; 3 retries with exponential backoff for failed jobs
## Validation Checklist
- [ ] No duplicate runs for same event (concurrency tested)
- [ ] Protected branches require approvals
- [ ] Production trigger path is explicit (no wildcard to prod)
- [ ] Path filters verified with docs-only and code-only pushes
- [ ] Cron timezone and schedule documented
- [ ] Webhook idempotency and retry behavior defined
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
development
Use this skill when turning messy workout information into clear logs, comparing user-provided sessions, surfacing trends or likely PRs, and suggesting realistic next-session steps.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.