mastermind-prompt-refiner

mastermind-prompt-refiner is a skill for Codex from xcrft/mastermind. It costs 73 tokens per session (986 once invoked), scanned A, original, MIT.

A prompt-editing guide that turns a request into a bounded handoff while preserving the original intent.

In plain words
What is it for?
Use it when someone explicitly wants a prompt rewritten, when a reusable prompt needs placeholders, or when a rough request must be handed to an agent without conversation history.
Why use it?
It prevents important requirements from being lost when a request is passed to another agent or reused as a prompt.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when someone explicitly wants a prompt rewritten, when a reusable prompt needs placeholders, or when a rough request must be handed to an agent without conversation history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xcrft/mastermind/mastermind-prompt-refiner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xcrft/mastermind --skill mastermind-prompt-refiner
Clone the repo
git clone --depth 1 https://github.com/xcrft/mastermind

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mastermind-prompt-refiner

README.md
[![agentmods](https://agentmods.dev/badge/skills/xcrft/mastermind/mastermind-prompt-refiner.svg)](https://agentmods.dev/skills/xcrft/mastermind/mastermind-prompt-refiner)
Your own site
<a href="https://agentmods.dev/skills/xcrft/mastermind/mastermind-prompt-refiner"><img src="https://agentmods.dev/badge/skills/xcrft/mastermind/mastermind-prompt-refiner.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 85
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 98
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 118
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.00986
Opus 5 $0.00036 $0.00493
Sonnet 5 $0.00015 $0.00197
Haiku 4.5 $0.00007 $0.00099

Measured 8d ago against content hash 52f034232908, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

mastermind-prompt-refiner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prompt-engineering/mastermind-prompt-refiner/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prompt refiner

Produce a bounded handoff without silently replacing the user's source request. The next consumer receives both the original text and a normalized brief, so constraints lost in rewriting remain recoverable.

When to use

  • The user explicitly asks to improve, rewrite, or package a prompt.
  • A cold agent will receive no conversation history and the raw request is genuinely ambiguous, contradictory, or bundles separate deliverables.
  • A reusable prompt needs placeholders and a stable output contract.

Do not activate just because the user writes informally. If the current agent can answer or implement the request with the available context, do that. A planner-ready request should pass through unchanged.

Decision

Input Action
Clear goal, deliverable, scope, and success condition passthrough
Clear goal or several clear deliverables with handoff-blocking gaps refined
One requested outcome has multiple incompatible interpretations ask

Ask at most three questions and only when the answer changes the deliverable, permission boundary, or workflow. Do not manufacture file paths, deadlines, features, risk decisions, or acceptance criteria.

Refinement method

  1. Identify the requested outcome and next consumer.
  2. Separate distinct deliverables instead of choosing one silently.
  3. Preserve explicit constraints, exclusions, permissions, and prior decisions.
  4. Add only the minimum output shape and success condition required by the next consumer.
  5. Mark unresolved inputs with <NEEDS: ...>.
  6. Keep the original request verbatim in the output.

Several explicit deliverables are not an ambiguous goal. Preserve each as a separate workstream, state their scope boundary, and mark priority/dependency questions with <NEEDS: ...>; use action: refined. Use ask only when the requested outcome itself cannot be normalized without choosing incompatible meanings on the user's behalf.

For migrations, destructive operations, credential changes, or other hard-to- reverse work, do not choose a workflow mode. Surface missing rollback, backup, approval, and recovery inputs when they materially affect whether the next agent can plan safely.

Read the full file on GitHub · 139 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 139 lines · 73 tokens per session scan A 52f034232908

Subscribe to this mod's changes

mastermind-prompt-refiner is a skill published in the GitHub repository xcrft/mastermind (11 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 986 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.