agentleFS
softwareone-platformsoftwareone-platform/mpt-extension-skills/skills/mpt-ext-task-open-pull-request/SKILL.md

mpt-ext-task-open-pull-request

Skill3 starsChanged 4 months 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.

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
  1. Distinctive:

    Create or update a repository-compliant pull request for committed work.

    line 10
  2. Distinctive:

    Read repository-specific docs when they exist, because they may extend or override shared guidance.

    line 45
  3. Very specific:

    Read shared docs only when the repository explicitly points to them.

    line 46
  4. Very specific:

    Use mpt-ext-tool-gh-pr-ops to check whether a PR already exists for the branch.

    line 51
  5. Distinctive:

    Read PR rules before mutation.

    line 53
  6. Distinctive:

    Use repository PR rules from repo docs first.

    line 54
  7. Very specific:

    When the repository relies on this shared package standard for PR formatting, read standards/pull-requests.md using the shared-doc …

    line 55
  8. Distinctive:

    Create or update the PR.

    line 67
  9. Very specific:

    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 …

    line 68
  10. Distinctive:

    If a PR already exists for the branch, update the existing PR instead of creating a duplicate.

    line 69
  11. Very specific:

    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 …

    line 75
  12. Distinctive:

    Use the bundled deterministic script to render the compact user-facing output after successful PR creation or update:

    line 77
  13. Distinctive:

    If the Jira item URL is not available safely, omit that line instead of inventing it.

    line 87
  14. Very specific:

    If acli jira auth status does not return a reliable site value, omit the Jira: line instead of inventing it.

    line 88
  15. Distinctive:

    Never create a duplicate PR when one already exists for the branch.

    line 93
  16. Very specific:

    Never open a PR with a placeholder body and fill it in later.

    line 94
  17. Distinctive:

    Never invent PR formatting rules.

    line 95
  18. Distinctive:

    Never mix commit creation, branch creation, or Jira transitions into this task.

    line 96
  19. Distinctive:

    Never silently choose the wrong base branch when repo context or user intent is ambiguous.

    line 97

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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}/current

Workflow

  1. Build repository context first.
  • Read the target repository AGENTS.md once 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}/current when available; otherwise read them from the main branch of the shared GitHub repository.
  1. 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-ops to check whether a PR already exists for the branch.
  1. 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.md using 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.md for the description-at-creation rule and the AI-generated warning line; mpt-ext-tool-gh-pr-ops sets them atomically.
  • Render the title deterministically with the bundled render_pr_title.py so 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
  1. 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.
  1. 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 status and build the Jira item URL as https://<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 status does not return a reliable site value, omit the Jira: 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-ops and standards/pull-requests.md for 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, optional Jira, and Testing lines
    • 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} (default feature), --base-branch (default main), 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

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.