Skip to main content
skill CX Codex

ds-watch-pr — Claude Code skill: what it does, how to install

ds-watch-pr is a Claude Code skill that follows a pull request through CI and review, fixes real findings, and stops when it is ready, merged, or blocked.

MIT 536 installs ★ 320 updated 2026-10-28

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a claude-code
Open on GitHub

What ds-watch-pr does

The ds-watch-pr skill keeps one pull request moving through CI checks and review. It reports new failures, completed checks, comments, and reviews, then lets the agent inspect each event. The run ends when the PR is ready, merged, or blocked.

The skill includes scripts/watch_pr.py, which must be called by absolute path with python3. A logged-in gh is required. For a real bug or CI failure, the agent reads the source, makes the smallest fix, runs the failing check locally, pushes the change, and starts the watcher again. Five fix-and-push cycles without a successful stop produce a report of what remains.

It separates infrastructure flakes from real test failures by retrying a flake once. When the branch falls behind, it rebases and pushes with --force-with-lease; after a rate limit, it checks gh api rate_limit and waits for the reset once.

What it helps with

  • track one PR until checks and review are complete
  • handle new CI failures and review comments
  • fix real findings and push the resulting changes
  • separate a flaky check from a real test failure
  • detect when a branch is BEHIND or DIRTY

Example prompts for the agent

  • Run /ds-watch-pr and watch this PR until its checks are green and review is complete.
  • Watch the PR through CI and review, fixing real failures as they appear.
  • Run /ds-watch-pr and stop if the PR is blocked or made obsolete by another PR.

How to install ds-watch-pr

1Skills CLI (Vercel)

npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a claude-code

2Manually: put the files in place

~/.claude/skills/ds-watch-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ds-watch-pr/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ds-watch-pr

How do I install ds-watch-pr in Claude Code?

Run npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a claude-code, then use ~/.claude/skills/ds-watch-pr/SKILL.md.

What does ds-watch-pr do?

The skill monitors CI and review activity for one pull request, reports new events, and helps handle real findings. It stops when the PR is ready, merged, or blocked.

What does ds-watch-pr need to run?

It needs python3 and an authenticated gh session. The watcher script is scripts/watch_pr.py and must be called by absolute path.

Source text

SKILL.md · MIT
---
name: ds-watch-pr
description: "Watches a pull request through CI and review, fixes real findings and stops when it is ready, merged or blocked. Use when the user asks to watch, monitor or babysit a PR, or /ds-watch-pr."
---

Keep one PR moving until it is green and reviewed, with as little noise as possible.

The watcher is `scripts/watch_pr.py` in this skill's folder. Call it by absolute path. It needs `python3` and a logged-in `gh`.

```bash
python3 <skill>/scripts/watch_pr.py <pr> [--repo owner/name] [--until ready|green|any] [--interval 30] [--max-minutes 60]
```

It prints one line per new check failure, finished check run, comment or review, then a final `stop:` line. Exit 0 means the condition is met or the PR merged. Exit 1 means you must act. Exit 2 means bad input. `ready` waits for green checks, a mergeable branch and no change request. `green` waits for checks only.

## Steps

1. Handle what already exists: failed checks and comments newer than the last push.
2. Start the watcher. Run it in the harness's background or monitor tool if it has one, so each line wakes you. Otherwise run it as one long foreground command.
3. On each event, read the source before you change code. Decide if the finding is real.
4. For a real bug or CI failure: make the smallest fix, run the failing check locally, push, then restart the watcher.
5. For a false positive or out-of-scope request: reply with a short reason through `ds-pr-comments`, resolve the thread and list it as a follow-up.
6. Tell real test failures apart from infrastructure flakes. Re-run a flake once before you call it a flake.
7. If the base branch moved or the branch is behind, rebase, push with `--force-with-lease` and restart.
8. Before you call the PR ready, `git fetch` and read the PR again. It must not be BEHIND or DIRTY.

## Stop when

- The watcher exits 0. Report the PR as ready, or merged.
- Five fix-and-push cycles pass without exit 0. Report what still fails.
- Another PR makes this one obsolete. Stop and ask before closing it.
- `gh` reports a rate limit. Check `gh api rate_limit` and wait for the reset once. Do not loop.

## Rules

- One watcher per PR. Never write your own sleep or polling loop.
- When an event needs no action, say nothing. No "still waiting" messages.
- Merge only if the user asked for it. Otherwise report ready.
- Keep the PR small. Prefer fixes that delete or narrow code.

© aicodeking · MIT · aicodeking/deepseek-stack

Similar skills

SKILL.md skills catalog →

From the same set29

The whole set →
ds-catchup ds-catchup — a skill for Claude Code summarizes changes since the last message and lists decisions awaiting the user's input. It runs when someone returns after a long pause or asks what happened. CX Codex +1 540installs ds-jury The ds-jury Claude Code skill gathers independent reviews of a code change from several models. The agent works through accepted findings and runs another review round until the reviewers agree. CX Codex +1 539installs ds-best-of-n The ds-best-of-n Claude Code skill creates several independent versions of a task and combines the strongest result with selected parts from the others. It runs for substantial work where a single attempt may take the wrong direction. CX Codex +1 539installs ds-swarm Claude Code skill splits broad tasks across parallel workers and merges their verified outputs into a single report. Triggers on /ds-swarm during audits or multi-branch races. CX Codex +1 537installs ds-adopt ds-adopt — a Claude Code skill takes over an existing PR, branch, or agent thread and completes its original goal. It activates when asked to adopt or finish someone else’s work. CX Codex +1 534installs ds-ready ds-ready is a Claude Code skill that automates the delivery workflow through opening a pull request, then stops before merging. CX Codex +1 534installs ds-revive The ds-revive Claude Code skill checks whether an old PR still fits the current code. When asked to refresh or revive one, it recommends a rebase, a rewrite, or closure. CX Codex +1 534installs ds-pr ds-pr — a skill for Claude Code and other platforms that files a concise pull request for the current branch when asked to open a PR. CX Codex +1 534installs

Project sponsors

Companies that keep this analytics open