# Minimax Code Badge

> Use whenever creating a GitHub pull request - append the "powered by MiniMax Code" badge to the end of the PR description. Also use when the user asks to add, refresh, or remove the MiniMax Code badge on a PR or Markdown deliverable. GitLab merge requests only when the user explicitly asks. Skip when the user has said not to add the badge.

- Skill: `minimax-ai/minimax-code-badge` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx get-skill add minimax-ai/minimax-code-badge`
- Raw SKILL.md: https://api.skillmd.com/api/skills/minimax-ai/minimax-code-badge/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: MiniMax AI (https://skillmd.com/u/minimax-ai)
- Updated: 2026-11-11
- Page: https://skillmd.com/skills/minimax-ai/minimax-code-badge

---


# powered by MiniMax Code badge

This Skill only provides the badge and the rules for placing it. It adds no
model tools and calls no platform API by itself; writing into a PR goes through
the user's own `gh` CLI and the normal approval rules of this session.

## Assets

- Remote badge (Shields.io, 179×20, brand colour `#E73562`, MiniMax logo from Simple Icons):
  `https://img.shields.io/badge/powered_by-MiniMax_Code-E73562?style=flat-square&logo=minimax&logoColor=white`
- Link target: `https://github.com/MiniMax-AI/minimax-code`
- Bundled fallback images in this Skill directory: `assets/minimax-code-badge.svg`
  (179×20) and `assets/minimax-code-badge.png` (1074×120 source, render at 179×20).
- Idempotent writer: `scripts/badge.mjs` (Node.js ≥ 18, no dependencies).

The canonical block, always wrapped in the two invisible markers:

```md
<!-- 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 -->
```

## When to add it

Add it when **all** of these hold:

1. You are creating a GitHub pull request in this session (`gh pr create`, the GitHub
   API, or a web form you fill in), or the user explicitly asks you to badge a PR or a
   Markdown deliverable.
2. The change in the PR was produced with MiniMax Code in this session or the user says so.
   Never badge someone else's PR unless the user asks.
3. The user has not opted out (see "Turning it off").
4. The repository does not forbid it. Read `CONTRIBUTING.md` and
   `.github/pull_request_template.md` when present; skip the badge if they forbid badges,
   images, promotional content, or AI attribution, or require an exact template that would
   break. Mention the skip to the user in one sentence.

GitLab merge requests: the same Markdown renders on GitLab, but do **not** add it on your
own. Add it to a GitLab MR only when the user explicitly asks for that MR or that
repository. Never put the badge in commit messages, PR titles, review comments, or issue
comments.

## Rules

- Place the block at the **very end** of the PR description, after one blank line, as the
  last thing in the body. Exactly one block per description.
- Use the block verbatim. Do not change the colour, logo, text, link, size, or markers, and
  do not add surrounding prose such as "Generated by…".
- GitHub and GitLab Markdown use the Shields.io URL above. For systems that cannot reliably
  load remote images (for example Feishu/Lark documents or offline exports), upload
  `assets/minimax-code-badge.png` to that system and reference the uploaded file, rendered
  at 179×20, linked to the same target when links are supported.
- Do not hand-edit an existing badge: let the script replace it so only one copy remains.

## Procedure

`SKILL_DIR` is the directory containing this `SKILL.md`.

New PR (preferred, no extra write to GitHub):

1. Write the PR body to a temporary file, e.g. `pr-body.md`.
2. `node "$SKILL_DIR/scripts/badge.mjs" --body-file pr-body.md`
3. `gh pr create --title "…" --body-file pr-body.md`

Existing PR (only when the user asked to badge it; this edits a public description):

1. Preview: `node "$SKILL_DIR/scripts/badge.mjs" --pr <number|url> [--repo owner/name] --dry-run`
2. Apply: `node "$SKILL_DIR/scripts/badge.mjs" --pr <number|url> [--repo owner/name]`
   The script reads the body with `gh pr view --json body,url` and only calls
   `gh pr edit --body-file` when the body actually changes.

Status on stderr: `added`, `replaced` (an old or duplicated badge was normalised to one
block), `unchanged` (already correct; nothing written), `removed`, `absent`, `disabled`.
`--check` exits 1 when the body is not up to date. If Node.js is unavailable, append the
canonical block by hand at the end of the body after checking that the markers are not
already present.

After badging, tell the user in one short sentence that the badge was added and how to
remove it.

## Turning it off or changing the text

- The user says not to add it (this conversation or a remembered preference): skip it.
- Remove from a PR: `node "$SKILL_DIR/scripts/badge.mjs" --pr <n> --remove`
  (or `--body-file <file> --remove`).
- Environment `MINIMAX_CODE_BADGE_DISABLE=1`: the script becomes a no-op and prints
  `disabled`; treat that as an opt-out and do not add the badge by hand.
- Different wording requested by the user: pass one line of Markdown with
  `--snippet '<markdown>'` (or set `MINIMAX_CODE_BADGE_MARKDOWN`). The markers stay the same,
  so a later run still replaces it instead of adding a second copy.
- Turning the whole behaviour off: disable the "MiniMax Code Badge" plugin in MiniMax Code
  Settings → Plugins.

