[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DW1GQ9XMH3KKX65HKKZP7J":3,"skill-same:01M6DW1GQ9XMH3KKX65HKKZP7J":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6DW1GQ9XMH3KKX65HKKZP7J","github-actions-conventions",null,"ACTIVATE when writing, reviewing or debugging a GitHub Actions workflow: jobs, timeouts, concurrency, a scheduled canary, path filters, caching, a red or stuck run. ACTIVATE for '.github\u002Fworkflows', 'timeout-minutes', 'cancel-in-progress', 'on: schedule', 'nightly CI job', 'required check Pending', 'not acquired by Runner'. Covers: one entry step and one size per job, PR-only cancellation, pinned gate vs floating canary, allowlist guards, macOS legs. DO NOT use for: test sizes and where each check runs (see craft:test-suite-design), a canary release to users (see product:delivery), node --test flags (see node-test:node-test-conventions), bash 3.2 script fixes (see mac:mac-platform).","FabienSalles\u002Fclaude-marketplace","FabienSalles","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F937901?v=4","01M6DVJBD31CJKRB382FQFZ5FH","Fabien Salles","01M6DVJBQNY8Q18KJD1ESAD6TX",9,"MIT","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftooling\u002Fskills\u002Fgithub-actions-conventions\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"github actions conventions","github","conventions","actions","github actions","canary","platform","caching","runner","do","filters","only","use","design","ci","debugging","pr","workflows","workflow","writing","2026-11-10 10:12:30",false,"---\nname: github-actions-conventions\ndescription: \"ACTIVATE when writing, reviewing or debugging a GitHub Actions workflow: jobs, timeouts, concurrency, a scheduled canary, path filters, caching, a red or stuck run. ACTIVATE for '.github\u002Fworkflows', 'timeout-minutes', 'cancel-in-progress', 'on: schedule', 'nightly CI job', 'required check Pending', 'not acquired by Runner'. Covers: one entry step and one size per job, PR-only cancellation, pinned gate vs floating canary, allowlist guards, macOS legs. DO NOT use for: test sizes and where each check runs (see craft:test-suite-design), a canary release to users (see product:delivery), node --test flags (see node-test:node-test-conventions), bash 3.2 script fixes (see mac:mac-platform).\"\n---\n\n# GitHub Actions Conventions\n\n> How a test pipeline is wired into GitHub Actions, and how GitHub behaves around it. The suite's own design (the sizes and where each runs, the single entry point, per-check deadlines, what makes a canary worth having) lives in `craft:test-suite-design`; what a test asserts, in `craft:testing-principles`; `node --test` flags, in `node-test:node-test-conventions`; bash 3.2 and BSD fixes, in `mac:mac-platform`; hook suites and their per-platform rows, in `shell-test:shell-test-conventions`. The source of every GitHub behaviour below, and of every number measured on this marketplace's own CI, is listed in `references\u002Fsources.md`.\n\n## 1. Steps\n\n- **A job is its setup steps, then one step that calls the entry point with every group the job covers** (`node scripts\u002Fverify.ts static`; the entry point itself: `craft:test-suite-design` §11). A failed step skips the steps after it, so a second entry step loses its verdict whenever the first one goes red, and a check written straight into a `run:` block is one the local entry never runs, so local and CI verdicts drift.\n- **Call the entry script itself, never through a package manager.** `npm run verify` stays the local shortcut; in CI, a committed `.npmrc` (`script-shell=\u002Fusr\u002Fbin\u002Ftrue`) or a changed `scripts` entry in `package.json` makes `npm run` exit 0 without running the entry, and no workflow guard reads those files (§8).\n- **Let the entry install the dependencies before its first check** (`npm ci`), so a job's setup is only the checkout and the toolchain, and no job can forget the install. An entry that does not install needs an install step in every job, the canary included.\n\n## 2. Jobs\n\n- **One job per size, all running in parallel.** The run lasts as long as its slowest job, and a red job names the size that broke.\n- **Split or shard only the job that sets the run's wall time, and only once its own work dwarfs its setup.** Shortening any other job saves nothing, and every split costs: each job gets a fresh VM and pays checkout, setup and install again; a run fails when one of its jobs never gets a runner; the Free and Pro plans run at most 20 and 40 jobs at once, 5 of them on macOS; and `node --test --test-shard` deals files out by count, not by duration.\n- **Repeat the setup in every job rather than hand a result from one job to another.** An `npm ci` of about 100 packages took at most 3 s per job on this marketplace's CI, while a handed-over result costs an artifact upload, a download and a `needs:` wait that serialises the two jobs. Work that runs twice is removed, not shared (`craft:test-suite-design` §8).\n- **Measure before caching dependencies.** setup-node caches the npm cache, not `node_modules`, and `npm ci` deletes `node_modules` before installing, so a lockfile of about 100 packages gains a few seconds at most. Since setup-node v5, a `packageManager` (or `devEngines.packageManager`) field set to npm turns that cache on by itself; its README advises `package-manager-cache: false` in workflows with elevated privileges.\n\n## 3. Timeouts\n\n- **Every job declares `timeout-minutes`, about 4 to 5 times its longest green run, read from the durations the entry reports.** Left out, it is 360: one hang holds a runner and keeps the pull request pending for six hours. The wide margin keeps a slow runner day green.\n- **The job timeout only backs up each check's own deadline (`craft:test-suite-design` §10): on its own, it cancels the job without naming the check that hung.** `Terminate orphan process` lines at the end of a job log mean a check left processes behind for the runner to kill (`craft:test-suite-design` §7).\n- **No timeout shortens a job that never got a runner.** That failure ends on GitHub's side (§10).\n\n## 4. Concurrency\n\nCancel superseded pull request runs, never a push to main or a scheduled run. It pays off during a runner shortage, when a superseded run's jobs would still hold or wait for scarce runners.\n\n```yaml\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n```\n\n- **Fall back to `github.run_id`.** `github.head_ref` is only defined on pull_request events, so every other run gets a group of its own: each commit on main keeps its verdict, and a push never cancels the nightly.\n- **Never build the group from a value that main or the schedule share** (`${{ github.ref }}` on every event, for instance). Even without `cancel-in-progress`, a pending run is cancelled as soon as a newer one queues in its group.\n\n## 5. Pin the Gate, Float the Canary\n\nWhy a verdict that can change without a diff stays out of the gate: `craft:test-suite-design` §1. In a workflow:\n\n- **Pin the runner image** (`ubuntu-24.04`, `macos-26`), never a `-latest` label. Such a label moves to a new image gradually, over 1 to 2 months (ubuntu-latest to Ubuntu 26.04 from 2026-10-19 to 2026-11-19): jobs of one run can land on two OS versions, and the preinstalled tools change with the image (bash 5.2 to 5.3, ShellCheck 0.9 to 0.11).\n- **Pin every CLI a check or a setup step installs** (`npx skills@1.7.0`, not `npx skills`).\n- **Pin the language version to the exact one developers run, in one file the gate jobs read** (an `.nvmrc` holding `24.16.0`, read with `node-version-file: .nvmrc`). `node-version: '24'` takes the newest 24.x: CI ran 24.21 while the developer's machine ran 24.16, so a feature added in between works in CI and not locally.\n- **Float the same things in the canary** (`ubuntu-latest`, `@latest`, the major version only). A red canary means a floated version broke something: find which one, then move that pin, with any fix it needs, in a pull request of its own; move the image pin before the pinned image is deprecated.\n\n## 6. Scheduled Canary\n\nWhat makes a canary worth having: `craft:test-suite-design` §6. In a workflow:\n\n- **The canary job is the gate's setup on floating versions, plus one entry step naming the canary group, under `if: github.event_name == 'schedule'`.** Run the group locally before merging a change to it, since a schedule only runs from the default branch.\n- **On failure it opens one issue, or comments on the one already open.** Notifications for a scheduled workflow go to one user only: its creator, or whoever last edited its cron or re-enabled it. Give that job `issues: write` plus `contents: read` for the checkout: a job-level `permissions` block sets every permission it omits to none.\n- **A hung canary check ends on its own deadline (`craft:test-suite-design` §10), well before the job's `timeout-minutes`.** The issue step runs on `failure()`, which a failed step turns true, while `timeout-minutes` cancels the job: a hang that only the job timeout ends may never reach the issue.\n- **Put the cron at an odd minute (`23 4 * * *`) and treat its timing as best effort.** The schedule event is delayed under high load, the start of every hour is high load, and queued jobs may be dropped: a `0 6 * * *` cron on this marketplace started 4 to 12 hours late.\n- **In a public repository, a schedule is disabled after 60 days without activity.** Check it is still enabled when a quiet project resumes.\n\n## 7. Path Filters and Required Checks\n\n- **Never put a path or branch filter (`paths`, `paths-ignore`, `branches`, `branches-ignore`) under the `pull_request` trigger of a workflow whose checks are required.** A workflow skipped that way leaves its checks Pending, and the pull request cannot merge. With a base-branch filter, a stacked pull request runs nothing while it targets its parent's branch, and changing its base to main later is an `edited` event, which starts no workflow by default (only `opened`, `synchronize` and `reopened` do): its checks wait for the next push.\n- **Select by diff inside the entry instead,** on pull requests only, against the merge base, printing what it skipped (`not needed: no change under plugins\u002Fgoal since \u003Cbase>`); a push to main and the schedule run everything. Measure what it would save first: 8 of the last 60 changes on this marketplace would have skipped its slowest job.\n- **An aggregate job used as the required check runs under `if: always()` and fails unless every job it needs succeeded.** Without `always()` it is skipped when a dependency fails, and a job skipped by a condition reports Success.\n\n## 8. Guard the Workflow with Allowlists\n\nWhen a test guards the workflow file (worth it once agents edit CI), it lists what may appear, never what may not.\n\n- **A step carries only `name`, `uses`, `with` and `run`; a job only `name`, `runs-on`, `strategy`, `steps` and `timeout-minutes`,** plus the canary's schedule condition, permissions and failure step; no `env` or `defaults` at workflow or job level. A denylist of `continue-on-error` and `if: false` still accepts `shell: true {0}` (a custom shell that never runs the script), a job's `defaults.run.shell`, and a step `env` setting `npm_config_script_shell=\u002Fusr\u002Fbin\u002Ftrue`, under which `npm run verify` exits 0 without running anything.\n- **Check coverage against the workflow itself:** every group but the canary is named by exactly one entry step in a job that runs on pull requests, and the canary only by the scheduled job. The general rule, a copy checked by its role: `craft:test-suite-design` §5.\n- **Test the guard on YAML strings parsed in memory** (milliseconds, no CI run), and change it in the same pull request as the workflow.\n\n## 9. macOS Legs\n\n- **A macOS leg runs platform checks only (`craft:test-suite-design` §1): the suites of code that `\u002Fbin\u002Fbash` runs on a developer's Mac.** `macos-26` ships Bash 3.2.57 with BSD tools where `ubuntu-24.04` ships Bash 5.2 with GNU tools, and ShellCheck has no bash-version target, so in CI only the macOS leg catches a bash 4 construct. Nothing else goes there: macOS runners are capped at 5 concurrent jobs, and GitHub warned of longer macOS queues during the 2026-10-05 incident.\n- **The leg catches only what some case drives.** The rows that drive each platform branch: `shell-test:shell-test-conventions`.\n- **Put the OS legs in one matrix with `fail-fast: false`.** The default cancels the other legs as soon as one fails, which hides their verdicts.\n\n## 10. A Red or Stuck Run\n\n- **Read the annotation before re-running.** `The job was not acquired by Runner of type hosted even after multiple attempts`, with no step run, is GitHub's infrastructure, and the job is cancelled after about 15 minutes: re-run the failed jobs once the incident clears (`gh run rerun RUN_ID --failed`). No test change fixes it; fewer jobs only shrink the exposure.\n- **A check that turns green on re-run is flaky, not fixed.** Open an issue for it, and never add automatic retries to the gate: they hide real races and teach everyone to ignore red.\n\n## Example\n\nOne job per size (static checks, small in-process tests, medium process-level suites, and a platform job on Linux and macOS for the suites of code that runs on both), pinned images, PR-only cancellation, and a schedule-only canary on floating versions that reports to an issue. The gate jobs carry no `if`, so a push and the schedule re-run the whole gate. `pull_request` carries no filter, so a stacked pull request runs the gate too (§7). No job installs its dependencies: the entry runs `npm ci` (§1). `.nvmrc` holds an exact Node version (§5). Size each `timeout-minutes` from your own measured durations.\n\n```yaml\nname: Verify\n\non:\n  pull_request:\n  push:\n    branches: [main]\n  schedule:\n    - cron: '23 4 * * *'\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\njobs:\n  static:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts static\n\n  small:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts small\n\n  medium:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 10\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts medium\n\n  platform:\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [ubuntu-24.04, macos-26]\n    runs-on: ${{ matrix.os }}\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts platform\n\n  canary:\n    if: github.event_name == 'schedule'\n    runs-on: ubuntu-latest\n    timeout-minutes: 30\n    permissions:\n      contents: read\n      issues: write\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version: '24' }\n      - run: node scripts\u002Fverify.ts canary\n      - if: failure()\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          RUN: https:\u002F\u002Fgithub.com\u002F${{ github.repository }}\u002Factions\u002Fruns\u002F${{ github.run_id }}\n        run: |\n          issue=$(gh issue list --search 'in:title \"Scheduled canary is red\"' --json number --jq '.[0].number')\n          if [ -n \"$issue\" ]; then\n            gh issue comment \"$issue\" --body \"Still red: $RUN\"\n          else\n            gh issue create --title 'Scheduled canary is red' --body \"Red: $RUN\"\n          fi\n```\n\n## Quick Reference\n\n| Situation | Rule |\n|---|---|\n| Writing a job | Checkout and toolchain, then one entry step calling the entry script directly with every group the job covers; the entry installs |\n| Laying out jobs | One per size, in parallel; split or shard only the job that sets the wall time |\n| A result another job needs | Repeat the setup instead of handing results over; remove work that runs twice |\n| Dependency cache | Measure first: setup-node caches the npm cache, not `node_modules` |\n| `timeout-minutes` | On every job, 4 to 5 times its longest green run, behind each check's own deadline |\n| `concurrency` | Group on `head_ref` with a `run_id` fallback; cancel only on `pull_request` |\n| Versions | Image, CLIs and exact language version pinned in the gate, floating in the canary; a pin moves in its own pull request |\n| Scheduled canary | Gate setup plus one entry step, check deadlines under the job timeout, an issue on failure, an odd-minute cron |\n| Path and branch filters | Never under `pull_request` on a required check; select by diff inside the entry |\n| Aggregate required job | `if: always()`, red unless every job it needs succeeded |\n| Workflow guard | Allowlisted keys, every group covered by a PR job, tested on YAML parsed in memory |\n| macOS leg | Platform checks only, in one OS matrix with `fail-fast: false` |\n| \"not acquired by Runner\" | Infrastructure: re-run the failed jobs, change no test |\n| Green on re-run | Flaky: an issue, never an automatic retry |\n","# GitHub Actions Conventions\n\n> How a test pipeline is wired into GitHub Actions, and how GitHub behaves around it. The suite's own design (the sizes and where each runs, the single entry point, per-check deadlines, what makes a canary worth having) lives in `craft:test-suite-design`; what a test asserts, in `craft:testing-principles`; `node --test` flags, in `node-test:node-test-conventions`; bash 3.2 and BSD fixes, in `mac:mac-platform`; hook suites and their per-platform rows, in `shell-test:shell-test-conventions`. The source of every GitHub behaviour below, and of every number measured on this marketplace's own CI, is listed in `references\u002Fsources.md`.\n\n## 1. Steps\n\n- **A job is its setup steps, then one step that calls the entry point with every group the job covers** (`node scripts\u002Fverify.ts static`; the entry point itself: `craft:test-suite-design` §11). A failed step skips the steps after it, so a second entry step loses its verdict whenever the first one goes red, and a check written straight into a `run:` block is one the local entry never runs, so local and CI verdicts drift.\n- **Call the entry script itself, never through a package manager.** `npm run verify` stays the local shortcut; in CI, a committed `.npmrc` (`script-shell=\u002Fusr\u002Fbin\u002Ftrue`) or a changed `scripts` entry in `package.json` makes `npm run` exit 0 without running the entry, and no workflow guard reads those files (§8).\n- **Let the entry install the dependencies before its first check** (`npm ci`), so a job's setup is only the checkout and the toolchain, and no job can forget the install. An entry that does not install needs an install step in every job, the canary included.\n\n## 2. Jobs\n\n- **One job per size, all running in parallel.** The run lasts as long as its slowest job, and a red job names the size that broke.\n- **Split or shard only the job that sets the run's wall time, and only once its own work dwarfs its setup.** Shortening any other job saves nothing, and every split costs: each job gets a fresh VM and pays checkout, setup and install again; a run fails when one of its jobs never gets a runner; the Free and Pro plans run at most 20 and 40 jobs at once, 5 of them on macOS; and `node --test --test-shard` deals files out by count, not by duration.\n- **Repeat the setup in every job rather than hand a result from one job to another.** An `npm ci` of about 100 packages took at most 3 s per job on this marketplace's CI, while a handed-over result costs an artifact upload, a download and a `needs:` wait that serialises the two jobs. Work that runs twice is removed, not shared (`craft:test-suite-design` §8).\n- **Measure before caching dependencies.** setup-node caches the npm cache, not `node_modules`, and `npm ci` deletes `node_modules` before installing, so a lockfile of about 100 packages gains a few seconds at most. Since setup-node v5, a `packageManager` (or `devEngines.packageManager`) field set to npm turns that cache on by itself; its README advises `package-manager-cache: false` in workflows with elevated privileges.\n\n## 3. Timeouts\n\n- **Every job declares `timeout-minutes`, about 4 to 5 times its longest green run, read from the durations the entry reports.** Left out, it is 360: one hang holds a runner and keeps the pull request pending for six hours. The wide margin keeps a slow runner day green.\n- **The job timeout only backs up each check's own deadline (`craft:test-suite-design` §10): on its own, it cancels the job without naming the check that hung.** `Terminate orphan process` lines at the end of a job log mean a check left processes behind for the runner to kill (`craft:test-suite-design` §7).\n- **No timeout shortens a job that never got a runner.** That failure ends on GitHub's side (§10).\n\n## 4. Concurrency\n\nCancel superseded pull request runs, never a push to main or a scheduled run. It pays off during a runner shortage, when a superseded run's jobs would still hold or wait for scarce runners.\n\n```yaml\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n```\n\n- **Fall back to `github.run_id`.** `github.head_ref` is only defined on pull_request events, so every other run gets a group of its own: each commit on main keeps its verdict, and a push never cancels the nightly.\n- **Never build the group from a value that main or the schedule share** (`${{ github.ref }}` on every event, for instance). Even without `cancel-in-progress`, a pending run is cancelled as soon as a newer one queues in its group.\n\n## 5. Pin the Gate, Float the Canary\n\nWhy a verdict that can change without a diff stays out of the gate: `craft:test-suite-design` §1. In a workflow:\n\n- **Pin the runner image** (`ubuntu-24.04`, `macos-26`), never a `-latest` label. Such a label moves to a new image gradually, over 1 to 2 months (ubuntu-latest to Ubuntu 26.04 from 2026-10-19 to 2026-11-19): jobs of one run can land on two OS versions, and the preinstalled tools change with the image (bash 5.2 to 5.3, ShellCheck 0.9 to 0.11).\n- **Pin every CLI a check or a setup step installs** (`npx skills@1.7.0`, not `npx skills`).\n- **Pin the language version to the exact one developers run, in one file the gate jobs read** (an `.nvmrc` holding `24.16.0`, read with `node-version-file: .nvmrc`). `node-version: '24'` takes the newest 24.x: CI ran 24.21 while the developer's machine ran 24.16, so a feature added in between works in CI and not locally.\n- **Float the same things in the canary** (`ubuntu-latest`, `@latest`, the major version only). A red canary means a floated version broke something: find which one, then move that pin, with any fix it needs, in a pull request of its own; move the image pin before the pinned image is deprecated.\n\n## 6. Scheduled Canary\n\nWhat makes a canary worth having: `craft:test-suite-design` §6. In a workflow:\n\n- **The canary job is the gate's setup on floating versions, plus one entry step naming the canary group, under `if: github.event_name == 'schedule'`.** Run the group locally before merging a change to it, since a schedule only runs from the default branch.\n- **On failure it opens one issue, or comments on the one already open.** Notifications for a scheduled workflow go to one user only: its creator, or whoever last edited its cron or re-enabled it. Give that job `issues: write` plus `contents: read` for the checkout: a job-level `permissions` block sets every permission it omits to none.\n- **A hung canary check ends on its own deadline (`craft:test-suite-design` §10), well before the job's `timeout-minutes`.** The issue step runs on `failure()`, which a failed step turns true, while `timeout-minutes` cancels the job: a hang that only the job timeout ends may never reach the issue.\n- **Put the cron at an odd minute (`23 4 * * *`) and treat its timing as best effort.** The schedule event is delayed under high load, the start of every hour is high load, and queued jobs may be dropped: a `0 6 * * *` cron on this marketplace started 4 to 12 hours late.\n- **In a public repository, a schedule is disabled after 60 days without activity.** Check it is still enabled when a quiet project resumes.\n\n## 7. Path Filters and Required Checks\n\n- **Never put a path or branch filter (`paths`, `paths-ignore`, `branches`, `branches-ignore`) under the `pull_request` trigger of a workflow whose checks are required.** A workflow skipped that way leaves its checks Pending, and the pull request cannot merge. With a base-branch filter, a stacked pull request runs nothing while it targets its parent's branch, and changing its base to main later is an `edited` event, which starts no workflow by default (only `opened`, `synchronize` and `reopened` do): its checks wait for the next push.\n- **Select by diff inside the entry instead,** on pull requests only, against the merge base, printing what it skipped (`not needed: no change under plugins\u002Fgoal since \u003Cbase>`); a push to main and the schedule run everything. Measure what it would save first: 8 of the last 60 changes on this marketplace would have skipped its slowest job.\n- **An aggregate job used as the required check runs under `if: always()` and fails unless every job it needs succeeded.** Without `always()` it is skipped when a dependency fails, and a job skipped by a condition reports Success.\n\n## 8. Guard the Workflow with Allowlists\n\nWhen a test guards the workflow file (worth it once agents edit CI), it lists what may appear, never what may not.\n\n- **A step carries only `name`, `uses`, `with` and `run`; a job only `name`, `runs-on`, `strategy`, `steps` and `timeout-minutes`,** plus the canary's schedule condition, permissions and failure step; no `env` or `defaults` at workflow or job level. A denylist of `continue-on-error` and `if: false` still accepts `shell: true {0}` (a custom shell that never runs the script), a job's `defaults.run.shell`, and a step `env` setting `npm_config_script_shell=\u002Fusr\u002Fbin\u002Ftrue`, under which `npm run verify` exits 0 without running anything.\n- **Check coverage against the workflow itself:** every group but the canary is named by exactly one entry step in a job that runs on pull requests, and the canary only by the scheduled job. The general rule, a copy checked by its role: `craft:test-suite-design` §5.\n- **Test the guard on YAML strings parsed in memory** (milliseconds, no CI run), and change it in the same pull request as the workflow.\n\n## 9. macOS Legs\n\n- **A macOS leg runs platform checks only (`craft:test-suite-design` §1): the suites of code that `\u002Fbin\u002Fbash` runs on a developer's Mac.** `macos-26` ships Bash 3.2.57 with BSD tools where `ubuntu-24.04` ships Bash 5.2 with GNU tools, and ShellCheck has no bash-version target, so in CI only the macOS leg catches a bash 4 construct. Nothing else goes there: macOS runners are capped at 5 concurrent jobs, and GitHub warned of longer macOS queues during the 2026-10-05 incident.\n- **The leg catches only what some case drives.** The rows that drive each platform branch: `shell-test:shell-test-conventions`.\n- **Put the OS legs in one matrix with `fail-fast: false`.** The default cancels the other legs as soon as one fails, which hides their verdicts.\n\n## 10. A Red or Stuck Run\n\n- **Read the annotation before re-running.** `The job was not acquired by Runner of type hosted even after multiple attempts`, with no step run, is GitHub's infrastructure, and the job is cancelled after about 15 minutes: re-run the failed jobs once the incident clears (`gh run rerun RUN_ID --failed`). No test change fixes it; fewer jobs only shrink the exposure.\n- **A check that turns green on re-run is flaky, not fixed.** Open an issue for it, and never add automatic retries to the gate: they hide real races and teach everyone to ignore red.\n\n## Example\n\nOne job per size (static checks, small in-process tests, medium process-level suites, and a platform job on Linux and macOS for the suites of code that runs on both), pinned images, PR-only cancellation, and a schedule-only canary on floating versions that reports to an issue. The gate jobs carry no `if`, so a push and the schedule re-run the whole gate. `pull_request` carries no filter, so a stacked pull request runs the gate too (§7). No job installs its dependencies: the entry runs `npm ci` (§1). `.nvmrc` holds an exact Node version (§5). Size each `timeout-minutes` from your own measured durations.\n\n```yaml\nname: Verify\n\non:\n  pull_request:\n  push:\n    branches: [main]\n  schedule:\n    - cron: '23 4 * * *'\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\njobs:\n  static:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts static\n\n  small:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts small\n\n  medium:\n    runs-on: ubuntu-24.04\n    timeout-minutes: 10\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts medium\n\n  platform:\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [ubuntu-24.04, macos-26]\n    runs-on: ${{ matrix.os }}\n    timeout-minutes: 5\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version-file: .nvmrc }\n      - run: node scripts\u002Fverify.ts platform\n\n  canary:\n    if: github.event_name == 'schedule'\n    runs-on: ubuntu-latest\n    timeout-minutes: 30\n    permissions:\n      contents: read\n      issues: write\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v5\n        with: { node-version: '24' }\n      - run: node scripts\u002Fverify.ts canary\n      - if: failure()\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          RUN: https:\u002F\u002Fgithub.com\u002F${{ github.repository }}\u002Factions\u002Fruns\u002F${{ github.run_id }}\n        run: |\n          issue=$(gh issue list --search 'in:title \"Scheduled canary is red\"' --json number --jq '.[0].number')\n          if [ -n \"$issue\" ]; then\n            gh issue comment \"$issue\" --body \"Still red: $RUN\"\n          else\n            gh issue create --title 'Scheduled canary is red' --body \"Red: $RUN\"\n          fi\n```\n\n## Quick Reference\n\n| Situation | Rule |\n|---|---|\n| Writing a job | Checkout and toolchain, then one entry step calling the entry script directly with every group the job covers; the entry installs |\n| Laying out jobs | One per size, in parallel; split or shard only the job that sets the wall time |\n| A result another job needs | Repeat the setup instead of handing results over; remove work that runs twice |\n| Dependency cache | Measure first: setup-node caches the npm cache, not `node_modules` |\n| `timeout-minutes` | On every job, 4 to 5 times its longest green run, behind each check's own deadline |\n| `concurrency` | Group on `head_ref` with a `run_id` fallback; cancel only on `pull_request` |\n| Versions | Image, CLIs and exact language version pinned in the gate, floating in the canary; a pin moves in its own pull request |\n| Scheduled canary | Gate setup plus one entry step, check deadlines under the job timeout, an issue on failure, an odd-minute cron |\n| Path and branch filters | Never under `pull_request` on a required check; select by diff inside the entry |\n| Aggregate required job | `if: always()`, red unless every job it needs succeeded |\n| Workflow guard | Allowlisted keys, every group covered by a PR job, tested on YAML parsed in memory |\n| macOS leg | Platform checks only, in one OS matrix with `fail-fast: false` |\n| \"not acquired by Runner\" | Infrastructure: re-run the failed jobs, change no test |\n| Green on re-run | Flaky: an issue, never an automatic retry |\n",{"name":5,"description":7},"main","479b264ec17cc5fafbf36287a1087472d3a386d3","plugins\u002Ftooling\u002Fskills\u002Fgithub-actions-conventions",2,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace","https:\u002F\u002Fgithub.com\u002FFabienSalles","https:\u002F\u002Ffabiensalles.com","2026-10-13 04:33:22",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add FabienSalles\u002Fclaude-marketplace --skill github-actions-conventions",{"tool":63,"command":64},"bunx","bunx skills add FabienSalles\u002Fclaude-marketplace --skill github-actions-conventions",{"tool":66,"command":67},"pnpm","pnpm dlx skills add FabienSalles\u002Fclaude-marketplace --skill github-actions-conventions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftooling\u002Fskills\u002Fgithub-actions-conventions\u002FSKILL.md",true,[71,77,81,85,89],{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"bmad-skill-manifest.yaml","REFERENCE","参考文档",682,"https:\u002F\u002Fgithub.com\u002Fvladtara\u002Fhealthcabinet\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fbmad-cis-agent-storyteller\u002Fbmad-skill-manifest.yaml",{"path":78,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":79,"sourceHtmlUrl":80},"evals\u002Fevals.json",4434,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftooling\u002Fskills\u002Fgithub-actions-conventions\u002Fevals\u002Fevals.json",{"path":82,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fsources.md",6535,"https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftooling\u002Fskills\u002Fgithub-actions-conventions\u002Freferences\u002Fsources.md",{"path":86,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":87,"sourceHtmlUrl":88},"stories-told.md",206,"https:\u002F\u002Fgithub.com\u002Fvladtara\u002Fhealthcabinet\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fbmad-cis-agent-storyteller\u002Fstories-told.md",{"path":90,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":91,"sourceHtmlUrl":92},"story-preferences.md",217,"https:\u002F\u002Fgithub.com\u002Fvladtara\u002Fhealthcabinet\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fbmad-cis-agent-storyteller\u002Fstory-preferences.md",[94,119,138,159,182,198],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":103,"publishedAt":44},"01M6DW2YS1MGF65JNS1QQ15QHS","vitest-test-conventions","ACTIVATE when writing Vitest tests, creating test files, using vi.fn()\u002Fvi.mock()\u002Fvi.spyOn(), or test factories. ACTIVATE for 'Vitest', 'it.each', 'NestJS testing module', 'supertest', 'vi.fn', 'vi.mock', 'spyOn'. Provides Vitest\u002FNestJS-specific testing patterns; cross-language testing principles (DAMP, AAA, spy over mock, what NOT to test) live in craft:testing-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), TDD workflow\u002Fiterations (see vitest:vitest-tdd-workflow), PHP\u002FPHPUnit tests (see phpunit:php-test-conventions).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvitest\u002Fskills\u002Fvitest-test-conventions\u002FSKILL.md",[100],{"categoryNo":101,"categoryName":102,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[104,105,26,106,107,43,108,42,109,110,36,111,112,113,33,114,115,116,117,118],"test","vitest","vitest test conventions","testing","tdd","file","testing patterns","files","nestjs","activate","project","tests","module","fn","testing principles",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":128,"publishedAt":44},"01M6DW2VFE6NPFCGQKQ68P1MVZ","vitest-tdd-workflow","ACTIVATE when building new features, endpoints, or user stories using TDD with Vitest in a TypeScript\u002FNestJS context. ACTIVATE for '\u002Ffeature-tdd-dev', 'TDD', 'red-green-refactor' in TS context. Provides Vitest\u002FNestJS-specific TDD examples and commands; cross-language TDD workflow (cross-layer iterations, RED-GREEN-REFACTOR, working app, bug-fix-first-test, mocks-hiding-bugs) lives in craft:tdd-workflow-principles. DO NOT use for: node:test files (a file importing node:test) or a project whose tests run under node --test (see node-test:node-test-conventions), test writing conventions (see vitest:vitest-test-conventions), PHP TDD (see phpunit:php-tdd-workflow).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvitest\u002Fskills\u002Fvitest-tdd-workflow\u002FSKILL.md",[125],{"categoryNo":126,"categoryName":127,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[108,42,129,105,130,43,131,109,132,133,36,134,111,113,33,135,114,115,136,137],"tdd workflow","vitest tdd workflow","dev","examples","fix","red-green-refactor","green","feature","app",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":44},"01M6DW2RGMQE10D8C5Z5MA2RMY","ts-refactoring","ACTIVATE when refactoring TypeScript code. ACTIVATE for 'refactor', 'extract', 'redesign', 'simplify', or 'clean up' in a TypeScript \u002F Node \u002F NestJS context. This skill provides TS-specific examples for the cross-language refactoring rules defined in craft:refactoring-principles. DO NOT use for: writing new features from scratch, general OOP patterns (see ts-oop).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-refactoring\u002FSKILL.md",[],[145,146,43,147,148,132,149,150,151,152,153,36,154,155,156,112,157,113,33,158],"refactoring","ts refactoring","typescript","code","refactor","simplify","Rules","node","redesign","up","general","clean","craft","patterns",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":166,"publishedAt":44},"01M6DW2MHYXNBBVYEGB058Y48J","ts-ports-adapters","ACTIVATE when a TypeScript codebase with no dependency-injection container has to declare a port and wire its adapter — a repository, a clock, an id generator, an event dispatcher the domain depends on. ACTIVATE for 'port', 'adapter', 'SPI', 'dependency inversion' or 'composition root' in a codebase that wires its dependencies by hand. Covers: the port as a type of functions in the domain layer, the adapter as an object literal annotated with it, the handler that takes its dependencies first and its data second, the composition root in the infrastructure layer, and the in-memory stub that substitutes for the adapter in a unit test. DO NOT use for: NestJS, or any container-based DI with decorators and tokens (see nest-ddd-conventions), aggregate operations and smart constructors (see ddd-ts-fp), the Result type itself (see ts-functional).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-ports-adapters\u002FSKILL.md",[165],{"categoryNo":101,"categoryName":102,"taxonomyType":21,"taxonomyTypeDesc":22},[167,168,169,104,170,171,36,172,173,112,174,113,33,175,176,177,178,179,180,181],"ports","ts ports adapters","memory","ddd","Composition","container","functions","Literal","dependency-injection","domain","tokens","as","type","id","adapter",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":44},"01M6DW2GRXZFYT05HEDB26C9B8","ts-oop","ACTIVATE when designing TypeScript classes, and the value objects or collections modelled as classes, or when the user asks about object design, encapsulation, Tell Don't Ask, or Symbol.iterator. Provides TS-specific examples for the cross-language OOP rules defined in craft:oop-principles, plus TS-specific patterns (Symbol.iterator, branded types for primitive identifiers). DO NOT use for: a value object or an aggregate modelled as an immutable record rather than a class (see ddd-ts-fp), refactoring methodology (see ts-refactoring).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-oop\u002FSKILL.md",[],[189,190,37,147,170,132,191,192,145,151,193,36,194,157,113,33,195,196,197,178],"oop","ts oop","methodology","immutable","ask","refactoring methodology","objects","record","collections",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":44},"01M6DW2D26XG5MJMTP9MSE43S2","ts-layer-boundaries","ACTIVATE when wiring a Worker entry point, a Router, a controller, or a domain event consumer in a TypeScript CQRS codebase, or when deciding where a port belongs. ACTIVATE for 'composition root', 'layer boundary', 'ESLint zones', 'domain must not import infrastructure'. Covers: the *Worker.ts composition root, the curried consumer, Router wiring of command endpoints, the five-gesture controller, the domain-to-infrastructure import boundary enforced by ESLint, infrastructure-only ports, in-memory doubles for every port, the read-can-reach-write asymmetry, and read endpoints going through a domain handler. DO NOT use for: the port's own shape and adapter binding (see ts-ports-adapters), the Result type (see ts-functional), domain event structure (see ts-ddd-events).","https:\u002F\u002Fgithub.com\u002FFabienSalles\u002Fclaude-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Ftypescript\u002Fskills\u002Fts-layer-boundaries\u002FSKILL.md",[],[205,169,170,206,207,171,167,36,208,35,209,113,33,210,176,211,212,179,181,213],"ts layer boundaries","controller","boundary","router","endpoints","structure","cqrs","worker","import"]