Skip to content

Add MiniMax Code Badge plugin: a powered by MiniMax Code badge for GitHub pull requests - #79

Merged
hetaoBackend merged 1 commit into
MiniMax-AI:mainfrom
hetaoBackend:add-minimax-code-badge
Nov 10, 2026
Merged

hetaoBackend merged 1 commit into
MiniMax-AI:mainfrom
hetaoBackend:add-minimax-code-badge

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Adds one new community Plugin: plugins/hetaoBackend/minimax-code-badge.

It appends a small "powered by MiniMax Code" badge to the end of a GitHub pull request description
created with MiniMax Code.

<!-- minimax-code-badge:start -->
[![powered by MiniMax Code](https://img.shields.io/badge/powered_by-MiniMax_Code-E73562?style=flat-square&logo=minimax&logoColor=white)](https://github.com/MiniMax-AI/minimax-code)
<!-- minimax-code-badge:end -->

The badge is one line of Markdown pointing at a Shields.io image, wrapped in two HTML comment
markers that GitHub does not render. The Skill decides when a PR should carry it; a dependency-free
Node.js script writes it idempotently.

User value

A pull request produced with an agent is easy to mistake for hand-written work. This Plugin lets the
agent say which tool produced it, in the one place a reviewer already looks, without adding a bot
comment, an extra notification, or a platform API call.

Example prompts:

Open a GitHub pull request for this branch and add the powered by MiniMax Code badge.
Add the MiniMax Code badge to PR #42 in owner/repo.
Remove the MiniMax Code badge from PR #42.

Expected result: the description keeps all of its original content and gains exactly one badge block
at the very end, separated by one blank line. The markers stay invisible on GitHub. Re-running the
writer reports unchanged and performs no write, so a retried run cannot duplicate the badge.

Usage

# New PR: write the body first, then create the PR
node "$SKILL_DIR/scripts/badge.mjs" --body-file pr-body.md
gh pr create --title "…" --body-file pr-body.md

# Existing PR: preview, then apply
node "$SKILL_DIR/scripts/badge.mjs" --pr 42 --repo owner/name --dry-run
node "$SKILL_DIR/scripts/badge.mjs" --pr 42 --repo owner/name

# Remove, verify, or print
node "$SKILL_DIR/scripts/badge.mjs" --pr 42 --remove
node "$SKILL_DIR/scripts/badge.mjs" --body-file pr-body.md --check
node "$SKILL_DIR/scripts/badge.mjs" --print

Status is printed on stderr: added, replaced, unchanged, removed, absent, or disabled.
--check exits 1 when the body is not up to date. MINIMAX_CODE_BADGE_DISABLE=1 turns the script
into a no-op; MINIMAX_CODE_BADGE_MARKDOWN changes the wording.

Files

plugins/hetaoBackend/minimax-code-badge/
├── plugin.json
├── README.md
├── LICENSE
└── skills/minimax-code-badge/
    ├── SKILL.md
    ├── assets/minimax-code-badge.svg
    ├── assets/minimax-code-badge.png
    └── scripts/
        ├── badge.mjs
        └── badge.test.mjs

Dependencies and supported platforms

  • Node.js 18 or newer for scripts/badge.mjs. No npm dependencies, no build step.
  • The GitHub CLI (gh), already authenticated, only when writing to an existing PR. The local
    body-file mode never calls gh.
  • No account, API key, paid service, or MCP server.
  • macOS, Linux, and Windows. The script is plain Node.js with no platform-specific code.

Network and data behaviour

The Plugin makes no network requests and starts no server. badge.mjs reaches the network only
through the user's own gh CLI when the user asks it to update an existing PR: it reads the current
description with gh pr view --json body,url and writes the new one with gh pr edit --body-file,
using the user's existing GitHub credentials. No credentials are stored, logged, or transmitted, and
there is no telemetry.

The rendered badge image is loaded by the reader's browser from https://img.shields.io when
the PR page is displayed, and links to https://github.com/MiniMax-AI/minimax-code. GitHub serves
such images through its own image proxy, so a reader does not contact Shields.io directly.

The bundled assets/minimax-code-badge.svg and .png are offline copies of the same badge for
documents that cannot load remote images.

Evidence

Validated on a real, public GitHub pull request owned by the author
(hetaoBackend/agentforge#51):

Check Method Result
Badge appears exactly once gh pr view --json body, count markers and img.shields.io 1 and 1
Placement body tail one blank line, then the block, as the last element
Markers correct body readback start/end pair present, block byte-identical to the SKILL.md contract
Idempotent second run with a logging GH_BIN shim status unchanged; shim recorded only gh pr view, zero gh pr edit calls
--check third run ok, exit 0
Image curl the badge URL HTTP 200, content-type: image/svg+xml, 179x20, brand colour #e73562
Link target curl -L HTTP 200
Rest of the description intact diff of the body before and after, with the badge block stripped no differences
Rendering PR page DOM and screenshot badge renders at the end of the description; markers invisible

Repository checks on this branch:

  • node scripts/validate.mjs → OK plugin hetaoBackend/minimax-code-badge, Validated 30 hosted Plugins and all examples.
  • node --test plugins/hetaoBackend/minimax-code-badge/skills/minimax-code-badge/scripts/badge.test.mjs
    → 17 pass, 0 fail. All tests use local fake data; the --pr tests run against a fake gh
    executable that reads and writes a JSON file, so the suite never contacts GitHub.
  • npm run check → 1138 pass, 1 fail. The single failure is
    plugins/antianqi/mcode-island/scripts/test-substep-progress.mjs, a pre-existing PowerShell-only
    test in another contributor's Plugin that needs pwsh on PATH. It is unrelated to this Plugin and
    fails on a clean checkout of main on a machine without PowerShell.

Design notes

The mechanism follows the public DeepSeek Harness badge Skill (@deepseek-ai/dsh-skill-badge): one
Skill instruction, one fixed Markdown block, and bundled images, with no model tools, no platform
API, and no hooks. The idempotent writer is the part this Plugin adds on top of that pattern.

Known limitations

  • Skill activation is model-driven, like the DSH badge Skill, so it is not guaranteed to fire on
    every gh pr create. Running badge.mjs --pr <n> afterwards is the deterministic path.
  • The badge depends on img.shields.io at render time for the primary image. The bundled SVG and
    PNG cover documents that cannot load remote images, but they are not used automatically on GitHub.
  • GitLab merge requests are never badged automatically, by design. The same Markdown renders there,
    but the Skill requires the user to ask for that specific MR.
  • Editing a PR description is a visible change to a public page, so the Skill defers to the session's
    normal approval rules before calling gh pr edit.

Submission checklist

  • Plugin lives at plugins/<github-owner>/<plugin-name>.
  • plugin.json name matches the Plugin directory.
  • README.md includes a real example prompt and expected result.
  • LICENSE and plugin.json declare an open-source license (Apache-2.0).
  • Required executables, accounts, paid services, and supported platforms are disclosed.
  • Network destinations and data handled by the Plugin are disclosed.
  • No credentials, private endpoints, hidden telemetry, installers, symlinks, or native binaries.
  • Every scaffold TODO has been replaced.
  • npm run check passes for this Plugin.

powered by MiniMax Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…r GitHub PRs

Adds plugins/hetaoBackend/minimax-code-badge, a Skill-first Agent Plugin that appends a
"powered by MiniMax Code" badge to the end of GitHub pull request descriptions.

The badge is one line of Markdown pointing at a Shields.io image, wrapped in HTML comment
markers that GitHub does not render. The package ships scripts/badge.mjs, a dependency-free
idempotent writer that adds, refreshes, checks, or removes the badge on a local body file or
on an existing PR through the GitHub CLI, plus bundled SVG and PNG fallbacks and 17 local tests.
@hetaoBackend
hetaoBackend merged commit 0ddb1d4 into MiniMax-AI:main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant