Agent skill

PR Maintenance Loop

by cloudposse in cloudposse/atmos

Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch…

Apache-2.0Auto-check passedDevelopment

Install PR Maintenance Loop

skills CLI
$ npx skills add cloudposse/atmos --skill pr-maintenance-loop -a claude-code

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

GitHub CLI
$ gh skill install cloudposse/atmos pr-maintenance-loop --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/cloudposse/atmos.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pr-maintenance-loop .claude/skills/pr-maintenance-loop && 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
pr-maintenance-loop
GitHub stars
1.4k
Token cost
~1.4k tokens
SKILL.md length
613 words
Files
5 (incl. scripts)
Skills in repo
70
Repo updated
First seen
Licence
Apache-2.0

At a glance

Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch…

  • Works in 2 steps: preconditions → announce and start
  • Tasks that involve Linting and formatting
  • SKILL.md covers Known limitations (surface…, Step 0 — preconditions, Step 1 — announce and start and Hourly prompt template, plus 1 more section
  • Runs Shell scripts from its folder; calls gh

What it does

PR Maintenance Loop is an agent skill from cloudposse/atmos. Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch coverage, and its code free of architectural-smell (code-hygiene) findings — working toward autonomous merge-readiness. Invoke at the start of a session on a branch with an open PR, or on explicit requests like "set up the hourly PR loop" / "auto-rebase this PR". For a one-shot run instead of a recurring loop, use the…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `scripts/gh-resolve-review-thread.sh`, `scripts/list-failing-checks.sh` and `scripts/list-review-threads.sh`).

It sits in Development, covering Linting and formatting. It works with Git. The repository describes itself as: Atmos is the open-source runtime for infrastructure — it builds, authenticates, and ships Terraform, OpenTofu, Packer, Ansible, Kubernetes, Helm, and containers the same way on… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Linting and formatting

Example prompts

  • “set up the hourly PR loop”
  • “auto-rebase this PR”
  • “/pr-maintenance-loop”

Requirements

  • A Bash shell

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. preconditions
  2. announce and start

What it can do on your machine

Read from SKILL.md and the folder at commit 36726ae. 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 4 files in scripts/ (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

PR Maintenance Loop loads about 1.4k tokens when it runs. Until then it costs about 140 tokens; SKILL.md has 613 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from cloudposse/atmos at commit 36726ae, republished under its Apache-2.0 licence (© cloudposse). 613 words, ~1,434 tokens.

Download SKILL.mdSave it as .claude/skills/pr-maintenance-loop/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
pr-maintenance-loop
description
Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch coverage, and its code free of architectural-smell (code-hygiene) findings — working toward autonomous merge-readiness. Invoke at the start of a session on a branch with an open PR, or on explicit requests like "set up the hourly PR loop" / "auto-rebase this PR". For a one-shot run instead of a recurring loop, use the `fix-all` skill directly.
metadata.copyright
Copyright Cloud Posse, LLC 2026
metadata.version
1.0.0

Hourly PR Maintenance Loop

Schedules the fix-all skill to run every hour via Claude Code's native /loop primitive (CronCreate/ScheduleWakeup) — not GitHub Actions, no new external service, no secrets beyond the local git/gh session already in use. All the actual check/fix logic (sync, CI, CodeRabbit threads, lint, coverage, code-hygiene — the security model and audible notifications that govern it) lives in fix-all; this skill only owns the scheduling.

Known limitations (surface these, don't hide them)

  • Session-only, and there's no cloud-compatible alternative. The loop lives in this Claude Code process, using this exact worktree and this local gh/git session (signing key, gh auth, checkout state) — that's the whole point, per the intro above ("no new external service, no secrets beyond the local git/gh session already in use"). It dies when the process ends and auto-expires after 7 days. It only fires while idle. There is no cross-session persistence — that's why this skill re-establishes the loop every session rather than assuming one is already running. A cloud-scheduled agent runs in a fresh, isolated environment with none of that local state, so it cannot run this particular loop — there's no cloud path to fall back to. That's why Step 1 below calls CronCreate directly instead of going through the generic /loop skill: /loop would ask whether to use a cloud schedule for anything ≥60 minutes, and that question has no useful answer here.
  • Codex parity is unsolved. This skill only covers Claude Code sessions. If the user runs a Codex workspace on the same branch, tell them explicitly that this loop does not cover it.

Step 0 — preconditions

  1. gh pr view --json number,state,mergeStateStatus for the current branch. If there's no open PR, tell the user and stop — don't create one.
  2. Check whether a loop is already running this session (list scheduled jobs; look for the sentinel first line [PR-MAINTENANCE-LOOP pr=#<number> repo=cloudposse/atmos started=<ts>]). If found for this PR, don't start a second one — report it's already active. A fresh session never inherits a stale job, since the old one died with the old process, so this only guards against double-starting within one session.
Show full SKILL.md (264 more words)Show less

Step 1 — announce and start

Print a one-line announcement before starting — never start this silently:

Starting hourly PR-maintenance loop for PR #<number>...

Call CronCreate directly — cron: "0 * * * *" (every hour), recurring: true, prompt set to the hourly prompt template below with <number>/<repo> filled in and started=<current timestamp> for the self-expiry sentinel. Do not route this through the generic /loop skill: /loop asks whether to use a cloud schedule for any interval ≥60 minutes, but per "Known limitations" above there is no cloud-compatible way to run this loop, so that question has no useful answer — don't ask it, go straight to CronCreate. If a user explicitly insists on trying /loop anyway and it offers the cloud option, tell them plainly it won't work for this loop and point back to this skill instead of proceeding down that path.

After scheduling, immediately run the hourly prompt's steps once now (don't wait for the first cron fire) — same as /loop's own fixed-interval mode would have done automatically, but since this skill bypasses /loop it must do that step itself.

Hourly prompt template

This is the literal text re-enqueued every cycle via /loop 60m:

[PR-MAINTENANCE-LOOP pr=#<number> repo=cloudposse/atmos started=<ts>]

1. Self-expiry: if more than ~6.5 days have passed since `started=`, say so in the summary
  (approaching the 7-day CronCreate expiry) but keep running.

2. `gh pr view <number> --json state,mergeStateStatus`. If state != OPEN, report it and cancel
  this recurring job — don't keep firing no-ops after merge/close.

3. Invoke the `fix-all` skill (`Skill({skill: "fix-all"})`) — it owns steps 3-10 of what used to
  be inlined here: sync, CI check, CodeRabbit threads, lint, coverage, code-hygiene, and the
  security model / audible-notification rules governing all of it.

4. Always end with a one-line cycle summary, even on the no-op path, for auditability.
  • fix-all skill — owns the actual per-cycle work this loop schedules: security model, audible notifications, and the sync/CI/threads/lint/coverage sequence. Also invocable directly for a one-shot run without a recurring loop.
  • say skill — audible human-attention nudges; see fix-all for the trigger list.
  • pull-request skill — owns the label decision tree fix-all applies autonomously each cycle, plus the still human-attended parts of the PR workflow (blog posts, signing setup).
  • .claude/settings.json — the permissions allowlist that enforces fix-all's hard prohibitions when it runs unattended from this loop.

© cloudposse, Apache-2.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 4 other files (scripts) in .claude/skills/pr-maintenance-loop of cloudposse/atmos.

  • SKILL.md
  • scripts/gh-resolve-review-thread.sh
  • scripts/list-failing-checks.sh
  • scripts/list-review-threads.sh
  • scripts/sync-branch.sh

Open the folder on GitHubat commit 36726ae

Compare with similar skills

PR Maintenance Loop 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.

PR Maintenance Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Maintenance Loop this skillcloudposse/atmos1.4k—~1.4kAutomated safety check: PassApache-2.0
Update Dependenciesalorence/django-modern-rpc111—~1.3kAutomated safety check: PassMIT
Python Pypi Package Buildergithub/awesome-copilot40k1 repos~4.6kAutomated safety check: PassMIT
Obsidian Plugin Releasecrafter-station/skills112—~1.8kAutomated safety check: PassMIT
Git HooksProrise-cool/Claude-Code-Multi-Agent305—~3.6kAutomated safety check: NotesNone
Docs CIjh941213/my-cc-harness126—~989Automated safety check: NotesNone

Similar skills

  • Update Dependencies

    alorence/django-modern-rpc

    Routine update of all project dependencies — uv itself, uv.lock (all groups), tool versions pinned in GitHub workflows and .pre-commit-config.yaml (uv, ruff, mypy...), and SHA-pinned GitHub Actions.

    111 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    DevelopmentAuto-check passed
  • Obsidian Plugin Release

    crafter-station/skills

    Release a new version of an Obsidian community plugin without forgetting steps.

    112 GitHub stars~1.8k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Git Hooks

    Prorise-cool/Claude-Code-Multi-Agent

    Central authority on git hook implementations, modern best practices, and tooling for .NET/C, JavaScript/TypeScript, Python, and polyglot repositories.

    305 GitHub stars~3.6k tokensUpdated 22 days ago
    DevelopmentAuto-check: notes
  • Docs CI

    jh941213/my-cc-harness

    Scaffold a docs-as-code CI/CD pipeline + docs drift detection — link check, OpenAPI lint/breaking gate, mermaid validation, docs freshness check, CHANGELOG automation, docs.yaml manifest.

    126 GitHub stars~989 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    DevelopmentAuto-check passed

More from cloudposse/atmos

All 70 skills in this repo
  • Fix Log

    cloudposse/atmos

    A skill your agent uses when implementing, finishing, documenting, or reviewing a fix, repair, remediation, bug fix, debug-and-fix task, workflow fix, infrastructure fix, or any change that should…

    1.4k GitHub stars~685 tokensUpdated today
    Auto-check passed
  • Atmos Lint

    cloudposse/atmos

    Atmos Terraform linting with TFLint: standalone atmos terraform lint, component-aware config discovery and toolchain versions, TFLint rule configuration, and lifecycle hooks/CI findings.

    1.4k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Changelog

    cloudposse/atmos

    Blog post authoring for Atmos: MDX template, frontmatter, website/blog/tags.yml and authors.yml rules, problem-first framing, backtick-opening ban, optional cast embeds, and no-Go-internals leakage.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Editions

    cloudposse/atmos

    Decide whether a PR's new or changed default needs edition-journal handling (pkg/edition, docs/prd/editions.md), and do the mechanical work if so: journal entries, the four-layer default check…

    1.4k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Atmos Migration

    cloudposse/atmos

    Migrate to Atmos from native Terraform, Terraform Workspaces, Terramate, Terragrunt, Make, Just, or Task; migrate tool versions from mise or Aqua CLI; migrate AWS/GCP/Azure CLI configs, Leapp…

    1.4k GitHub stars~5.1k tokensUpdated today
    Auto-check: warnings
  • Roadmap

    cloudposse/atmos

    Maintain and update the Atmos roadmap page (website/src/data/roadmap.js): milestone/initiative/quarter schema, progress-percentage math, the curated featured[] cap (max 6, never auto-modified), and…

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Works with

Questions about PR Maintenance Loop

What does PR Maintenance Loop do?

Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch…. PR Maintenance Loop is an agent skill from cloudposse/atmos. Start an hourly background loop that keeps the current branch's PR rebased, its addressed CodeRabbit threads resolved, its CI checks passing, its lint clean, its tests passing with adequate patch coverage, and its code free of architectural-smell (code-hygiene) findings — working toward autonomous merge-readiness.

When should I use PR Maintenance Loop?

PR Maintenance Loop fits situations like: tasks that involve Linting and formatting.

How do I install PR Maintenance Loop in Claude Code?

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

How do I install PR Maintenance Loop in Codex?

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

Can I use PR Maintenance Loop 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 cloudposse/atmos --skill pr-maintenance-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-maintenance-loop, .gemini/skills/pr-maintenance-loop, .github/skills/pr-maintenance-loop and .opencode/skills/pr-maintenance-loop in your project.

What does PR Maintenance Loop need to run?

Going by SKILL.md and its folder, PR Maintenance Loop 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 PR Maintenance Loop 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 PR Maintenance Loop 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PR Maintenance Loop use?

PR Maintenance Loop is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Maintenance Loop use?

About 1.4k tokens (SKILL.md is roughly 5.7k 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 PR Maintenance Loop?

Skills that share tags, products or a category with PR Maintenance Loop: Update Dependencies (alorence/django-modern-rpc, 111 stars), Python Pypi Package Builder (github/awesome-copilot, 40k stars), Obsidian Plugin Release (crafter-station/skills, 112 stars) and Git Hooks (Prorise-cool/Claude-Code-Multi-Agent, 305 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Maintenance Loop?

cloudposse (a GitHub organization) maintains it in cloudposse/atmos, which has 1,396 GitHub stars. The repository holds 70 skills in this directory. The repository was last updated on October 8, 2026.

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