prompt-refine

prompt-refine is a command for Claude Code from Adityaraj0421/naksha-studio. It costs 38 tokens per session (781 once invoked), scanned A, original, MIT.

A prompt editor for AI image and video tools that reviews an existing instruction, marks weaknesses, and produces a revised version with explanations and a version for another tool.

In plain words
What is it for?
Use it to check subjects, style, lighting, camera, mood, negative instructions, and tool-specific syntax in prompts.
Why use it?
It helps when an AI prompt is vague, missing important visual details, or uses instructions that do not fit the chosen tool.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the naksha plugin — 1 skill, 70 commands, 7 agents, 9 hooks shipped together

Good fit Use it to check subjects, style, lighting, camera, mood, negative instructions, and tool-specific syntax in prompts.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/adityaraj0421/naksha-studio/prompt-refine
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.

Clone the repo
git clone --depth 1 https://github.com/Adityaraj0421/naksha-studio

Made for: Claude Code.

Or install naksha, the plugin that ships this one along with the rest of its 1 skill, 70 commands, 7 agents, 9 hooks.

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 prompt-refine

README.md
[![agentmods](https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/prompt-refine/github.svg)](https://agentmods.dev/commands/adityaraj0421/naksha-studio/prompt-refine)
Your own site
<a href="https://agentmods.dev/commands/adityaraj0421/naksha-studio/prompt-refine"><img src="https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/prompt-refine/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prompt-refine

Your own site · 80×15
<a href="https://agentmods.dev/commands/adityaraj0421/naksha-studio/prompt-refine"><img src="https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/prompt-refine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 781 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.
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.00038 $0.00781
Opus 5.5 $0.00015 $0.00312
Sonnet 5.5 $0.00008 $0.00156
Haiku 4.5 $0.00004 $0.00078

Measured today against content hash 71d5efa0da80, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prompt-refine 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 today.

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.

commands/prompt-refine.md · 104 lines

How it starts

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

/prompt-refine $ARGUMENTS

You are activating the AI Visual Gen Wing: AI Prompt Engineer.


Process

1. Parse the Input

Extract from $ARGUMENTS:

  • Existing prompt: the full prompt text to audit
  • Tool: which tool this is intended for (default: Midjourney if unspecified)
  • Context: what the prompt is trying to achieve (if provided)

2. Identify the Tool

If tool is not specified in $ARGUMENTS, identify it from syntax clues:

  • --ar, --style, --no → Midjourney
  • Instruction-style natural language → DALL-E 3
  • Scene/motion description → Runway
  • Otherwise → ask before proceeding

3. Annotated Critique

Run the prompt through the AI Prompt Engineer's 8-failure-mode checklist. For each issue found, annotate inline:

Original prompt:
"[paste original]"

Annotated:
"[token] ← [WEAK: reason] [token] ← [MISSING: what's absent] [token] ← [OK]"

Issues to check:

  • Are all 6 anatomy elements present (subject, style, lighting, camera, mood, negatives)?
  • Are style tokens specific or vague? ("photography" is vague; "editorial photography, 35mm film" is specific)
  • Are there conflicting instructions? (asking for "minimalist" and "highly detailed" simultaneously)
  • Is the subject specific enough? ("person" vs "founder in her 30s at a standing desk")
  • Are negatives present and targeting known failure modes for this tool?
  • Is tool-specific syntax correct? (MJ: --no; DALL-E: natural language exclusions)
  • Is the aspect ratio specified (if needed)?
  • Any tokens that are likely being ignored due to prompt length or weight distribution?

4. Optimized Prompt

Deliver the improved prompt with changes highlighted:

## Optimized Prompt ([tool name])
[full optimized prompt]

## Changes Made
- **Added:** [token] — [reason]
- **Replaced:** "[old token]" → "[new token]" — [reason]
- **Removed:** [token] — [reason it was hurting the output]
- **Reordered:** [what moved where and why]

Read the full file on GitHub · 104 lines

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. today First seen · 104 lines · 38 tokens per session scan A 71d5efa0da80

Subscribe to this mod's changes

prompt-refine is a command published in the GitHub repository Adityaraj0421/naksha-studio (341 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 781 once invoked, about $0.0002 per session on Opus 5.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-10-19.