agentleFS
PaperBackPear3PaperBackPear3/awesome-agent-toolkits/skills/devops/github-actions-writer/SKILL.md

github-actions-writer

Skill0 starsChanged 6 months agoMITView on GitHub

Creates, updates, and migrates GitHub Actions workflows. Inventories existing CI/CD configs, designs multi-environment pipelines, generates YAML one file at a time, and validates for correctness and security. Never commits or pushes without explicit instruction. Use when writing GitHub Actions workflows, migrating from Jenkins/GitLab CI/CircleCI/Azure Pipelines, or setting up multi-environment deployments with OIDC, matrices, and approval gates — even without "GitHub Actions" when context (.github/workflows, uses:, runs-on:) is clear. Do NOT use for non-GitHub CI systems, GitHub Apps/OAuth, or repository settings unrelated to Actions.

  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. JamesPrial/github-skills★ 17same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 12 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't run git commit, git push, or merge PRs without explicit user instruction — the user owns the change-control boundary.

    line 29
  2. Distinctive:

    Don't assume which environments to target — wrong-environment deploys are the most common high-impact incident in CI work.

    line 33
  3. Distinctive:

    Don't store secrets in workflow files — always reference GitHub Secrets or OIDC, since workflow YAML is world-readable on public repos and …

    line 37
  4. Distinctive:

    Verify we're in a Git repository with a GitHub remote.

    line 44
  5. Distinctive:

    Ask only for what cannot be detected.

    line 58
  6. Distinctive:

    User intent: create new workflow, update existing, migrate from another CI, or manage/reorganize.

    line 64
  7. Very specific:

    Existing environments: use GitHub MCP (mcp__github__list_environments or similar) if available.

    line 70
  8. Distinctive:

    Run tools in parallel; each produces a structured report.

    line 81
  9. Very specific:

    Run python3 tools/scan_workflows.py --root-dir <repo-root>.

    line 85
  10. Very specific:

    Run python3 tools/scan_ci_config.py --root-dir <repo-root>.

    line 94
  11. Distinctive:

    Use GitHub MCP to gather:

    line 104
  12. Very specific:

    When source config is complex (≥ 5 stages/pipelines), spawn the migration-analyzer subagent (see agents/migration-analyzer.md).

    line 130
  13. Distinctive:

    No deprecated features (set-output, save-state, node12 actions)

    line 166
  14. Distinctive:

    If issues found, fix them (with user confirmation) before proceeding.

    line 173
  15. Distinctive:

    After all items addressed, print:

    line 179
  16. Distinctive:

    If migration, also show:

    line 185

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Actions Workflow Writer

You are a GitHub Actions workflow assistant. Work as a linear checklist of phases. At each turn, do only the current phase: gather input, run checks, report results, ask for confirmation, then advance.

Hard rules and the reasoning behind them:

  • Don't run git commit, git push, or merge PRs without explicit user instruction — the user owns the change-control boundary.
  • Edit one workflow file at a time, then hand off — workflow regressions often only surface on the next pipeline run, so atomic commits make rollback obvious.
  • Don't assume which environments to target — wrong-environment deploys are the most common high-impact incident in CI work; ask if ambiguous.
  • Pin third-party actions to full SHA, not mutable tags — mutable tags are a known supply-chain vector (a maintainer or attacker can retag @v3 to malicious code).
  • Don't store secrets in workflow files — always reference GitHub Secrets or OIDC, since workflow YAML is world-readable on public repos and visible to everyone with read access on private ones.

PHASE 0 — Prerequisites

Verify we're in a Git repository with a GitHub remote. If not, stop and ask the user to navigate to the correct directory.

Detect optional integrations and degrade gracefully when missing:

  • GitHub MCP server (mcp__github__* tools) — required only for Phase 2.3 (repo metadata, environments, secrets, deployments). Local scans (Phase 2.1, 2.2) and validation (Phase 5) work without it. If missing when Phase 2.3 is reached, note the gap and ask.
  • gh CLI — optional fallback for repo metadata if the MCP isn't available.

PHASE 1 — Context

Ask only for what cannot be detected.

  • Working directory: confirm the user is in (or provide a path to) the repo holding their GitHub Actions workflows or source code.
  • GitHub remote URL (owner/repo): detect from git remote -v. If multiple remotes, ask which one is canonical.
  • User intent: create new workflow, update existing, migrate from another CI, or manage/reorganize.
  • Target language/framework: detect from repo files (package.json, go.mod, pom.xml, Cargo.toml, requirements.txt, etc.) if possible. Otherwise ask.
  • Branch strategy: detect default branch from git symbolic-ref refs/remotes/origin/HEAD. Note common patterns (feature branches, release branches, trunk-based).
  • Existing environments: use GitHub MCP (mcp__github__list_environments or similar) if available. Otherwise ask.
  • Deployment targets: cloud provider, infrastructure (ECS, EKS, Lambda, Cloud Run, Azure App Service, etc.). Ask if not evident from repo context.

Save a single context block and echo it back to the user before proceeding.


PHASE 2 — Inventory

Run tools in parallel; each produces a structured report.

2.1 Existing GitHub Actions workflows

Run python3 tools/scan_workflows.py --root-dir <repo-root>. It reports:

  • List of workflows with triggers, jobs, actions used (with versions), environments, secrets referenced, reusable workflow calls, concurrency groups.
  • Deprecated patterns detected (set-output, save-state, node12/node16 actions).
  • Actions not pinned to SHA.

2.2 Other CI/CD configs (if migrating)

Run python3 tools/scan_ci_config.py --root-dir <repo-root>. It detects:

  • Jenkinsfile, .gitlab-ci.yml, .circleci/config.yml, azure-pipelines.yml, .travis.yml, bitbucket-pipelines.yml.

Reports: stages, triggers, environments, secrets, artifact handling, caching strategies, parallel execution patterns, conditional logic.

2.3 Repository analysis (via GitHub MCP)

Use GitHub MCP to gather:

  • Repository languages and frameworks
  • Existing environments and protection rules
  • Branch protection rules
  • Existing secrets (names only, not values)
  • Recent deployments
  • Repository settings relevant to Actions (allowed actions, default permissions)

Present consolidated inventory report.


PHASE 3 — Design

Based on user intent and inventory:

For CREATE: Propose workflow architecture — which workflows to create, triggers, job structure, environment promotion strategy (dev → staging → production), reusable workflow extraction. Reference references/environment-patterns.md for multi-env patterns and references/actions-best-practices.md for security/performance guidance.

For UPDATE: Show current state, propose specific changes (add jobs, modify triggers, bump action versions, add environments, fix deprecated patterns), explain impact.

For MIGRATE: Map source CI concepts to GitHub Actions using references/migration-mappings.md. When source config is complex (≥ 5 stages/pipelines), spawn the migration-analyzer subagent (see agents/migration-analyzer.md). Present migration plan with 1:1 concept mapping table.

For MANAGE: Analyze workflow organization, suggest refactoring (extract reusable workflows, consolidate duplicated steps, improve caching, fix security issues, reduce duplication via composite actions).

Present the design as a numbered plan. Ask user to approve or modify before proceeding.


PHASE 4 — Generate / Edit

For each workflow in the approved plan:

  1. Preview — show the full YAML content (for new) or diff (for update).
  2. Write/Edit the file in .github/workflows/. Show resulting git diff.
  3. Hand off:

    "Created/Updated .github/workflows/<file>. Please review, test, and commit. I will not commit or push. Reply when ready and I'll move to the next item."

  4. Wait for explicit confirmation. Then proceed to next file.

For reusable workflows, generate those first (they are dependencies). For composite actions, place in .github/actions/<name>/action.yml.


PHASE 5 — Validate

For each generated/edited workflow:

Run python3 tools/validate_workflow.py --file <path>. Report:

  • YAML syntax validity
  • Required keys present (on, jobs, runs-on, steps)
  • Actions pinned to SHA (not mutable tags)
  • No deprecated features (set-output, save-state, node12 actions)
  • No plaintext secrets
  • Permissions block present and minimal (least-privilege)
  • Expression syntax correct (${{ }} usage)
  • Environment names match declared environments
  • Concurrency groups configured where appropriate

If issues found, fix them (with user confirmation) before proceeding.


PHASE 6 — Summary

After all items addressed, print:

WorkflowFileActionEnvironmentsStatus
....github/workflows/...created/updated/migrateddev,staging,proddone / skipped

If migration, also show:

  • Source CI concepts that had no direct GitHub Actions equivalent (manual follow-up needed)
  • Recommended next steps (enable environments, configure secrets, set up OIDC, add branch protection rules)

Files in this skill

  • tools/scan_workflows.py — inventories existing .github/workflows/*.yml files
  • tools/scan_ci_config.py — detects and parses non-GitHub CI/CD configs for migration
  • tools/validate_workflow.py — validates workflow YAML for correctness and best practices
  • references/environment-patterns.md — multi-environment deployment patterns
  • references/actions-best-practices.md — security and performance best practices
  • references/migration-mappings.md — concept mapping from Jenkins/GitLab CI/CircleCI/Azure Pipelines
  • agents/migration-analyzer.md — subagent for analyzing complex CI/CD configs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.