prompt-optimize

prompt-optimize is a command for Claude Code from NVZver/claude-marketplace. It costs 12 tokens per session (675 once invoked), scanned A, original, MIT.

A command for applying fixes identified by a prompt review. It checks target prompts against project guidance before changing them.

In plain words
What is it for?
Use it on a prompt file, directory, or group of files to review issues, confirm the scope, and apply the allowed fixes.
Why use it?
It helps correct rule violations without changing a prompt's intended behaviour or adding unrelated content.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the prompt-engineer plugin — 3 commands, 1 agent shipped together

Good fit Use it on a prompt file, directory, or group of files to review issues, confirm the scope, and apply the allowed fixes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nvzver/claude-marketplace/prompt-optimize
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/NVZver/claude-marketplace

Made for: Claude Code.

Or install prompt-engineer, the plugin that ships this one along with the rest of its 3 commands, 1 agent.

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-optimize

README.md
[![agentmods](https://agentmods.dev/badge/commands/nvzver/claude-marketplace/prompt-optimize/github.svg)](https://agentmods.dev/commands/nvzver/claude-marketplace/prompt-optimize)
Your own site
<a href="https://agentmods.dev/commands/nvzver/claude-marketplace/prompt-optimize"><img src="https://agentmods.dev/badge/commands/nvzver/claude-marketplace/prompt-optimize/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-optimize

Your own site · 80×15
<a href="https://agentmods.dev/commands/nvzver/claude-marketplace/prompt-optimize"><img src="https://agentmods.dev/badge/commands/nvzver/claude-marketplace/prompt-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 675 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.00012 $0.00675
Opus 5 $0.00006 $0.00338
Sonnet 5 $0.00002 $0.00135
Haiku 4.5 $0.00001 $0.00068

Measured 9d ago against content hash 93c001019efa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prompt-optimize 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 9d 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.

prompt-engineer/commands/prompt-optimize.md · 50 lines

How it starts

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

Trace. On load, print first: =============== [prompt-engineer/commands/prompt-optimize.md] [prompt-engineer] ===============

Prompt Optimize

Goal: Fix ground rule violations in target prompts.

Input: $ARGUMENTS (file path, directory, or glob pattern). If empty or ambiguous, ask: "(A) specific file, (B) all prompts in a plugin directory, (C) all prompts in the repository"

Constraints:

  • Do NOT change the functional intent of any prompt
  • Do NOT add features or content beyond what ground rules require
  • Do NOT proceed without reviewing first

Steps

  1. Read knowledge files: ../knowledge/actor-ground-rules.md, ../knowledge/quality-checks.md, ../knowledge/separation-of-concerns.md → checklist loaded
  2. Run prompt-review logic on target → issues table
  3. If no issues found → report "No issues found." and stop
  4. Present issues table to user → confirm scope of fixes
  5. For each file with issues, apply fixes by severity: a. HIGH: add missing sections using actor format template from knowledge/actor-ground-rules.md → file contains all required sections b. MEDIUM: apply fixes per knowledge/quality-checks.md and knowledge/actor-ground-rules.md — rewrite vague steps with arrow-notation results, consolidate duplicates, replace hardcoded formats with knowledge references, merge constraints, remove restated descriptions c. LOW: delete adverbs, replace hedging with direct statements, convert passive to active voice, remove filler phrases, add paradigm citations, trim example bloat, remove low-density padding 5.5. Quote each applied fix inline before the verdict (write, show, comment) per ../../core/skills/output/SKILL.md Rule 7 — the Step 8 change table is the compressed-inspection-table form; for a small batch, show before/after per edit. Never report "fixed N issues" without the changed content.
  6. Re-run review on modified files → verify fixes resolved issues
  7. If new issues found → repeat steps 5-6 until no new issues remain or the same issue recurs
  8. Compile changes → output table

Read the full file on GitHub · 50 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. 9d ago First seen · 50 lines · 12 tokens per session scan A 93c001019efa

Subscribe to this mod's changes

prompt-optimize is a command published in the GitHub repository NVZver/claude-marketplace (1 stars, last pushed 14d ago), licensed MIT. It adds 12 tokens to every session and 675 once invoked, about $0.0001 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-31.