Agent skill

Scheduled PR Merge

by hmislk in hmislk/hmis

A skill your agent uses when the developer has finished reviewing a PR (often a hotfix to a production or staging branch) and wants it merged, and so CI/CD deployed, at a specific later time or…

GPL-3.0Auto-check passedDevOps & Cloud

Install Scheduled PR Merge

skills CLI
$ npx skills add hmislk/hmis --skill scheduled-pr-merge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hmislk/hmis scheduled-pr-merge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/scheduled-pr-merge .claude/skills/scheduled-pr-merge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scheduled-pr-merge
GitHub stars
236
Token cost
~1.5k tokens
SKILL.md length
804 words
Files
3
Skills in repo
33
Repo updated
First seen
Licence
GPL-3.0

At a glance

A skill your agent uses when the developer has finished reviewing a PR (often a hotfix to a production or staging branch) and wants it merged, and so CI/CD deployed, at a specific later time or…

  • Works in 7 steps: Confirm the request. Get the PR number,… → Token file (once per machine, and again… → Dry run in a cron-like environment. This… → …
  • The developer has finished reviewing a PR (often a hotfix to a production
  • SKILL.md covers What each minute's attempt does, Steps and Common mistakes
  • Runs Shell scripts from its folder; calls gh

What it does

Scheduled PR Merge is an agent skill from hmislk/hmis. Use when the developer has finished reviewing a PR (often a hotfix to a production or staging branch) and wants it merged, and so CI/CD deployed, at a specific later time or window agreed with a customer (e.g. "merge 24289 between 3:00 and 3:30am on 5 October"), or wants to list or cancel such a scheduled merge. Also /scheduled-pr-merge.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `schedule.sh` and `scheduled-merge.sh`).

It sits in DevOps & Cloud, covering CI/CD. The repository describes itself as: This is an Open Source Java EE based Hospital Information Management System. The licence is GPL-3.0.

When your agent uses it

  • The developer has finished reviewing a PR (often a hotfix to a production
  • Staging branch) and wants it merged
  • So CI/CD deployed
  • At a specific later time

Example prompts

  • “merge 24289 between 3:00 and 3:30am on 5 October”
  • “/scheduled-pr-merge”

Requirements

  • A Bash shell

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the request. Get the PR number, the date and time in
  2. Token file (once per machine, and again after gh auth refresh).
  3. Dry run in a cron-like environment. This must end with
  4. Schedule. Read the PR, the pinned head and the window back to the
  5. Report. Give the job id (--pr-), the pinned
  6. Optional session watch. Ask whether to keep this session open. If
  7. After the merge, if this was a hotfix, do hotfix-deploy Step 9a

What it can do on your machine

Read from SKILL.md and the folder at commit 19f723d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scheduled PR Merge loads about 1.5k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 804 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hmislk/hmis at commit 19f723d, republished under its GPL-3.0 licence (© hmislk). 804 words, ~1,519 tokens.

Download SKILL.mdSave it as .claude/skills/scheduled-pr-merge/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
scheduled-pr-merge
description
Use when the developer has finished reviewing a PR (often a hotfix to a production or staging branch) and wants it merged, and so CI/CD deployed, at a specific later time or window agreed with a customer (e.g. "merge #24289 between 3:00 and 3:30am on 5 October"), or wants to list or cancel such a scheduled merge. Also /scheduled-pr-merge.

Scheduled PR Merge

A cron job merges the PR within the agreed window, by default 30 minutes from the start time. It does not need a Claude session, only this machine on with cron running.

The merge is essential, so the job keeps trying. Cron starts it every minute of the window, and anything temporary is retried the next minute. A start missed by a few minutes still merges.

It is also fail-safe. It pins the reviewed head commit and never merges anything that has changed since the review.

Tools in this folder:

  • schedule.sh handles add, test, list and cancel.
  • scheduled-merge.sh is the runner.

add and test install both scripts in ~/.local/share/hmis-scheduled-merge/. Jobs run from there, and so can list and cancel, whatever branch the repo is on.

What each minute's attempt does

SituationAction
All checks passed, head is the reviewed commit, GitHub reports MERGEABLE/CLEANMerge (gh pr merge --match-head-commit), then stop
Already merged, by hand or by an earlier minuteStop quietly
Checks still running, mergeability still computing, network or API error, merge call failedRetry next minute
BLOCKED by branch rules, e.g. unresolved review conversationsRetry next minute; the log and comment name the cause
Merge accepted but not yet MERGED, e.g. a merge queueKeep checking; success is reported only once GitHub shows MERGED
PR closed, base changed, new commits pushed, a check failed, conflictsGive up now: retrying can't fix these
Still not ready in the last minute of the windowGive up
Machine was off for the whole windowGive up, from the first run that does happen

Every give-up and every merge posts a PR comment.

It never uses --admin and never merges outside [start, start+window): the clock is re-read just before the merge call. Only the latest run of each check counts. An overlapping attempt skips its minute.

Results go to two places:

  • PR comment: a ⏰ comment saying whether it merged, and why not if it didn't. This is public, so it states the defect and contains no hospital data.
  • Log: ~/.local/state/hmis-scheduled-merge/pr-<N>.log.

A merge or give-up deletes the job's cron lines. Cron has no year field, so without that the job would fire again next year.

Steps

  1. Confirm the request. Get the PR number, the date and time in Asia/Colombo unless told otherwise, and the merge method (default merge, matching repo history). Confirm the review is complete. The job pins whatever head commit exists now, so ask the developer to push any last fixes first.
  2. Token file (once per machine, and again after gh auth refresh). Cron cannot read the desktop keyring (gh returns HTTP 401). Ask before creating the token file, because it is a credential on disk, outside the repo:
    bash
    mkdir -p ~/.config/hmis-scheduled-merge && chmod 700 ~/.config/hmis-scheduled-merge
    (umask 077; gh auth token > ~/.config/hmis-scheduled-merge/gh-token)
  3. Dry run in a cron-like environment. This must end with RESULT: would merge now. Anything else names the blocker. A common one is an unresolved review conversation (often from CodeRabbit) on a base branch whose rules require conversations to be resolved. Get those resolved first.
    bash
    .claude/skills/scheduled-pr-merge/schedule.sh test --repo hmislk/hmis --pr <N>
  4. Schedule. Read the PR, the pinned head and the window back to the developer, then run add. This works if the developer has allowed Bash(~/.local/share/hmis-scheduled-merge/schedule.sh *) in .claude/settings.local.json. If auto mode refuses anyway, give the developer the exact line to run with !. Do not work around the refusal.
    bash
    ! ~/.local/share/hmis-scheduled-merge/schedule.sh add --repo hmislk/hmis --pr <N> --at "2026-10-05 03:00" --window-minutes 30
    Then confirm with schedule.sh list.
  5. Report. Give the job id (<owner>-<repo>-pr<N>-<epoch>), the pinned head commit, the window with its time zone, the log path, and how to cancel it (schedule.sh cancel <job-id>). If add printed a merge-state WARNING, resolve the cause before the window. Re-running test shortly before leaving catches review comments that arrived after scheduling.
  6. Optional session watch. Ask whether to keep this session open. If yes, set a one-shot reminder (CronCreate) for just after the window ends to read the log and the PR state and report. If not, the PR comment and log are the record. Either way the merge does not depend on the session.
  7. After the merge, if this was a hotfix, do hotfix-deploy Step 9a: mirror the change into development unless it was cherry-picked from there.
Show full SKILL.md (123 more words)Show less

Common mistakes

MistakeFix
Scheduling before the last fix is pushedThe job aborts because the head changed. Push first, then add.
systemd-run --user timer or atA user timer dies at logout without linger, and at isn't installed. Use cron.
Relying on the keyringCron gets HTTP 401. Use the token file.
Time given without a zone--at is read in the machine's zone (Asia/Colombo). Repeat the window back with its zone.
Window ends too earlyGive the full customer window with --window-minutes. The job never merges after it ends.
A new push after addThe job aborts by design. Re-run add after re-review.
A bot review lands after schedulingIts unresolved conversations can block the merge (BLOCKED). Re-run test before leaving.

© hmislk, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .claude/skills/scheduled-pr-merge of hmislk/hmis.

  • SKILL.md
  • schedule.sh
  • scheduled-merge.sh

Open the folder on GitHubat commit 19f723d

Compare with similar skills

Scheduled PR Merge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scheduled PR Merge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scheduled PR Merge this skillhmislk/hmis236—~1.5kAutomated safety check: PassGPL-3.0
Monitor CInrwl/nx29k6 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw36k6 repos~4.2kAutomated safety check: PassApache-2.0
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence
Azure Pipelines Log Downloaderansible/ansible71k—~825Automated safety check: PassGPL-3.0
GitHub Actions Templatesbartstc/vite-ts-react-template12214 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 6 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    36k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Downloads Azure Pipelines CI logs for an Ansible pull request or build so the agent can analyze test failures, after asking you first.

    71k GitHub stars~825 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • GitHub Actions Templates

    bartstc/vite-ts-react-template

    Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications.

    122 GitHub starsUsed in 14 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Nushell

    ccusage/ccusage

    Guides ccusage Nushell scripts. An agent skill from ccusage/ccusage.

    19k GitHub stars~938 tokensUpdated today
    DevOps & CloudAuto-check passed

More from hmislk/hmis

All 33 skills in this repo
  • API Usage

    hmislk/hmis

    Reference for calling existing HMIS REST APIs. An agent skill from hmislk/hmis.

    236 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Application configuration options reference for the HMIS project.

    236 GitHub stars~474 tokensUpdated today
    Auto-check passed
  • Caveman

    hmislk/hmis

    Ultra-compressed communication mode. An agent skill from hmislk/hmis.

    236 GitHub starsUsed in 20 repos~946 tokens
    Auto-check passed
  • Database Guide

    hmislk/hmis

    MySQL database development guide for the HMIS project. An agent skill from hmislk/hmis.

    236 GitHub stars~664 tokensUpdated today
    Auto-check passed
  • Demo Video

    hmislk/hmis

    A skill your agent uses when asked to make a demo, training, how-to or tutorial video with sound or voice-over showing an HMIS function or configuration (e.g.

    236 GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Deploy QA

    hmislk/hmis

    Sync development into QA/testing environment branches (QA1-QA4, local RH staging) via PR + merge on GitHub.

    236 GitHub stars~2.1k tokensUpdated today
    Auto-check: notes

Categories

Questions about Scheduled PR Merge

What does Scheduled PR Merge do?

A skill your agent uses when the developer has finished reviewing a PR (often a hotfix to a production or staging branch) and wants it merged, and so CI/CD deployed, at a specific later time or…. Scheduled PR Merge is an agent skill from hmislk/hmis.g.

When should I use Scheduled PR Merge?

Scheduled PR Merge fits situations like: the developer has finished reviewing a PR (often a hotfix to a production; staging branch) and wants it merged; so CI/CD deployed; at a specific later time.

How do I install Scheduled PR Merge in Claude Code?

Run `npx skills add hmislk/hmis --skill scheduled-pr-merge -a claude-code`. Or copy the skill folder (.claude/skills/scheduled-pr-merge in hmislk/hmis) into .claude/skills/scheduled-pr-merge in your project. Claude Code loads it when a task matches its description.

How do I install Scheduled PR Merge in Codex?

Run `npx skills add hmislk/hmis --skill scheduled-pr-merge -a codex`. Or copy the skill folder (.claude/skills/scheduled-pr-merge in hmislk/hmis) into .agents/skills/scheduled-pr-merge in your project. Codex loads it when a task matches its description.

Can I use Scheduled PR Merge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hmislk/hmis --skill scheduled-pr-merge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scheduled-pr-merge, .gemini/skills/scheduled-pr-merge, .github/skills/scheduled-pr-merge and .opencode/skills/scheduled-pr-merge in your project.

What does Scheduled PR Merge need to run?

Going by SKILL.md and its folder, Scheduled PR Merge needs a shell for the scripts in its folder and the command-line tools its instructions call (gh). Our summary lists: A Bash shell.

Does Scheduled PR Merge access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Scheduled PR Merge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scheduled PR Merge use?

Scheduled PR Merge is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scheduled PR Merge use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Scheduled PR Merge?

Skills that share tags, products or a category with Scheduled PR Merge: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Analyze GitHub Action Logs (withastro/astro, 63k stars) and Azure Pipelines Log Downloader (ansible/ansible, 71k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scheduled PR Merge?

hmislk (a GitHub organization) maintains it in hmislk/hmis, which has 236 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 10, 2026.

Source: hmislk/hmis on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.