pr-maintenance-loop

A scheduled hourly loop for maintaining the current Git branch's pull request, a proposed code change for review.

In plain words
What is it for?
Use it when you want local, session-only automation to work toward a merge-ready pull request using the existing Git and GitHub command-line login.
Why use it?
It repeatedly checks and repairs issues such as outdated branches, review threads, failed checks, lint errors, tests, coverage, and code-hygiene findings while the session is idle.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cloudposse/atmos/pr-maintenance-loop
Any agent
npx skills add cloudposse/atmos --skill pr-maintenance-loop
Clone the repo
git clone --depth 1 https://github.com/cloudposse/atmos

Made for: Claude Code, Codex.

Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00123 $0.01416
Opus 5 $0.00062 $0.00708
Sonnet 5 $0.00025 $0.00283
Haiku 4.5 $0.00012 $0.00142

Measured 3d ago against content hash c89db81fad30, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-maintenance-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/gh-resolve-review-thread.sh, scripts/list-failing-checks.sh, scripts/list-review-threads.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/pr-maintenance-loop/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 96 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 96 lines · 123 tokens per session scan A c89db81fad30

Subscribe to this mod's changes

pr-maintenance-loop is a skill published in the GitHub repository cloudposse/atmos (1,367 stars, last pushed today), licensed Apache-2.0. It adds 123 tokens to every session and 1,416 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens

python-development

Coding standards, conventions, and patterns for developing Python code in the Agent Framework repository. Use this when writing or modifying Python source files in the python/ directory.

microsoft/agent-framework · 35 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens

reflect

Review recent work, find repeated workflow patterns, and suggest reusable skills, agents, commands, config changes, or playbooks. Use when the user asks to learn from past sessions, improve recurring workflows, or identify what should be turned into reusable agent instructions.

alvinunreal/oh-my-opencode-slim · 53 tokens

codemap

Generate comprehensive hierarchical codemaps for UNFAMILIAR repositories. Expensive operation - only use when explicitly asked for codebase documentation or initial repository mapping.

alvinunreal/oh-my-opencode-slim · 34 tokens

length-converter

Convert between common length units (miles, km, feet, meters) using a multiplication factor.

microsoft/agent-framework · 24 tokens