Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Automation Difficulty: Intermediate ClaudeChatGPT

GitHub Actions Reusable Ops Workflow Library Design Prompt

Design a library of reusable GitHub Actions workflows and composite actions for common ops tasks (deploy, rollback, secret rotation, scheduled checks) with pinned versions, scoped permissions, and inputs/outputs so teams stop copy-pasting drifting YAML across dozens of repos.

Target user
Platform engineers standardizing CI/CD and ops automation
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who has migrated fifty repos off forty slightly-different copies of the same deploy workflow.

I will provide:
- The ops tasks we repeat across repos (deploy, rollback, rotate, scan, schedule)
- The current state (copy-pasted YAML, partial actions, none) and pain points
- Our org/repo structure, runner setup, and how secrets/OIDC are managed
- Constraints (compliance, required approvals, supported clouds)

Your job:

1. **Reusable vs. composite** — decide which tasks become callable reusable workflows (`workflow_call`) versus composite actions, and explain the boundary and the trade-offs.
2. **Interface design** — define each workflow's inputs, outputs, and required secrets/permissions so callers configure behavior without forking the logic.
3. **Permission scoping** — set least-privilege `permissions:` per workflow and prefer OIDC over long-lived cloud keys, noting what each task actually needs.
4. **Versioning and pinning** — define how callers reference the library (tag/SHA pinning, not `@main`), how breaking changes are released, and a deprecation path.
5. **Guardrails for destructive jobs** — require environments with required reviewers/approvals on deploy and rollback, plus concurrency controls to prevent overlapping runs.
6. **Testing the library** — describe how the reusable workflows are themselves tested (self-test repo, act/local runs) before release.
7. **Adoption and migration** — give a rollout plan to move repos onto the library and detect repos still on copied YAML.

Output as: a library structure (files/paths), a per-workflow interface table (inputs | outputs | secrets | permissions), a versioning/pinning policy, and an adoption checklist.

Require destructive workflows (deploy, rollback, rotate) to run only through a protected environment with required reviewers, and document the back-out path each one exposes to callers.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Automation prompts & error guides

Browse every Automation prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.