process-dependabot-prs
Skill692 starsChanged 6 days agoApache-2.0View on GitHub
Continuously monitor for open Dependabot PRs, evaluate them against
- Commits and pushes
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-ci-failureSkill
- buildkite-get-resultsSkill
- conversation-doneSkill
- create-newsSkill
- create-prSkill
- merge-prSkill
- monitor-ci-resultsSkill
- retry-ci-jobSkill
- review-codeSkill
- rule-creatorSkill
- sync-git-branch-continuouslySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 6 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
When asked to process, review, triage, or monitor Dependabot pull requests:
- Very specific: line 14
Check Existing Monitor Process: Check if monitor_dependabot_prs.py is already running using pgrep -af "[m]onitor_dependabot_prs.py" as a …
- Distinctive: line 31
When no new or updated open Dependabot PRs exist, the daemon sleeps without waking the agent.
- Very specific: line 48
When gh fails due to invalid or expired credentials, keep the background monitor process running so it automatically resumes if credentials …
- Very specific: line 53
After the user responds, trigger an immediate poll cycle via pkill -USR1 -f "monitor_dependabot_prs.py".
- Distinctive: line 123
Wait for user confirmation before mutating any PR.
- Distinctive: line 130
When closing/skipping a duplicate or superseded PR, close it and post a comment noting which PR supersedes it:
- Distinctive: line 137
If a pure Dependabot PR has merge conflicts after another PR merges, run:
- Very specific: line 149
Gazelle Manifests: Run bazel run //:gazelle_python_manifest.update (and :gazelle_python_manifest_with_types.update if present) in the …
- Very specific: line 152
Constraints & Vendored Files: Update conflicting version pins in *constraints*.txt (e.g., examples/pip_parse/constraints_urllib3.txt, …
- Very specific: line 157
Wheel Overrides & Patches: Update wheel filenames in examples/bzlmod/MODULE.bazel and version/hash/RECORD entries in …
- Very specific: line 160
Test Assertions: Update hardcoded package versions and dist-info lists in examples/pip_parse/test.py, examples/pip_parse/pip_parse_test.py, …
- Very specific: line 164
Verify affected targets pass with bazel test --config=fast-tests ....
- Distinctive: line 165
Commit the fix (never amend or rebase) and push explicitly to upstream:
- Very specific: line 174
Follow merge-pr to enqueue the PR (gh pr merge <pr_number> --repo bazel-contrib/rules_python --auto --squash) and launch a Merge PR …
- Very specific: line 178
When a Merge PR Shepherd reports that a Dependabot PR has merged, trigger an immediate poll (pkill -USR1 -f "monitor_dependabot_prs.py") so …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
@.agents/rules/lockfiles.md
When asked to process, review, triage, or monitor Dependabot pull requests:
1. Start Continuous Background Monitor
- Check Existing Monitor Process: Check if
monitor_dependabot_prs.pyis already running usingpgrep -af "[m]onitor_dependabot_prs.py"as a standalone command (do NOT chain it with|| ... monitor_dependabot_prs.pyin a single shell invocation, aspgrep -afwill match the parentbash -ccommand string). - Launch Monitor Daemon: If no monitor process is active, start it via
run_commandwithIsDaemon: trueandWaitMsBeforeAsync: 500(do NOT append a trailing&, which causes the shell to exit immediately and kills the background process):./.agents/skills/process-dependabot-prs/scripts/monitor_dependabot_prs.py \ "<your_conversation_id>" - Continuous Wakeup Loop:
monitor_dependabot_prs.pypolls GitHub once every 5 hours (--interval) and tracks each open Dependabot PR's(headRefOid, conflict_status)inscratch/monitored_dependabot_prs.jsonunder the skill directory.- When no new or updated open Dependabot PRs exist, the daemon sleeps without waking the agent.
- Whenever a new Dependabot PR opens, an existing PR is rebased/recreated
with a new commit SHA (
headRefOid), or an open PR becomesCONFLICTING/DIRTYafter another PR merges, the daemon sends a notification viaagentapi send-messageto wake the conversation. - Upon starting the daemon—and on every wakeup notification from the daemon—execute Steps 2–5 below for any newly discovered or updated open Dependabot PRs.
- Immediate Poll Trigger (
SIGUSR1):- Trigger an immediate poll cycle at any time (for example, right after a
Merge PR Shepherdfinishes merging an approved Dependabot PR or after refreshing credentials):pkill -USR1 -f "monitor_dependabot_prs.py"
- Trigger an immediate poll cycle at any time (for example, right after a
- Authentication Failures:
- When
ghfails due to invalid or expired credentials, keep the background monitor process running so it automatically resumes if credentials are refreshed incidentally. - Prompt the user via
ask_questionso a UI popup alerts them to re-authenticate. - After the user responds, trigger an immediate poll cycle via
pkill -USR1 -f "monitor_dependabot_prs.py".
- When
2. Discover and Inspect Open Dependabot PRs
- Query open Dependabot PRs:
gh pr list --repo bazel-contrib/rules_python --author "app/dependabot" \ --state open --json number,title,url,headRefName,headRefOid,mergeable \ --json mergeStateStatus,statusCheckRollup,files,labels,body,comments \ --json reviews - For each new or updated open PR, inspect the diff (
gh pr diff <number> --repo bazel-contrib/rules_python) and check statuses (Buildkite, ReadTheDocs, and GitHub Actions).
3. Evaluate Against Criteria (OK vs. Problematic)
Classify each PR as OK, OK (with trivial fixes), or Problematic:
OK (Safe to Approve and Merge)
- Routine Patch/Minor Bumps: Semver-patch or semver-minor updates to
/tools/publish,/docs,dev/,sphinxdocs/dev/,examples/,gazelle/examples/,tests/, or.github/workflows/. - Grouped Security Updates:
piporuvgroup updates confined to version pins, hashes, and expected lockfile metadata. - Compatible Major Bumps: Semver-major updates to isolated CI Actions or leaf tooling dependencies where release notes show no breaking changes to repository usage and CI passes.
- Trivial Synchronization Failures Only: CI fails solely due to stale derived files or hardcoded version assertions covered in Step 5.
Problematic (Flag for User Attention)
- Duplicate or Superseded PRs: Overlapping
pipanduvgroup PRs modifying the same*requirements*.txtfiles, or PRs where Dependabot commented that the update is no longer needed. - Python Version Incompatibility: Updates that drop support for a Python
version still targeted by the affected lockfile (e.g.,
3.10inrequirements_lock_3_10.txt), or PRs where Dependabot reports an unsupported Python version. - Lockfile Corruption: Diffs that strip platform markers, remove
Windows-only dependencies (e.g.,
coloramainrequirements_windows*.txt), or introduce unexpected transitive dependency churn. - Non-Trivial CI or API Breakages: Core
rules_pythontest failures, Sphinx/ReadTheDocs build breakages from incompatible plugin changes, or breaking CLI/API changes in invoked tools. - Suspicious Releases: Upstream repository URL changes, yanked versions, or release notes indicating known regressions.
4. Notify User and Request Confirmation
- Create Per-PR Analysis Artifacts: For each evaluated PR, create a
markdown artifact
dependabot-pr-<number>.mdin the conversation artifact directory (UserFacing: true,RequestFeedback: false) containing:- PR number, title, URL, and affected files
- Diff summary and release notes / changelog highlights
- CI check status and failure root cause (if any)
- Evaluation against criteria (OK, OK (with trivial fixes), or Problematic) and recommended action
- Prompt User via
ask_question: Present one question per PR in a singleask_questioncall:- Include a clickable
file://markdown link to that PR's artifact ([dependabot-pr-<number>.md](file:///.../dependabot-pr-<number>.md)) in thequestiontext. - Provide the following options (prefixing the recommended choice with
(Recommended)and listing it first):Approve & mergeFix & mergeClose/skipManually review
- Include a clickable
- Wait for user confirmation before mutating any PR.
5. Fix Trivial Failures and Merge Approved PRs
Once the user confirms:
- Close Duplicate or Superseded PRs:
- When closing/skipping a duplicate or superseded PR, close it and post a
comment noting which PR supersedes it:
gh pr close <pr_number> --repo bazel-contrib/rules_python \ --comment "Superseded by #<superseding_pr_number>."
- When closing/skipping a duplicate or superseded PR, close it and post a
comment noting which PR supersedes it:
- Handle Conflicts or Stale Branches:
- If a pure Dependabot PR has merge conflicts after another PR merges, run:
gh pr comment <pr_number> --repo bazel-contrib/rules_python \ --body "@dependabot recreate"
- If a pure Dependabot PR has merge conflicts after another PR merges, run:
- Fix Trivial Failures (When Needed):
- Fetch and check out the PR branch:
git fetch upstream <headRefName> git checkout -B <headRefName> upstream/<headRefName> - Apply synchronization fixes per
@.agents/rules/lockfiles.md:- Gazelle Manifests: Run
bazel run //:gazelle_python_manifest.update(and:gazelle_python_manifest_with_types.updateif present) in the affected example workspace. - Constraints & Vendored Files: Update conflicting version pins in
*constraints*.txt(e.g.,examples/pip_parse/constraints_urllib3.txt,tests/uv/lock/testdata/constraints.txt),examples/pip_parse_vendored/requirements.bzl, andtests/uv/lock/testdata/requirements*.txt. - Wheel Overrides & Patches: Update wheel filenames in
examples/bzlmod/MODULE.bazeland version/hash/RECORD entries inexamples/bzlmod/patches/*.patch. - Test Assertions: Update hardcoded package versions and
dist-infolists inexamples/pip_parse/test.py,examples/pip_parse/pip_parse_test.py, andexamples/bzlmod/whl_mods/pip_whl_mods_test.py.
- Gazelle Manifests: Run
- Verify affected targets pass with
bazel test --config=fast-tests .... - Commit the fix (never amend or rebase) and push explicitly to upstream:
git push upstream HEAD:<headRefName>
- Fetch and check out the PR branch:
- Approve the PR:
gh pr review <pr_number> --repo bazel-contrib/rules_python --approve - Merge Using
merge-pr:- Follow merge-pr to enqueue the PR (
gh pr merge <pr_number> --repo bazel-contrib/rules_python --auto --squash) and launch aMerge PR Shepherdsubagent to monitor CI, retry flakes, and track the merge queue to completion. - When a
Merge PR Shepherdreports that a Dependabot PR has merged, trigger an immediate poll (pkill -USR1 -f "monitor_dependabot_prs.py") so any remaining open Dependabot PRs that became conflicting are detected and recreated right away.
- Follow merge-pr to enqueue the PR (
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

