skills/cicd/SKILL.md
GitHub Actions CI guidance for validation gates, workflow permissions, matrices, caching, path filters, artifacts, and workflow verification. Load when designing, reviewing, or troubleshooting GitHub CI.
npx skillsauth add oornnery/.agents cicdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for GitHub Actions CI only.
Local skill: PR/push valid, required checks, workflow safety, caching, matrices, artifacts, workflow verification. Not for GitLab CI, Jenkins, ArgoCD, or deployment topology.
Use this skill for:
actionlint, act, and GitHub toolingPair with:
python when CI is mainly uv, ruff, ty, rumdl, and pytestquality when deciding test depth or verification gates that block mergessecurity when hardening secrets, provenance, or supply-chain controlsOut of scope:
assets/project/.github/workflows/ci.yml -- repo-shaped GitHub Actions CI
workflow aligned with local Python toolchainassets/project/pyproject.toml -- matching project config used by CI workflowassets/project/src/myapp/main.py -- tiny Python entrypoint giving CI
something real to lint and testassets/project/tests/test_main.py -- matching test module for example projectpull_request, push, or bothpermissionsDefault CI triggers:
on:
pull_request:
push:
branches: [main, dev]
Rules:
pull_request for merge-gating checkspush for protected branches that must stay greenworkflow_dispatch only for manual CI workflows needing operator inputFor noisy repos, add concurrency control:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Always declare explicit permissions at workflow level; widen per job only when required.
permissions:
contents: read
Job-scoped widening examples:
security-events: write for SARIF upload jobsid-token: write for OIDC-backed verification or cloud-authenticated jobspull-requests: write only when workflow must comment on PRsAvoid:
Matches repo's current Python stack and local CI template.
name: CI
on:
pull_request:
push:
branches: [main, dev]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: uv sync --frozen
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uvx rumdl check .
- run: uv run ty check
- run: uv run pytest -v
Use templates/ci/github/ci.yml as repo-aligned starting point when scaffolding new workflow.
Preferred order for Python repos:
Rules:
continue-on-errorIndependent checks should run in parallel:
jobs:
lint:
runs-on: ubuntu-latest
typecheck:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-latest
build:
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
Use one combined validate job when:
Split jobs when:
Use matrix only when compatibility is part of contract.
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- run: uv sync --frozen
- run: uv run pytest -v
Rules:
fail-fast: false only when collecting full compatibility data is valuablePath filters reduce wasted CI in monorepos or split repos.
Simple trigger filtering:
on:
pull_request:
paths:
- "src/**"
- "tests/**"
- "pyproject.toml"
- "uv.lock"
Conditional job execution is better when different areas need different jobs.
Use path filters when:
Cache only what materially improves CI time and stays reproducible.
Good candidates:
.pytest_cache only when proven helpfulRules:
Upload only what later jobs or humans need.
Good artifacts:
Rules:
pull_request jobs from forksExamples:
contents: read onlysecurity-events: writeid-token: write only to that jobValidate workflow itself before relying on it.
actionlint
act -n
gh workflow run ci.yml
gh run list --workflow ci.yml
Verification loop:
actionlintact when workflow is compatiblepermissionscontinue-on-error on required gatespull_request and protected branch pushpermissionsuv sync --frozenactionlintdevelopment
--- name: verification description: Discover and run project validation gates: format, lint, typecheck, LSP diagnostics, tests, build, static security checks, dependency audits, and RTK output handling. Use before claiming work is complete, when fixing broken checks, or when setting up a validation plan. --- # Verification Use this skill to prove changes with the strongest practical checks the repo already supports. ## Discovery Order 1. Read task aliases: `package.json`, `pyproject.toml`, `
tools
Build, review, or validate standalone Python scripts run with uv inline metadata. Use for one-file automation, operational scripts, script dependencies, shebangs, idempotency, safety, representative runs, and promoting scripts to packages.
development
Build, review, or validate Python packages and libraries where public API stability, packaging metadata, imports, examples, changelogs, build output, and compatibility matter.
tools
Build, review, or validate Python command-line applications and terminal tools. Use for argparse, Typer, Rich, Textual-adjacent CLI UX, stdout/stderr contracts, exit codes, automation-friendly flags, help output, and CLI tests.