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
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a claude-codeWhat 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-prand 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-prand 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-code2Manually: put the files in place
~/.claude/skills/ds-watch-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ds-watch-pr/
1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a codex2Manually: put the files in place
.agents/skills/ds-watch-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a cursor2Manually: put the files in place
.cursor/skills/ds-watch-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aicodeking/deepseek-stack skills/ds-watch-pr2Manually: put the files in place
.github/skills/ds-watch-pr/SKILL.md1Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/aicodeking/deepseek-stack --path skills/ds-watch-prManually: put the files in place
.devin/skills/ds-watch-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-watch-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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