GitHub Actions Scaffolder
You are scaffolding a traditional GitHub Actions YAML workflow — deterministic CI/CD automation with no AI at runtime. This is different from agentic workflows.
When to Use This Skill vs Others
| Task |
Use This Skill |
Use create-agentic-workflow |
| Run tests on every PR |
✅ |
❌ |
| Build and publish a Docker image |
✅ |
❌ |
| Deploy to GitHub Pages |
✅ |
❌ |
| Check if PR matches the spec |
❌ |
✅ |
| Daily repo health report |
❌ |
✅ |
| Code review with AI judgment |
❌ |
✅ |
Execution Steps
1. Gather Requirements
Ask the user for the following context:
Workflow Category: What does this workflow need to do?
- Test — run unit/integration tests on PR/push (pytest, jest, go test, etc.)
- Build — compile, bundle, or build Docker images
- Lint — run linters or formatters (ruff, eslint, markdownlint, etc.)
- Deploy — publish to GitHub Pages, Vercel, AWS, etc.
- Release — create GitHub releases, publish npm/PyPI packages
- Security — dependency audits, SAST, secret scanning (CodeQL, trivy, etc.)
- Maintenance — scheduled jobs, stale issue cleanup, dependency updates
- Custom — describe the steps manually
Platform/Language: What stack? (Python, Node.js, Go, Docker, .NET, etc.)
Trigger Events: When should this fire?
pull_request — on PR open/update (most quality gates)
push to main — on merge to main (post-merge validation, deploys)
workflow_dispatch — manual run
schedule — cron schedule (maintenance jobs)
release — on GitHub Release published
2. Generate the Workflow
Run the scaffold script:
python ./scripts/scaffold_github_action.py \
--skill-dir <path-to-skill-directory> \
--category <test|build|lint|deploy|release|security|maintenance|custom> \
--platform <python|nodejs|go|docker|dotnet|generic> \
[--triggers pull_request push schedule workflow_dispatch] \
[--name "My Workflow Name"] \
[--branch main]
The script outputs a ready-to-use .yml file in .github/workflows/.
3. Post-Scaffold Guidance
After generating, advise the user:
- Platform-specific secrets: Some steps require repository secrets (e.g.,
PYPI_TOKEN, NPM_TOKEN, DOCKER_PASSWORD, DEPLOY_KEY).
- Pinned action versions: All generated steps use pinned
@v4/@v3 action refs for security.
- Permissions: Generated workflows declare minimal permissions (
contents: read by default, elevated only when needed).
- Review before committing: Treat workflow YAML as code — review it before merging.
GitHub Actions Key Reference
Available Trigger Events
| Trigger |
Fires when |
Common for |
pull_request |
PR opened/updated |
Tests, lint, security |
push |
Branch pushed |
Deploy, release checks |
schedule (cron) |
On a time schedule |
Maintenance, reports |
workflow_dispatch |
Manual button click |
Deploys, one-off jobs |
release |
Release published |
Package publishing |
issues |
Issue opened/labeled |
Triage, notifications |
workflow_call |
Called by another workflow |
Reusable sub-workflows |
Permissions Model
permissions:
contents: read # Read repo files
contents: write # Commit files, push
pull-requests: write # Comment on PRs
issues: write # Create/update issues
packages: write # Publish packages
id-token: write # OIDC (for cloud deploys)
Always declare minimum required permissions. The GITHUB_TOKEN grants no permissions by default unless declared.
Common Action Patterns
# Checkout
- uses: actions/checkout@v4
# Setup language
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# Cache dependencies
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
# Upload artifacts
- uses: actions/upload-artifact@v4
with:
name: report
path: output/
# Publish GitHub Release
- uses: softprops/action-gh-release@v2
with:
files: dist/*
Next Actions
- Offer to run
audit-plugin to validate the generated artifacts.
1---2name: create-github-action-23description: Scaffold a traditional deterministic GitHub Actions CI/CD workflow. Use this when creating build, test, deploy, lint, release, or security scan pipelines. This is distinct from agentic workflows — no AI is involved at runtime.4---5# GitHub Actions Scaffolder67You are scaffolding a **traditional GitHub Actions YAML workflow** — deterministic CI/CD automation with no AI at runtime. This is different from agentic workflows.89## When to Use This Skill vs Others1011| Task | Use This Skill | Use `create-agentic-workflow` |12|---|---|---|13| Run tests on every PR | ✅ | ❌ |14| Build and publish a Docker image | ✅ | ❌ |15| Deploy to GitHub Pages | ✅ | ❌ |16| Check if PR matches the spec | ❌ | ✅ |17| Daily repo health report | ❌ | ✅ |18| Code review with AI judgment | ❌ | ✅ |1920## Execution Steps2122### 1. Gather Requirements2324Ask the user for the following context:25261. **Workflow Category**: What does this workflow need to do?27 - **Test** — run unit/integration tests on PR/push (pytest, jest, go test, etc.)28 - **Build** — compile, bundle, or build Docker images29 - **Lint** — run linters or formatters (ruff, eslint, markdownlint, etc.)30 - **Deploy** — publish to GitHub Pages, Vercel, AWS, etc.31 - **Release** — create GitHub releases, publish npm/PyPI packages32 - **Security** — dependency audits, SAST, secret scanning (CodeQL, trivy, etc.)33 - **Maintenance** — scheduled jobs, stale issue cleanup, dependency updates34 - **Custom** — describe the steps manually35362. **Platform/Language**: What stack? (Python, Node.js, Go, Docker, .NET, etc.)37383. **Trigger Events**: When should this fire?39 - `pull_request` — on PR open/update (most quality gates)40 - `push` to main — on merge to main (post-merge validation, deploys)41 - `workflow_dispatch` — manual run42 - `schedule` — cron schedule (maintenance jobs)43 - `release` — on GitHub Release published4445### 2. Generate the Workflow4647Run the scaffold script:4849```bash50python ./scripts/scaffold_github_action.py \51 --skill-dir <path-to-skill-directory> \52 --category <test|build|lint|deploy|release|security|maintenance|custom> \53 --platform <python|nodejs|go|docker|dotnet|generic> \54 [--triggers pull_request push schedule workflow_dispatch] \55 [--name "My Workflow Name"] \56 [--branch main]57```5859The script outputs a ready-to-use `.yml` file in `.github/workflows/`.6061### 3. Post-Scaffold Guidance6263After generating, advise the user:6465- **Platform-specific secrets**: Some steps require repository secrets (e.g., `PYPI_TOKEN`, `NPM_TOKEN`, `DOCKER_PASSWORD`, `DEPLOY_KEY`).66- **Pinned action versions**: All generated steps use pinned `@v4`/`@v3` action refs for security.67- **Permissions**: Generated workflows declare minimal permissions (`contents: read` by default, elevated only when needed).68- **Review before committing**: Treat workflow YAML as code — review it before merging.6970## GitHub Actions Key Reference7172### Available Trigger Events7374| Trigger | Fires when | Common for |75|---|---|---|76| `pull_request` | PR opened/updated | Tests, lint, security |77| `push` | Branch pushed | Deploy, release checks |78| `schedule` (cron) | On a time schedule | Maintenance, reports |79| `workflow_dispatch` | Manual button click | Deploys, one-off jobs |80| `release` | Release published | Package publishing |81| `issues` | Issue opened/labeled | Triage, notifications |82| `workflow_call` | Called by another workflow | Reusable sub-workflows |8384### Permissions Model8586```yaml87permissions:88 contents: read # Read repo files89 contents: write # Commit files, push90 pull-requests: write # Comment on PRs91 issues: write # Create/update issues92 packages: write # Publish packages93 id-token: write # OIDC (for cloud deploys)94```9596> Always declare minimum required permissions. The `GITHUB_TOKEN` grants no permissions by default unless declared.9798### Common Action Patterns99100```yaml101# Checkout102- uses: actions/checkout@v4103104# Setup language105- uses: actions/setup-python@v5106 with:107 python-version: "3.12"108109# Cache dependencies110- uses: actions/cache@v4111 with:112 path: ~/.cache/pip113 key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}114115# Upload artifacts116- uses: actions/upload-artifact@v4117 with:118 name: report119 path: output/120121# Publish GitHub Release122- uses: softprops/action-gh-release@v2123 with:124 files: dist/*125```126127128## Next Actions129- Offer to run `audit-plugin` to validate the generated artifacts.