automatelisted
Install: claude install-skill arbazkhan971/godmode
# Automate -- Task Automation & Workflow Orchestration
## Activate When
- User invokes `/godmode:automate`
- User says "automate this", "create a cron job", "set up a webhook"
- User says "write a Makefile", "create GitHub Action", "schedule this task"
- Project lacks automation for common tasks (lint, test, build, deploy)
## Workflow
### Step 1: Discover Context
Detect existing: task runner (Make, Task, Justfile, npm scripts), CI/CD (GitHub Actions, GitLab CI), scheduler
(crontab, k8s CronJob), scripts.
### Step 2: Classify Type
| Type | Best For | Tool |
|--|--|--|
| Cron/Schedule | Nightly builds, cleanup, reports | crontab, k8s CronJob, GH Actions schedule |
| Event/Webhook | Deploy on push, notifications | GitHub Actions on:, webhooks |
| Task Runner | Build, test, lint, dev setup | Make, Task, Justfile, npm scripts |
| Script | Data processing, migration | Bash, Python, Node.js |
| CI/CD | Test on PR, deploy on merge | GitHub Actions, GitLab CI |
### Step 3: Cron Jobs
Format: `minute hour day-of-month month day-of-week`.
Every cron script: `set -euo pipefail`, lock file, logging,
failure notification, cleanup trap.
```bash
# Validate cron syntax and test scripts
crontab -l
bash -n scripts/my-cron.sh
make ci-test
```
IF job runtime > 80% of interval: increase interval or optimize.
WHEN job fails > 3 times consecutively: alert and disable.
### Step 4: Webhooks
Verify signature (HMAC-SHA256). Route by event type. Return 200 within 5 seconds.
### Step 5: GitHub Ac