Github actions workflow maintenance
Skill Nick2bad4u/codex-skills/skills/github-actions-workflow-maintenance
Personal multi-skill repository for reusable Codex workflows.
npx -y skills add Nick2bad4u/codex-skills --skill github-actions-workflow-maintenanceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Maintains GitHub Actions workflows. Use when creating, reviewing, editing, or hardening .github/workflows YAML, workflow_call callers, CI/CD automation, action pinning, permissions, npm publishing, caching, matrices, actionlint, or review comments.
SKILL.md
7.1 KB, as published. Nobody here has run it
GitHub Actions Workflow Maintenance
Use this skill to create, review, repair, or harden GitHub Actions workflows without turning workflow YAML into a generic CI/CD wish list. Start from the repository's actual commands, local policy, and existing workflow style.
First Pass
- Inspect
.github/workflows/, nestedAGENTS.mdfiles, commit-message instructions, package metadata, lockfiles, tool versions, release scripts, and local validation scripts before editing. - Identify the workflow's job: CI, security scan, dependency maintenance, release, publish, docs deploy, labels/issues, scheduled maintenance, reusable workflow provider, or reusable workflow caller.
- Preserve local policy. Examples: full-SHA pinning, owned shared workflow calls at
@main, required comments beside pinned actions, forced package installs, custom shared configs, or release gates. - Check current docs or action metadata when exact syntax, inputs, permissions, or action versions matter. Do not guess action inputs from memory.
- If reviewing a large workflow set, read
references/review-checklist.mdand use it as the audit frame. - If creating or heavily revising workflows, read
references/github-actions-best-practices.mdfor the compact best-practices checklist.
Create Or Edit Workflows
- Use one workflow per durable responsibility. Split only when triggers, permissions, ownership, or failure recovery differ.
- Choose triggers intentionally:
- Use
pull_requestfor untrusted PR validation. - Use
pushfor branch or tag workflows. - Use
workflow_dispatchfor manual release or maintenance flows. - Use
scheduleonly for work that remains useful without a code change. - Use
workflow_callfor reusable workflows; define typed inputs, explicit secrets, and documented outputs.
- Use
- Set top-level
permissions: contents: readunless the workflow cannot work with read-only repository access. Add narrower job-level writes where needed. - Add
concurrencyfor deployments, releases, expensive branch CI, and scheduled maintenance. Use a group that includes workflow name plus branch, tag, environment, or package as appropriate. - Keep jobs cohesive: install, lint, typecheck, test, build, package, scan, publish, and deploy should be separate when they have different dependencies, permissions, runners, or retry semantics.
- Prefer repository scripts such as
npm run release:verify,npm run lint:actions,npm test,pytest, ormake ciover duplicating long command sequences in YAML. - Use package-manager-native caches first. For Node projects, prefer
actions/setup-nodecache support when it fits; useactions/cacheonly for custom outputs or unsupported package managers. - Upload artifacts when downstream jobs need the exact built output, test report, coverage report, package tarball, or deployable bundle. Set
retention-dayswhen artifacts are large or sensitive.
Security Rules
- Treat workflow files as privileged code. Check for secret exposure, overbroad permissions, untrusted checkout, command injection, mutable third-party refs, and privileged triggers before style cleanup.
- Avoid
pull_request_targetandworkflow_runfor untrusted code. If a privileged workflow is required, do not check out or execute attacker-controlled PR content in that job. - Pin third-party actions to full commit SHAs when repo policy requires maximum supply-chain hardening. Verify the SHA belongs to the upstream action repository. Tags are acceptable only when local policy allows that risk.
- Prefer OIDC or trusted publishing over long-lived cloud or registry tokens when the target service supports it. For npm publishing, check current npm trusted publishing/provenance docs before changing authentication.
- Use environment protection for production deploys and package publishing when approvals, scoped secrets, or branch restrictions are needed.
- Never echo secrets, serialize entire contexts that contain sensitive fields, or pass secrets to untrusted commands. Mask non-secret sensitive values before logging them.
- For agentic or issue/comment-driven workflows, treat issue bodies, PR text, labels, comments, branch names, and artifact contents as untrusted inputs. Do not feed them into shell commands, prompts, or write-capable agents without validation and permission boundaries.
Reusable Workflows
- Put reusable workflows directly under
.github/workflows/and defineon.workflow_call. - For called workflows, declare every input with a type, every required secret, and every output mapped from a job output.
- For caller workflows, call reusable workflows at the job level with
jobs.<job_id>.uses; do not mixruns-onorstepsinto a reusable workflow caller job. - Keep caller files thin. The caller should provide trigger, permissions, inputs, secrets, and repository-specific policy only.
- If the reusable workflow is in an owner-controlled shared repository, follow the user's policy for refs. Do not replace
@mainwith SHA pins when the user relies on live shared-template updates.
Review Workflow
- Parse the YAML mentally as GitHub will: triggers, permissions, defaults, concurrency, jobs, strategy, needs, environment, outputs, services, steps, and expressions.
- List high-impact findings first: workflows that do not trigger, publish/deploy when they should not, expose secrets, use unsafe privileged triggers, grant broad write permissions, skip release gates, or cannot pass validation.
- Check action inputs against the action's current metadata when an input is new, renamed, or suspicious.
- Check shell snippets for quoting, error handling, OS portability, and untrusted expression interpolation. Prefer passing expressions through
envand quoting shell variables. - Compare workflow commands to local scripts. If CI and local commands differ, determine whether the difference is intentional.
- Confirm required artifacts, job outputs, caches, matrix values, path filters, and branch/tag filters are wired to the actual repo layout.
Validation
- Run the closest local workflow validation first:
npm run lint:actions,actionlint, YAML lint, repo validation, or the repository's aggregate release/CI check. - Run touched package or language gates when workflow edits depend on scripts being present or producing expected artifacts.
- For remote failures, inspect logs and annotations before rerunning. Rerun only after a fix or when evidence supports a transient service failure.
- If a local tool cannot run, explain the missing binary, credentials, network condition, or platform mismatch, then run the next closest non-mutating validation.
Output
For review-only requests, return findings first with file/line, impact, evidence, recommended fix, and validation. For edit requests, finish with files changed, policy choices preserved, commands run, and any remote follow-up needed.