一键导入
automation-helper
Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow.
菜单
Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow.
Generate a mock API server from OpenAPI specs, TypeScript interfaces, or endpoint descriptions for frontend development and testing. Use when the user asks to create a mock server, fake API, or stub endpoints.
Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships.
Generate typed error classes, error handling middleware, and HTTP error mapping following project conventions. Use when the user asks to set up error handling, create error classes, or implement error middleware.
Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating.
Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration.
Generate OpenSearch Dashboards (Kibana) saved objects — index patterns, visualizations, and dashboards as JSON. Use when the user asks to create dashboards, charts, or visualizations for OpenSearch/Elasticsearch/Kibana.
| name | automation-helper |
| description | Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow. |
Design and implement automation workflows for repetitive development tasks using shell scripts, Cursor hooks, GitHub Actions, or task runners.
When the user asks to automate a process, create a shell script, set up a GitHub Action, add a Cursor hook, or streamline a repetitive workflow.
| Type | Tool | Best For |
|---|---|---|
| Pre-commit check | Cursor hook / husky | Lint, format, type-check before commit |
| CI pipeline step | GitHub Actions / GitLab CI | Build, test, deploy on push/PR |
| Local task | Shell script / Makefile | Dev environment setup, data seeding |
| Scheduled job | Cron / CloudWatch Events | Report generation, cleanup, backups |
| IDE automation | Cursor hook | Auto-format, auto-test, notifications |
| Workflow orchestration | GitHub Actions / scripts | Multi-step release, dependency updates |
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"; }
error() { log "ERROR: $*" >&2; exit 1; }
# Validate prerequisites
command -v node >/dev/null 2>&1 || error "node is required"
log "Starting [task name]..."
# Step 1: [description]
log "Step 1: [description]"
# implementation here
# Step 2: [description]
log "Step 2: [description]"
# implementation here
log "Done."
name: [Workflow Name]
on:
[trigger]:
branches: [main]
paths:
- 'src/**'
jobs:
[job-name]:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: [command]
.cursor/hooks/)#!/usr/bin/env bash
set -euo pipefail
# Hook: [name]
# Trigger: [when this runs]
# Purpose: [what it does]
[implementation]
.PHONY: [target]
[target]: ## [description]
@echo "Running [target]..."
[command]
set -euo pipefail in all bash scriptscleanup() {
local exit_code=$?
if [ $exit_code -ne 0 ]; then
log "Script failed with exit code $exit_code"
# cleanup actions here
fi
}
trap cleanup EXIT
.cursor/hooks.json.github/workflows/ or .gitlab-ci.ymlMakefile or package.json scriptsset -euo pipefail in bash scriptsrm -rf / or other dangerous commands without safeguards--dry-run option for destructive operations#!/usr/bin/env bash over #!/bin/bash for portability| Automation | Implementation |
|---|---|
| Pre-commit lint + type-check | Cursor hook or husky |
| Auto-generate changelog | Shell script on release branch |
| Dependency update check | GitHub Actions scheduled weekly |
| Database backup | Cron job with rotation |
| Dev environment setup | make setup or scripts/setup.sh |
| Release tagging | Shell script + GitHub Actions |
| Stale branch cleanup | GitHub Actions scheduled monthly |
Working automation with error handling, documentation, and trigger wired up. Tested manually at minimum.
chmod +x on scripts and IAM/role permissions for CI