Walks CONTEXT.md and CLAUDE.md files from a given folder up to the git root, assembles them into a context bundle via shell redirects (file contents never enter the calling session), then delegates a one-line question to MiniMax M2.7. Token cost to the main session: paths only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
1.5 KiB
Markdown
36 lines
1.5 KiB
Markdown
# Skill: ask-minimax-with-context
|
|
|
|
## Purpose
|
|
|
|
Delegate a focused question to MiniMax M2.7 with automatically gathered project context, without loading any file contents into the current session.
|
|
|
|
## Usage
|
|
|
|
```
|
|
/ask-minimax-with-context <folder-path> <question>
|
|
```
|
|
|
|
Example: `/ask-minimax-with-context octopus/staging/ Has build 1.4.202 been deployed?`
|
|
|
|
## How It Works
|
|
|
|
1. Parses args: first token = folder path, rest = question
|
|
2. Walks from the given folder up to the git root collecting `CONTEXT.md` and `CLAUDE.md` at each level (deepest-first)
|
|
3. Assembles a context bundle at `/tmp/ask-minimax-ctx-<TS>.md` via shell redirects — file contents never enter the calling session's context
|
|
4. Writes a prompt file telling MiniMax to read the bundle and answer the question
|
|
5. Runs `ask-minimax-run` (MiniMax M2.7, read+write tools only)
|
|
6. Reads the result file and summarises concisely
|
|
7. Cleans up temp files (keeps result file)
|
|
|
|
## When to Use
|
|
|
|
- Any question where the answer lives in CONTEXT.md or CLAUDE.md files in a project tree
|
|
- Even simple questions — overhead is one line from the user, context savings are real
|
|
- Alternative to loading large context hierarchies into the main session just to answer a single question
|
|
|
|
## Gotchas
|
|
|
|
- Path must resolve to a directory that is inside a git repo (used to find the walk ceiling)
|
|
- If no CONTEXT.md or CLAUDE.md files are found, the skill warns and asks whether to proceed with the question only
|
|
- Requires the MiniMax profile at `~/.claude-oreillyit-minimax/provider.env`
|