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
This commit is contained in:
Paul O'Reilly
2026-07-17 21:22:36 +12:00
parent 1b62c256f6
commit a71959c1c6
2 changed files with 129 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ name: ask-minimax-with-context
description: > description: >
Walk CONTEXT.md and CLAUDE.md files from a folder up to the git root, assemble them into 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 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 <folder-path> <question> Usage: /ask-minimax-with-context <folder-path> <question>
user_invocable: true user_invocable: true
allowed-tools: Read, Write, Bash(ask-minimax-run *), Bash(date *), Bash(rm -f *), Bash(test *), Bash(pwd), Bash(bash *) 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 ```bash
ask-minimax-run \ ask-minimax-run \
--model MiniMax-M2.7 \ --model MiniMax-M3 \
--allowedTools "Read,Write" \ --allowedTools "Read,Write" \
--dangerously-skip-permissions \ --dangerously-skip-permissions \
-p "$(cat /tmp/ask-minimax-TS-prompt.txt)" \ -p "$(cat /tmp/ask-minimax-TS-prompt.txt)" \

127
skills/ask-minimax/SKILL.md Normal file
View File

@@ -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)
---
<command-name>ask-minimax</command-name>
# /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-<TS>-prompt.txt`, `/tmp/ask-minimax-<TS>-result.md`, `/tmp/ask-minimax-<TS>-stdout.txt`.
### Step 3 — Write the prompt file
Use the Write tool to create `/tmp/ask-minimax-<TS>-prompt.txt`. Substitute `<TS>` 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
<task description from the user>
## Files to read
<list each absolute file path on its own line>
## Output file
Write your complete response to: /tmp/ask-minimax-<TS>-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 `<TS>` 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-<TS>-prompt.txt)" \
> /tmp/ask-minimax-<TS>-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-<TS>-result.md` using the Read tool
2. If not found: read `/tmp/ask-minimax-<TS>-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-<TS>-prompt.txt /tmp/ask-minimax-<TS>-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