mpt-ext-task-open-pull-request
Skill3 starsChanged 24 days agoApache-2.0View on GitHub
Only open or update a repository-compliant pull request to publish committed work, reusing the existing PR instead of duplicating. Does not update docs, run checks, or transition Jira.
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-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-fix-dependabot-prsSkill
- 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
19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Create or update a repository-compliant pull request for committed work.
- Distinctive: line 45
Read repository-specific docs when they exist, because they may extend or override shared guidance.
- Very specific: line 46
Read shared docs only when the repository explicitly points to them.
- Very specific: line 51
Use mpt-ext-tool-gh-pr-ops to check whether a PR already exists for the branch.
- Distinctive: line 53
Read PR rules before mutation.
- Distinctive: line 54
Use repository PR rules from repo docs first.
- Very specific: line 55
When the repository relies on this shared package standard for PR formatting, read standards/pull-requests.md using the shared-doc …
- Distinctive: line 67
Create or update the PR.
- Very specific: line 68
If no PR exists for the branch, create a new PR through mpt-ext-tool-gh-pr-ops, which sets the complete description at creation (or uses …
- Distinctive: line 69
If a PR already exists for the branch, update the existing PR instead of creating a duplicate.
- Very specific: line 75
When the Jira issue key is available, try to resolve the Jira site through acli jira auth status and build the Jira item URL as …
- Distinctive: line 77
Use the bundled deterministic script to render the compact user-facing output after successful PR creation or update:
- Distinctive: line 87
If the Jira item URL is not available safely, omit that line instead of inventing it.
- Very specific: line 88
If acli jira auth status does not return a reliable site value, omit the Jira: line instead of inventing it.
- Distinctive: line 93
Never create a duplicate PR when one already exists for the branch.
- Very specific: line 94
Never open a PR with a placeholder body and fill it in later.
- Distinctive: line 95
Never invent PR formatting rules.
- Distinctive: line 96
Never mix commit creation, branch creation, or Jira transitions into this task.
- Distinctive: line 97
Never silently choose the wrong base branch when repo context or user intent is ambiguous.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Open Pull Request
Purpose
Create or update a repository-compliant pull request for committed work.
Use When
- The user wants to open a pull request for the current branch.
- The user wants to update the title or description of an existing pull request.
- The task requires applying repository PR rules before publishing work for review.
- The branch already contains the intended committed changes.
Do Not Use When
- The task is to create or switch branches.
- The task is to create the commit itself.
- The task is to transition Jira issue state.
- The task is to handle review comments after the pull request already exists.
Inputs
- Current branch or explicit head branch.
- Optional explicit base branch.
- Optional Jira issue key for the work being published.
- GitHub authentication that can read and create or edit pull requests for the target repository.
- Local Git checkout and network access needed for the repository-supported GitHub tooling.
- Jira authentication is required only when the task must emit a Jira item URL from
acli jira auth status. - Repository PR rules from repo docs and shared standards.
- Installed shared package root:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/currentWorkflow
- 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. Resolve those shared docs from
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/currentwhen available; otherwise read them from themainbranch of the shared GitHub repository.
- Resolve the target PR context.
- Determine the current repository and head branch.
- Determine the intended base branch from repo context or user direction.
- Use
mpt-ext-tool-gh-pr-opsto check whether a PR already exists for the branch.
- Read PR rules before mutation.
- Use repository PR rules from repo docs first.
- When the repository relies on this shared package standard for PR formatting, read
standards/pull-requests.mdusing the shared-doc resolution rule from the repository context step, and use it as the source of truth. - Build the complete PR title and description before creating the PR. Follow
standards/pull-requests.mdfor the description-at-creation rule and the AI-generated warning line;mpt-ext-tool-gh-pr-opssets them atomically. - Render the title deterministically with the bundled
render_pr_title.pyso the Jira key, the summary, and any[HF]/[BACKPORT]marker match what the shared Danger action enforces:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_pr_title.py" \
--jira-key MPT-1234 \
--summary "<short summary>" \
--kind feature \
--base-branch main- Create or update the PR.
- If no PR exists for the branch, create a new PR through
mpt-ext-tool-gh-pr-ops, which sets the complete description at creation (or uses the draft-then-ready flow when it cannot be finalized yet). - If a PR already exists for the branch, update the existing PR instead of creating a duplicate.
- Report the result clearly.
- Show whether the PR was created or updated.
- Show the PR title.
- Show the PR URL.
- When the Jira issue key is available, try to resolve the Jira site through
acli jira auth statusand build the Jira item URL ashttps://<site>/browse/<issue-key>. - Include testing status in the user-facing result message.
- Use the bundled deterministic script to render the compact user-facing output after successful PR creation or update:
python3 "${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_result.py" \
--pr-url "<pr-url>" \
--jira-site "<site-from-acli-jira-auth-status>" \
--jira-key MPT-1234 \
--testing "<testing-status>"- If the Jira item URL is not available safely, omit that line instead of inventing it.
- If
acli jira auth statusdoes not return a reliable site value, omit theJira:line instead of inventing it. - Show blockers clearly when auth, permissions, missing branch context, or GitHub API failures prevent the operation.
Guardrails
- Never create a duplicate PR when one already exists for the branch.
- Never open a PR with a placeholder body and fill it in later; rely on
mpt-ext-tool-gh-pr-opsandstandards/pull-requests.mdfor the description-at-creation and draft-then-ready flow. - Never invent PR formatting rules; read repository context first.
- Never mix commit creation, branch creation, or Jira transitions into this task.
- Never silently choose the wrong base branch when repo context or user intent is ambiguous.
Bundled Resources
scripts/render_result.py- Inputs: PR URL, testing status, optional Jira site, and optional Jira key
- Output: compact user-facing
PR, optionalJira, andTestinglines - Runtime path:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_result.py
scripts/render_pr_title.py- Inputs:
--jira-key,--summary,--kind {feature,bugfix,hotfix,backport}(defaultfeature),--base-branch(defaultmain), optional--json - Output: the PR title
[MARKER ]<JIRA-ID> <summary>; validates the Jira key and rejects a Conventional Commit prefix in the summary; adds[HF]/[BACKPORT]only for release-branch PRs - Runtime path:
${MPT_EXTENSION_SKILLS_HOME:-$HOME/.mpt-extension-skills}/current/skills/mpt-ext-task-open-pull-request/scripts/render_pr_title.py
- Inputs:
Expected Outcome
The current branch has a repository-compliant pull request that was either created or updated successfully, or the task stops with a clear blocker that explains what must be fixed before the PR can be opened.
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.

