From a71959c1c623d936b1588e3d5cf7c63fdb673cca Mon Sep 17 00:00:00 2001 From: Paul O'Reilly Date: Fri, 17 Jul 2026 21:22:36 +1200 Subject: [PATCH] feat: upgrade ask-minimax skills from MiniMax-M2.7 to M3 M3 is now available on both api.minimax.io and api.minimaxi.chat and has been verified working. Bump --model flag and all prose references in both skills. Claude-Session: https://claude.ai/code/session_01XtWRazqRbMnMRa4iV3zbVx --- skills/ask-minimax-with-context/SKILL.md | 4 +- skills/ask-minimax/SKILL.md | 127 +++++++++++++++++++++++ 2 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 skills/ask-minimax/SKILL.md diff --git a/skills/ask-minimax-with-context/SKILL.md b/skills/ask-minimax-with-context/SKILL.md index d686fbe..7357b20 100644 --- a/skills/ask-minimax-with-context/SKILL.md +++ b/skills/ask-minimax-with-context/SKILL.md @@ -3,7 +3,7 @@ name: ask-minimax-with-context description: > Walk CONTEXT.md and CLAUDE.md files from a folder up to the git root, assemble them into a context bundle via shell redirects (contents never enter this session), then delegate a - one-line question to MiniMax. Saves context and Anthropic tokens even for simple questions. + one-line question to MiniMax M3. Saves context and Anthropic tokens even for simple questions. Usage: /ask-minimax-with-context user_invocable: true allowed-tools: Read, Write, Bash(ask-minimax-run *), Bash(date *), Bash(rm -f *), Bash(test *), Bash(pwd), Bash(bash *) @@ -145,7 +145,7 @@ Substitute `TS` with the actual timestamp integer before running: ```bash ask-minimax-run \ - --model MiniMax-M2.7 \ + --model MiniMax-M3 \ --allowedTools "Read,Write" \ --dangerously-skip-permissions \ -p "$(cat /tmp/ask-minimax-TS-prompt.txt)" \ diff --git a/skills/ask-minimax/SKILL.md b/skills/ask-minimax/SKILL.md new file mode 100644 index 0000000..0e025c1 --- /dev/null +++ b/skills/ask-minimax/SKILL.md @@ -0,0 +1,127 @@ +--- +name: ask-minimax +description: > + Delegate a file-heavy task to a MiniMax M3 sub-session. The sub-session reads and + writes files directly; only a concise result returns to this session. Saves context and + Anthropic tokens. Pass a task description as arguments, or run without args to be prompted. +user_invocable: true +allowed-tools: Read, Write, Bash(ask-minimax-run *), Bash(date *), Bash(rm -f *), Bash(test *), Bash(pwd) +--- + +ask-minimax + +# /ask-minimax Skill + +Offload a file-heavy task to a MiniMax M3 sub-session. Large file contents stay out of this session — only the task prompt and a concise result summary flow back. + +## Pre-gathered context + +### Current date +!`date +%Y-%m-%d` + +## Instructions + +**Goal:** Run a scoped task in MiniMax so its file reads and writes never load into this context. You write a prompt file, invoke the sub-session, read the result file, and summarise. + +### Step 0 — Verify profile readiness + +Run via Bash: + +```bash +test -f ~/.claude-oreillyit-minimax/provider.env && echo "minimax profile: ready" || echo "minimax profile: MISSING" +``` + +If MISSING, tell the user the profile is not configured and stop. + +### Step 1 — Clarify the task + +Use `$ARGUMENTS` as the task description. If empty or incomplete, ask the user: +- What should the sub-session do? (transform, extract, rewrite, summarise, generate?) +- Which file paths should it read? (give absolute paths) +- Where should it write output? (default: `/tmp/ask-minimax-result.md`) +- Any constraints on format, length, or structure? + +Do **not** read the input files yourself — pass paths only. The sub-session reads them. + +### Step 2 — Generate a timestamp + +Run the following via Bash and note the integer value as `TS`: + +```bash +date +%s +``` + +Use `TS` as a suffix on all temp files: `/tmp/ask-minimax--prompt.txt`, `/tmp/ask-minimax--result.md`, `/tmp/ask-minimax--stdout.txt`. + +### Step 3 — Write the prompt file + +Use the Write tool to create `/tmp/ask-minimax--prompt.txt`. Substitute `` with the actual timestamp integer. Structure the content as: + +``` +You are running in non-interactive (-p) mode. Complete the following task and write +your full response to the output file path specified below. Do not rely on stdout for +structured output — use the Write tool. + +## Task + + + +## Files to read + + + +## Output file + +Write your complete response to: /tmp/ask-minimax--result.md + +Use the Write tool to create that file. Overwrite if it already exists. + +## Constraints + +- Read each input file fully before starting +- Write the complete result to the output file +- One-line stdout acknowledgement is fine; bulk content goes in the output file +``` + +Fill in the actual task description, file paths, and timestamp — no placeholders in the written file. + +### Step 4 — Run the sub-session + +Execute via Bash (substitute `` with the actual value): + +```bash +ask-minimax-run \ + --model MiniMax-M3 \ + --allowedTools "Read,Write,Edit,Glob,Grep" \ + --permission-mode acceptEdits \ + -p "$(cat /tmp/ask-minimax--prompt.txt)" \ + > /tmp/ask-minimax--stdout.txt 2>&1 +``` + +This runs synchronously. Warn the user if the task involves very large files — it may take a minute or two. Show the exit code after it completes. + +**Permissions:** do **not** pass `--dangerously-skip-permissions`. The sub-session is scoped by `--allowedTools` — only those tools run without a prompt. `--permission-mode acceptEdits` lets it write/edit files non-interactively within that allowlist without a blanket bypass. In headless `-p` mode any tool **outside** the allowlist is denied (the sub-session continues; it does not hang), so the allowlist is the security boundary — keep it minimal. + +**Adjusting `--allowedTools`**: Default covers read + write tasks. For read-only analysis, use `"Read,Glob,Grep"` (and drop `--permission-mode acceptEdits`). For heavy generation, keep `"Read,Write,Edit,Glob,Grep"`. If a task genuinely needs the sub-session to run commands, add a **scoped** Bash pattern (e.g. `Bash(pytest *)`) to the allowlist rather than reaching for the skip flag. + +### Step 5 — Collect and present results + +1. Read `/tmp/ask-minimax--result.md` using the Read tool +2. If not found: read `/tmp/ask-minimax--stdout.txt` as fallback +3. Present a concise summary to the user — do **not** dump the full file contents into the conversation +4. Tell the user the result file path so they can read it themselves if they want the full output + +### Step 6 — Clean up + +Remove the prompt and stdout temp files (keep the result file): + +```bash +rm -f /tmp/ask-minimax--prompt.txt /tmp/ask-minimax--stdout.txt +``` + +## Usage patterns + +- **Large file transformation**: Pass the source path; sub-session reads, transforms, writes output +- **Multi-file summarisation**: Pass all file paths; get a single consolidated result +- **Bulk generation**: Describe what to write and where; full generated content lands in the result file without touching this context +- **Format conversion**: Pass input path and target format; result file gets the converted content