upstream-pr

A command that creates a prefilled GitHub comparison link for proposing changes from the ako/mxcli fork to the original mendixlabs/mxcli repository.

In plain words
What is it for?
Check changes that are not yet upstream, draft a title and description, and generate a link that opens GitHub's pull-request form with those details filled in.
Why use it?
It prepares the pull-request details when the coding agent cannot create the request directly through GitHub.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mendixlabs/mxcli/upstream-pr
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00555
Opus 5 $0.00009 $0.00278
Sonnet 5 $0.00003 $0.00111
Haiku 4.5 $0.00002 $0.00056

Measured yesterday against content hash b72fe9ea1561, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

upstream-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/mxcli-dev/upstream-pr.md · 52 lines

What it actually says

Generate a prefilled GitHub compare URL that opens a PR merging this fork (ako/mxcli) into the upstream fork (mendixlabs/mxcli).

Why a link instead of opening the PR directly: mendixlabs/mxcli is not in this session's tooling scope, so the PR can't be created via the GitHub API. The compare URL prefills the title and body; the user opens it and clicks "Create pull request".

Steps

  1. Confirm what's actually unmerged upstream. If you have (or can fetch) the upstream base, build the range explicitly:
    git fetch https://github.com/mendixlabs/mxcli main
    git log --no-merges --oneline FETCH_HEAD..HEAD
    
    If the fetch is blocked or unnecessary, fall back to summarising the fork's main since the last sync.
  2. Draft a concise title and a Markdown body grouping the changes by theme (one bullet per finding/fix). Reuse the structure from the last sync PR.
  3. Generate the link with the script — pass the body on stdin so multi-line Markdown encodes cleanly:
    scripts/upstream-pr-link.sh --title "<title>" --body-file - <<'BODY'
    <markdown body>
    BODY
    
    Or let it auto-build the body from commits:
    scripts/upstream-pr-link.sh --commits FETCH_HEAD..HEAD
    
  4. Present to the user:
    • the prefilled compare URL,
    • the title and body as plain text (fallback if the browser trims a long prefilled body).
  5. Remind the user that mendixlabs/mxcli isn't in scope, so this is a link — offer to add_repo and open the PR via API if they'd rather.

Notes

  • Defaults are ako/mxcli:main → mendixlabs/mxcli:main. Override with --fork, --upstream, --base, --head for other syncs.
  • Do not include the model identifier in the title or body.
  • This is a link generator only — it does not push, commit, or open anything.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 52 lines · 17 tokens per session scan A b72fe9ea1561

Subscribe to this mod's changes

upstream-pr is a command published in the GitHub repository mendixlabs/mxcli (115 stars, last pushed 2d ago), licensed Apache-2.0. It adds 17 tokens to every session and 555 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.