prompt-engineer

prompt-engineer is a command for coding agents from sergei-aronsen/claude-code-toolkit. It costs 0 tokens per session (2,396 once invoked), scanned A, original, MIT.

A command that rewrites one prompt file for clearer and more reliable use. A prompt file contains instructions given to an AI tool, and the command can use Claude Code, Codex, or Gemini.

In plain words
What is it for?
Use it on code-review, security, or other agent prompt files, optionally adding context, running multiple improvement passes, or comparing several providers.
Why use it?
It helps turn vague or inconsistent instructions into a version that is easier for an AI tool to follow and reuse.

Command

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.

agentmods
npx agentmods add commands/sergei-aronsen/claude-code-toolkit/prompt-engineer
Clone the repo
git clone --depth 1 https://github.com/sergei-aronsen/claude-code-toolkit

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/sergei-aronsen/claude-code-toolkit/prompt-engineer.svg)](https://agentmods.dev/commands/sergei-aronsen/claude-code-toolkit/prompt-engineer)
Your own site
<a href="https://agentmods.dev/commands/sergei-aronsen/claude-code-toolkit/prompt-engineer"><img src="https://agentmods.dev/badge/commands/sergei-aronsen/claude-code-toolkit/prompt-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,396 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00000 $0.02396
Opus 5 $0.00000 $0.01198
Sonnet 5 $0.00000 $0.00479
Haiku 4.5 $0.00000 $0.00240

Measured 4d ago against content hash da9a9bd29859, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-engineer scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

bash <(curl -sSL https://raw.githubusercontent.com/sergei-aronsen/claude-code-toolkit/main/scripts/setup-prompt-engineer.sh)
commands/prompt-engineer.md · 271 lines

How it starts

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

/prompt-engineer — Single-Prompt Optimizer (multi-provider)

Purpose

Rewrite a single prompt file into a deployment-ready version. Companion to /council — where the Council validates a plan with Skeptic + Pragmatist review, the Prompt Engineer rewrites one prompt for clarity, controllability, reliability, and reusability. Drives one of three provider CLIs: Claude Code (claude -p), Codex (codex exec), or Gemini (gemini -p). --provider all runs all three in parallel and synthesizes a best-of final.


Usage

/prompt-engineer <path-to-prompt-file>
/prompt-engineer <path-to-prompt-file> --provider claude
/prompt-engineer <path-to-prompt-file> --provider all
/prompt-engineer <path-to-prompt-file> --context <context-file>
/prompt-engineer <path-to-prompt-file> --multi-pass
/prompt-engineer <path-to-prompt-file> --log

Examples:

  • /prompt-engineer prompts/code-review.md --provider claude
  • /prompt-engineer agents/security-auditor.md --context project-context.md --provider all
  • /prompt-engineer my-prompt.md --multi-pass --provider codex

Or use the installed shell alias directly:

pe path/to/prompt.md                              # interactive menu
pe path/to/prompt.md --provider claude
pe path/to/prompt.md --provider all --log
pe path/to/prompt.md --context path/to/context.md
echo "Write me a tone-control prompt" | pe - --provider claude

Provider (--provider)

Value CLI invoked Notes
claude claude -p (stdin) Best instruction-following on long system prompts.
codex codex exec --skip-git-repo-check -o tmp - Tight, terse rewrites.
gemini gemini -p "" (stdin) Fast. Output sometimes lacks fenced block.
all claude + codex + gemini in parallel, then 1 synthesis call 4 calls total. Synthesizer preference: claude > codex > gemini.
ask Interactive menu on TTY; falls back to claude when stdin is not a TTY Default.

Read the full file on GitHub · 271 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. 4d ago First seen · 271 lines · 0 tokens per session scan A da9a9bd29859

Subscribe to this mod's changes

prompt-engineer is a command published in the GitHub repository sergei-aronsen/claude-code-toolkit (5 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,396 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.