.claude/skills/github-actions-cancel-on-pr-merge/SKILL.md
Cancel in-progress GitHub Actions workflows when a PR is merged or closed. Use when: (1) Slow CI jobs (like Codex reviews) waste minutes after PR merges, (2) You have `cancel-in-progress: true` but workflows still run after merge, (3) You want to save CI minutes by stopping obsolete workflow runs. Covers the `closed` event type pattern with concurrency groups.
npx skillsauth add Dbochman/dotfiles github-actions-cancel-on-pr-mergeInstall 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.
GitHub Actions workflows triggered by pull_request events continue running even after the PR is merged or closed. The cancel-in-progress: true concurrency setting only cancels when new commits are pushed, not when the PR is closed.
cancel-in-progress: true but it doesn't help on mergeAdd closed to the PR event types and add a job condition to skip running on close:
name: PR Workflow
on:
pull_request:
branches: [main]
types: [opened, synchronize, closed] # Add 'closed'
# Cancel in-progress runs when PR is closed/merged
concurrency:
group: workflow-name-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
my-job:
runs-on: ubuntu-latest
# Skip if PR is closed - concurrency cancels in-progress runs
if: github.event.action != 'closed'
steps:
# ... job steps
closed eventgithub.event.action == 'closed'cancel-in-progress: true cancels the old rungithub.event.action != 'closed' causes it to skipBefore (workflows continue after merge):
on:
pull_request:
branches: [main]
types: [opened, synchronize]
concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true
After (workflows cancel on merge):
on:
pull_request:
branches: [main]
types: [opened, synchronize, closed]
concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
if: github.event.action != 'closed'
# ...
if condition is important - without it, a new job would start and immediately succeed, which still wastes a runner startupif: github.event.action == 'closed'development
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".