Skip to content

Add prompt-enhancer Mini App - #193

Open
skypata wants to merge 1 commit into
MiniMax-AI:mainfrom
skypata:add-prompt-enhancer
Open

skypata wants to merge 1 commit into
MiniMax-AI:mainfrom
skypata:add-prompt-enhancer

Conversation

@skypata

@skypata skypata commented Dec 1, 2026 •

Copy link
Copy Markdown

Adds Prompt Enhancer, a Mini App that rewrites a one-line request into a complete prompt for a
coding assistant. The rewrite template is fixed and bundled with the package; the model list and
the reasoning levels come from MiniMax Code's own runtime configuration, and each rewrite runs
through the local mcode CLI so it uses the account the user is already signed in to.

Tested environment

  • MiniMax Code 3.1.20 on macOS 15.8.1 (arm64), installed from this directory and opened through
    the Agent.
  • Client acceptance exercised: the model list loaded from the runtime configuration; the model
    picker opened and drilled from models into reasoning levels; a rewrite round-tripped - original
    sentence in, rewritten prompt out, undo restored the original sentence; the selected reasoning
    level reached the CLI as --effort.
  • Not verified: Windows; a host with no configured model; a host where the mcode CLI is not on
    PATH.

npm run check

  • plugins/skypata/prompt-enhancer: OK - 0 errors, 0 warnings for this package.
  • The repository's own suite reports 2 failures in test/files.test.mjs ("files: two paths that
    differ only in letter case collide" and "files: a directory and a file that differ only in letter
    case collide"). They fail identically on the untouched HEAD: on a case-insensitive filesystem the
    test cannot create both spellings, so the expected diagnostics never appear. They are unrelated to
    this package and are not addressed here.

Access this Mini App declares

None. The package declares no agentAccess, toolAccess, deviceAccess or hostAccess. It
reads the runtime configuration file to build the model list, spawns the mcode CLI once per
rewrite, and keeps the typed text in the page's local storage as view state.

Written by MiniMax-M3.1-Flash

What the Mini App does

One text box, one model picker, one send button. The picker is a two-level drill-down: it lists
the models first, and picking a model that declares reasoning levels opens that model's level list.
After a rewrite the text box holds the rewritten prompt and an undo button appears in its corner;
one click puts the original sentence back.

The rewrite itself uses a fixed two-part prompt template bundled in miniapp/node/prompts/. It
keeps the user's language, refuses to answer the request, and expands it into scope, deliverable,
format and acceptance criteria.

How it reaches a model

The Node service spawns mcode exec once per rewrite with the bundled system prompt, the user
template filled with the typed text, and the selected model. It waits for the final message, strips
the wrapping quotes the model sometimes adds, and returns the rewritten prompt to the page. The
child process is killed on timeout and when the board is disposed, and the temporary file it writes
is deleted right after it is read.

The model list is read from the MiniMax Code runtime configuration file config.yaml, located
through MAVIS_DATA_DIR, MINIMAX_DATA_DIR, __MAVIS_PARENT_DATA_DIR or
MCODE_CONFIG_DIR, otherwise ~/.minimax/config.yaml. That layout is not a supported API and
may change between releases; the package README says so.

Files

plugins/skypata/prompt-enhancer/.minimax-plugin/plugin.json
plugins/skypata/prompt-enhancer/package.json
plugins/skypata/prompt-enhancer/README.md
plugins/skypata/prompt-enhancer/README.zh-CN.md
plugins/skypata/prompt-enhancer/LICENSE
plugins/skypata/prompt-enhancer/icon.png
plugins/skypata/prompt-enhancer/miniapp/miniapp.json
plugins/skypata/prompt-enhancer/miniapp/client/index.html
plugins/skypata/prompt-enhancer/miniapp/client/styles.css
plugins/skypata/prompt-enhancer/miniapp/client/app.js
plugins/skypata/prompt-enhancer/miniapp/node/server.mjs
plugins/skypata/prompt-enhancer/miniapp/node/prompts/system-prompt.md
plugins/skypata/prompt-enhancer/miniapp/node/prompts/user-prompt-template.md

Sensitive information

Scanned the package for credentials, private keys, local paths, e-mail addresses, private IP
ranges and leftovers from the machine it was built on: none found. The package contains no API key
and no token; it never handles one.


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

@MyPrototypeWhat MyPrototypeWhat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the prompt-enhancer Mini App. The current head 280e0a9a is not ready to merge.

Every time the user clicks send, the rewrite spawns mcode exec with --permission off. Official docs list off and full as options that should only be used in an isolated workspace. The README says the app launches mcode exec and uses the signed-in account, but it does not mention --permission off. There is also no switch to keep this off by default, or to ask for confirmation first. Please document --permission off in the README, and keep this off by default or require confirmation before it runs.

userTemplate.replace('{input}', text) also follows JavaScript's replace rules for sequences such as $&. I reproduced this locally, and user input can be rewritten. Please fix the substitution so user input is inserted unchanged.

Please update the branch, and we will look at the new head.

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.

2 participants