agentsclimarketplace

Automate

Skill arbazkhan971/godmode/skills/automate

Task automation. cron jobs, webhooks, GitHub Actions, Makefile, Taskfile, scripts, CI/CD, scheduled tasks.From its SKILL.md

Install
npx -y skills add arbazkhan971/godmode --skill automate

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

6.2 KB, as published. Nobody here has run it

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

TypeBest ForTool
Cron/ScheduleNightly builds, cleanup, reportscrontab, k8s CronJob, GH Actions schedule
Event/WebhookDeploy on push, notificationsGitHub Actions on:, webhooks
Task RunnerBuild, test, lint, dev setupMake, Task, Justfile, npm scripts
ScriptData processing, migrationBash, Python, Node.js
CI/CDTest on PR, deploy on mergeGitHub 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.

# 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 Actions

Pin action versions (@v4). Set permissions. Set timeout. Release automation, PR automation, scheduled tasks.

Step 6: Makefile/Taskfile

Targets: help, setup, dev, lint, format, typecheck, test, build, deploy-staging, deploy-production (with confirmation), clean, ci-lint, ci-test, ci-build.

Step 7: Script Template

Every script: set -euo pipefail, logging, --help, --dry-run, --verbose, prerequisites check, main function.

Step 8: Report

AUTOMATION REPORT:
Task: <description> | Type: <cron | webhook | workflow | script>
Trigger: <schedule | event | manual> | Error handling: <present>
# Validate Makefile and list targets
make -n ci-test
crontab -l
bash -n scripts/*.sh
# Validate automation scripts and Makefile targets
make -n ci-test
crontab -l
bash -n scripts/*.sh
# Validate automation scripts
crontab -l
git status
make -n test

Key Behaviors

  1. Detect before generating. Add to existing Makefile, don't create competing files.
  2. Error handling is mandatory. Log, notify, exit non-zero.
  3. Lock files prevent overlap. No concurrent duplicate execution.
  4. Idempotency required. Safe to run twice.
  5. Dry-run for destructive ops. --dry-run is non-negotiable.
  6. Secrets injected, never hardcoded.
  7. Logging required. Start, actions, completion.
  8. Timeouts prevent runaway jobs.

Flags & Options

FlagDescription
(none)Interactive workflow
--cron <expr>Scheduled job
--webhook <event>Webhook handler
--workflow <name>GitHub Actions workflow
--script <name>Standalone script
--makefileGenerate/update Makefile
--hook <git-hook>Git hook
--auditAudit existing automation

HARD RULES

Never ask to continue. Loop autonomously until all automation artifacts pass dry-run and have error handling.

  1. NEVER automate without error handling.
  2. NEVER hardcode secrets.
  3. EVERY scheduled job MUST have a lock file.
  4. EVERY script MUST support --dry-run.
  5. EVERY task MUST log start/actions/completion.
  6. EVERY CI workflow MUST have a timeout.
  7. EVERY scheduled GH Actions MUST have workflow_dispatch.
  8. NEVER duplicate existing automation.
  9. NEVER schedule at midnight UTC.

Output Format

AUTOMATION RESULT:
Type: <cron | webhook | workflow | script> | Trigger: <schedule | event | manual>
Error handling: present | Dry-run: supported | Timeout: set

Auto-Detection

1. ls Makefile Taskfile.yml justfile Rakefile build.gradle
2. ls .github/workflows/*.yml .gitlab-ci.yml
3. ls package.json pyproject.toml go.mod
4. ls scripts/ bin/ tools/
<!-- tier-3 -->

Platform Fallback

Run sequentially: scripts, then CI workflows, then scheduler configuration.

TSV Logging

Append to .godmode/automate-results.tsv:

timestamp	task	type	trigger	frequency	file	error_handling	timeout	status

One row per automation artifact. Never overwrite previous rows.

Error Recovery

FailureAction
Task runner not detectedCheck for ALL known runners before creating new. If none exist, ask user preference: Make, Task, or npm scripts.
Cron syntax invalidValidate with crontab.guru. Common mistake: */5 means every 5 minutes, not the 5th minute.
GitHub Actions workflow failsCheck runner OS, secrets exist in repo settings, actions versions pinned (@v4 not @latest), timeout set.
Script fails in CI but works locallyCheck PATH, working directory, missing deps in lockfile, env vars not set in CI. Add env dump in debug mode.

Quality Targets

  • Target: <10s for task runner cold start
  • Target: >95% automation success rate over 30 days
  • Webhook response: <5s acknowledgment
  • Cron job max runtime: <80% of schedule interval

Success Criteria

  1. Automation script runs with --dry-run without side effects.
  2. Error handling present: set -euo pipefail (bash) or try/catch with meaningful messages.
  3. Logging captures start time, actions taken, completion status.
  4. Concurrency guard exists for scheduled jobs (lock file or flock).

Keep/Discard Discipline

After EACH automation artifact:
  KEEP if: dry-run passes AND error handling present AND logging captures start/actions/completion
  DISCARD if: no error handling OR secrets hardcoded OR no dry-run support for destructive ops
  On discard: revert. Fix error handling before retrying.

Stop Conditions

STOP when ALL of:
  - Script runs with --dry-run without side effects
  - Error handling present with meaningful messages
  - Logging captures start, actions, and completion
  - Concurrency guard exists for scheduled jobs

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.