prompt-generator

prompt-generator is a command for coding agents from NikiforovAll/claude-code-rules. It costs 16 tokens per session (274 once invoked), scanned B, original, Apache-2.0.

A command that turns a user's goal and requirements into a ready-to-copy prompt for Claude Sonnet 4.5, an AI language model.

In plain words
What is it for?
Use it to create prompts for tasks with specific outcomes, constraints, roles, or background information. It can also tell Claude to ask clarifying questions when details are missing.
Why use it?
It helps when a request is vague or missing useful context, so the AI is more likely to understand the intended result.

Command

Part of the handbook-extras plugin — 7 commands, 4 agents shipped together

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/nikiforovall/claude-code-rules/prompt-generator
Clone the repo
git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules

Or install handbook-extras, the plugin that ships this one along with the rest of its 7 commands, 4 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/nikiforovall/claude-code-rules/prompt-generator.svg)](https://agentmods.dev/commands/nikiforovall/claude-code-rules/prompt-generator)
Your own site
<a href="https://agentmods.dev/commands/nikiforovall/claude-code-rules/prompt-generator"><img src="https://agentmods.dev/badge/commands/nikiforovall/claude-code-rules/prompt-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 274 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00016 $0.00274
Opus 5 $0.00008 $0.00137
Sonnet 5 $0.00003 $0.00055
Haiku 4.5 $0.00002 $0.00027

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

Security

Grade B, and why

prompt-generator scanned grade B 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 5d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

* Format your output prompt within a code block for clarity and easy copy-pasting.
plugins/handbook-extras/commands/prompt-generator.md · 18 lines

What it actually says

You are an expert prompt engineer specializing in creating prompts for AI language models, particularly Claude Sonnet 4.5.

Your task is to take user input and transform it into well-crafted, effective prompts that will elicit optimal responses from Claude Sonnet 4.5.

When given input from a user, follow these steps:

  • Analyze the user's input carefully, identifying key elements, desired outcomes, and any specific requirements or constraints.
  • Craft a clear, concise, and focused prompt that addresses the user's needs while leveraging Claude Sonnet 4.5's capabilities.
  • Ensure the prompt is specific enough to guide Claude Sonnet 4.5's response, but open-ended enough to allow for creative and comprehensive answers when appropriate.
  • Incorporate any necessary context, role-playing elements, or specific instructions that will help Claude Sonnet 4.5 understand and execute the task effectively.
  • If the user's input is vague or lacks sufficient detail, include instructions for Claude Sonnet 4.5 to ask clarifying questions or provide options to the user.
  • Format your output prompt within a code block for clarity and easy copy-pasting.

After providing the prompt, briefly explain your reasoning for the prompt's structure and any key elements you included.

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. 5d ago First seen · 18 lines · 16 tokens per session scan B 281598c0cd61

Subscribe to this mod's changes

prompt-generator is a command published in the GitHub repository NikiforovAll/claude-code-rules (141 stars, last pushed 6d ago), licensed Apache-2.0. It adds 16 tokens to every session and 274 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.