mpt-ext-workflow-fix-dependabot-prs
Skill3 starsChanged 4 months agoApache-2.0View on GitHub
Process open Dependabot PRs end to end: apply the shared dependency policy, validate, and push the fixes back to the same upstream branches for review.
- Deletes or force-pushes
- Commits and pushes
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/mpt-extension-skills.mdcCursor rule
- mpt-ext-task-apply-dashboard-jira-decisionSkill
- mpt-ext-task-commit-changesSkill
- mpt-ext-task-create-initial-epicSkill
- mpt-ext-task-create-work-branchSkill
- mpt-ext-task-dependabot-pr-policy-fixSkill
- mpt-ext-task-ensure-active-sprintSkill
- mpt-ext-task-fix-pre-commit-failuresSkill
- mpt-ext-task-fix-repository-check-failuresSkill
- mpt-ext-task-handle-pr-commentsSkill
- mpt-ext-task-move-jira-to-code-reviewSkill
- mpt-ext-task-move-jira-to-qaSkill
- mpt-ext-task-notify-pr-ready-in-teamsSkill
- mpt-ext-task-open-pull-requestSkill
- mpt-ext-task-run-repository-checksSkill
- mpt-ext-task-start-jira-workSkill
- mpt-ext-task-update-docs-from-changesSkill
- mpt-ext-task-write-documentationSkill
- mpt-ext-task-write-python-unittestsSkill
- mpt-ext-tool-gh-pr-opsSkill
- mpt-ext-tool-git-branch-opsSkill
- mpt-ext-tool-jira-workitem-opsSkill
- mpt-ext-tool-teams-send-messageSkill
- mpt-ext-workflow-address-review-feedbackSkill
- mpt-ext-workflow-complete-after-mergeSkill
- mpt-ext-workflow-dashboard-failure-triageSkill
- mpt-ext-workflow-decompose-tdrSkill
- mpt-ext-workflow-hotfix-backportSkill
- mpt-ext-workflow-notify-pr-readySkill
- mpt-ext-workflow-send-to-reviewSkill
- mpt-ext-workflow-skill-authoringSkill
- mpt-ext-workflow-start-workSkill
- mpt-ext-workflow-update-documentationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 23 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 38
Use these shared documents as the source of truth instead of restating their policy.
- Distinctive: line 52
Read repository-specific docs when they exist, because they may extend or override shared guidance.
- Distinctive: line 53
Read shared docs only when the repository explicitly points to them, using the resolution rule from Shared References.
- Distinctive: line 56
If the user provided a PR number, inspect only that PR.
- Distinctive: line 65
Read and classify each PR before changing anything.
- Distinctive: line 66
Read PR metadata, changed files, and diff.
- Distinctive: line 67
Verify the PR head branch is a Dependabot branch.
- Distinctive: line 68
Verify the changed files are dependency-related before applying this workflow.
- Distinctive: line 69
Use the analyzer bundled with the policy-fix task for repeatable classification:
- Distinctive: line 81
Check out the exact Dependabot branch.
- Distinctive: line 83
Check out the existing Dependabot branch directly.
- Distinctive: line 92
Do not create a new work branch.
- Distinctive: line 96
Keep the task scoped to dependency-policy files and dependency lock refresh.
- Very specific: line 101
If the repository follows the shared validation guidance and uv.lock changed, run make build before make check-all.
- Very specific: line 105
If validation fails, hand the failing output to mpt-ext-task-fix-repository-check-failures once.
- Distinctive: line 111
After staging, check whether there are staged changes before amending:
- Distinctive: line 118
If there are no staged changes, skip git commit --amend --no-edit and git push --force-with-lease, then report the PR as validated with no …
- Distinctive: line 119
If staged changes exist, amend the existing Dependabot commit and push it back to the same upstream branch:
- Distinctive: line 126
Do not create a new PR and do not push to a personal fork.
- Distinctive: line 140
Never process non-Dependabot PRs with this workflow.
- Distinctive: line 141
Never create new branches or pull requests for Dependabot remediation.
- Distinctive: line 142
Never push fixes anywhere except the original Dependabot branch in upstream.
- Very specific: line 143
Never restate or diverge from the dependency-policy rules that mpt-ext-task-dependabot-pr-policy-fix owns (broad pyproject.toml specifiers, …
- Distinctive: line 144
Never continue to amend or push after failed validation unless the failure has been fixed and the required validation flow passes.
- Distinctive: line 145
Never wrap a fix task that already owns its bounded loop in a second retry loop.
- Distinctive: line 146
Never use validation auto-fix as permission to make unrelated product-code changes in a Dependabot PR.
- Distinctive: line 147
Never run repository-required validation steps in parallel when the shared validation workflow requires a sequence.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Fix Dependabot PRs
Purpose
Coordinate the full SoftwareOne Dependabot PR remediation workflow for extension repositories.
Use When
- The user wants to process one or more open Dependabot PRs in a
softwareone-platformextension repository. - Dependabot PRs may need dependency-policy fixes before review or merge.
- The workflow must validate the result and push fixes back to the original upstream Dependabot branches.
- Validation failures may need scoped follow-up fixes before the branch can be published.
Do Not Use When
- The PR is not authored by Dependabot.
- The user wants to bump dependencies manually from a normal feature branch.
- The task is only to apply the dependency policy fix to an already selected PR or checked-out branch.
- The task requires changing shared dependency policy rather than applying it.
- The repository does not follow the shared Python dependency-management and validation workflow.
Inputs
- Target repository under the
softwareone-platformorganization. - Open Dependabot PR number, or permission to process all open Dependabot PRs in the repository.
- GitHub authentication that can read PR metadata and push to Dependabot branches in the upstream repository.
- Local Git checkout of the target upstream repository.
- Repository dependency and validation workflow that follows the shared package guidance.
- Python 3.12 or later is available as
python3for bundled deterministic scripts.
Shared References
Use these shared documents as the source of truth instead of restating their policy. When shared guidance is needed, resolve it from ${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current when available; otherwise read the same path from the main branch of the shared GitHub repository.
standards/packages-and-dependencies.mdknowledge/manage-dependencies.mdknowledge/build-and-checks.mdstandards/pull-requests.mdskills/mpt-ext-task-dependabot-pr-policy-fix/SKILL.mdskills/mpt-ext-task-run-repository-checks/SKILL.mdskills/mpt-ext-task-fix-repository-check-failures/SKILL.md
Workflow
- Build repository context first.
- Read the target repository
AGENTS.mdonce per session. If you already loaded it earlier in this session and still have its full contents, reuse them instead of re-reading; if the context was summarized or you are unsure it is complete, read it again. Do not pre-load shared docs in this step; read them lazily only when the repository points to them. - Read repository-specific docs when they exist, because they may extend or override shared guidance.
- Read shared docs only when the repository explicitly points to them, using the resolution rule from Shared References.
- Find the target Dependabot PRs.
- If the user provided a PR number, inspect only that PR.
- Otherwise list open Dependabot PRs in the upstream repository:
gh pr list --repo softwareone-platform/<repo> --state open --author 'dependabot[bot]' --limit 200 --json number,title,url,headRefName,baseRefName- Collect PR number, title, URL, head branch, and base branch.
- Read and classify each PR before changing anything.
- Read PR metadata, changed files, and diff.
- Verify the PR head branch is a Dependabot branch.
- Verify the changed files are dependency-related before applying this workflow.
- Use the analyzer bundled with the policy-fix task for repeatable classification:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-dependabot-pr-policy-fix/scripts/analyze_dependabot_pr.py" \
--metadata-json pr.json \
--changed-files-json files.json \
--diff-file pr.diff \
--pretty- Skip PRs that are not Dependabot-authored, are not dependency-related, or have no relevant policy signal.
- Check out the exact Dependabot branch.
- Fetch the base and head branches from upstream.
- Check out the existing Dependabot branch directly.
- Rebase the Dependabot branch on the latest base branch before editing:
git fetch origin <base-branch> <head-branch>
git checkout <head-branch>
git pull --rebase origin <base-branch>- Do not create a new work branch.
- Apply dependency-policy fixes.
- Invoke
mpt-ext-task-dependabot-pr-policy-fixfor the selected PR or checked-out Dependabot branch. - Keep the task scoped to dependency-policy files and dependency lock refresh.
- Record changed files and fixed rules for the final report.
- Run repository checks.
- Invoke
mpt-ext-task-run-repository-checksusing the repository-defined validation flow. - If the repository follows the shared validation guidance and
uv.lockchanged, runmake buildbeforemake check-all. - Preserve command output with the command that produced it.
- Fix actionable validation failures.
- If validation fails, hand the failing output to
mpt-ext-task-fix-repository-check-failuresonce; that task owns the bounded fix-and-rerun loop. Do not re-loop it from here. - Constrain the fix scope to failures clearly caused by the Dependabot dependency change, dependency lock refresh, pre-commit pin sync, or validation fallout from those files.
- Act on its returned outcome: continue to publishing only on
fixed; on any other outcome — including failures that are environment-related, unrelated to the Dependabot change, or that need a product or design decision — stop without committing or pushing and record the blocker.
- Amend and push to the same Dependabot branch.
- Stage only files from the recorded changed-file list produced by the policy-fix and validation-fix steps.
- After staging, check whether there are staged changes before amending:
git add <recorded-changed-file>...
git diff --cached --quiet- If there are no staged changes, skip
git commit --amend --no-editandgit push --force-with-lease, then report the PR as validated with no publishable changes. - If staged changes exist, amend the existing Dependabot commit and push it back to the same upstream branch:
git commit --amend --no-edit
git push --force-with-lease origin <head-branch>- Do not create a new PR and do not push to a personal fork.
- Report results.
- Record processed, skipped, fixed, pushed, and blocked PRs.
- Include PR number and URL, status, fixed rules, changed files, validation commands and results, amended commit SHA, push result, and skip or blocker reasons.
- Render the multi-PR report deterministically: collect the per-PR result objects into a JSON file and pass it to the bundled
render_result.pyfor a stable Markdown summary.
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-workflow-fix-dependabot-prs/scripts/render_result.py" \
--results-json results.jsonGuardrails
- Never process non-Dependabot PRs with this workflow.
- Never create new branches or pull requests for Dependabot remediation.
- Never push fixes anywhere except the original Dependabot branch in upstream.
- Never restate or diverge from the dependency-policy rules that
mpt-ext-task-dependabot-pr-policy-fixowns (broadpyproject.tomlspecifiers,opentelemetry-family bumps, opportunistic.pre-commit-config.yamledits); delegate them to that task. - Never continue to amend or push after failed validation unless the failure has been fixed and the required validation flow passes.
- Never wrap a fix task that already owns its bounded loop in a second retry loop; invoke it once per Dependabot PR, consume its classified outcome, and stop on anything other than success.
- Never use validation auto-fix as permission to make unrelated product-code changes in a Dependabot PR.
- Never run repository-required validation steps in parallel when the shared validation workflow requires a sequence.
Expected Outcome
Relevant open Dependabot PRs are fixed in their existing upstream branches, repository-required checks pass, amended Dependabot commits are pushed back for review, and skipped or blocked PRs are reported with precise reasons.
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.

