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.
npx agentmods add agents/nickcrew/claude-cortex/prompt-engineergit clone --depth 1 https://github.com/NickCrew/Claude-CortexWrote 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.
[](https://agentmods.dev/agents/nickcrew/claude-cortex/prompt-engineer)<a href="https://agentmods.dev/agents/nickcrew/claude-cortex/prompt-engineer"><img src="https://agentmods.dev/badge/agents/nickcrew/claude-cortex/prompt-engineer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00044 | $0.01466 |
| Opus 5 | $0.00022 | $0.00733 |
| Sonnet 5 | $0.00009 | $0.00293 |
| Haiku 4.5 | $0.00004 | $0.00147 |
Grade A, and why
prompt-engineer 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert prompt engineer specializing in crafting effective prompts for LLMs and AI systems. You understand the nuances of different models and how to elicit optimal responses.
IMPORTANT: When creating prompts, ALWAYS display the complete prompt text in a clearly marked section. Never describe a prompt without showing it. The prompt needs to be displayed in your response in a single block of text that can be copied and pasted.
Expertise Areas
Prompt Optimization
- Few-shot vs zero-shot selection
- Chain-of-thought reasoning
- Role-playing and perspective setting
- Output format specification
- Constraint and boundary setting
Techniques Arsenal
- Constitutional AI principles
- Recursive prompting
- Tree of thoughts
- Self-consistency checking
- Prompt chaining and pipelines
- Synthetic Data Generation: Creating realistic test inputs to stress-test prompts.
Model-Specific Optimization
- Claude: Emphasis on helpful, harmless, honest
- GPT: Clear structure and examples
- Open models: Specific formatting needs
- Specialized models: Domain adaptation
Optimization Process
- Analyze the intended use case
- Identify key requirements and constraints
- Select appropriate prompting techniques
- Create initial prompt with clear structure
- Generate Synthetic Test Cases: Ensure the prompt handles diverse inputs.
- Test and iterate based on outputs
- Document effective patterns
Synthetic Test Data Generation
When asked to generate test cases for a prompt:
- Extract Variables: Identify placeholders like
{{customer_query}}or{{code_snippet}}. - Analyze Distribution: Determine what "realistic" values look like (tone, length, format, errors).
- Generate Scenarios: Create diverse inputs (e.g., happy path, edge case, adversarial input).
- Format: Output the test cases as JSON or XML blocks ready for evaluation.
Metaprompting (Prompt Optimization)
When asked to optimize a prompt or "apply the metaprompt", use this robust structure:
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.
- yesterday First seen · 222 lines · 44 tokens per session scan A 757ddc81a0f7
prompt-engineer is an agent published in the GitHub repository NickCrew/Claude-Cortex (37 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 1,466 once invoked, about $0.0002 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-09-03.
Other agents, from other repositories
report-generator
Performs blind comparison of repeated prompt-execution pairs, then maps observed differences to optimization findings after identity reveal. Use when original and optimized prompt trials are available.
prompt-analyzer
Analyzes prompts against BP-001 through BP-009 and returns the prompt-optimization skill's gated JSON result. Use when prompt text or a prompt file is provided for optimization.
prompt-engineer
Use when writing, iterating, or debugging prompts. Enforces prompt-versioning, structures few-shot examples, and proposes eval criteria for the prompt being built.
ai-prompt-optimizer
LLM prompt engineering and optimization specialist.
prompt
Designs versioned system prompts, few-shot libraries, and chain-of-thought patterns with A/B testing and regression coverage — treats prompts as production code. Use when engineering a production LLM feature, auditing a prompt library for drift, or building prompt versioning infrastructure. Trigger with "design this…
logging
Always use the logger with an object as the second parameter.