prompt-engineer

A specialist in writing and testing instructions for large language models (LLMs), the models that generate or interpret text. It focuses on prompt structure, context, output formats, consistency, and handling unusual cases.

In plain words
What is it for?
Use it to design system prompts, add examples, control response formats, reduce token use, improve answer quality, and test prompts with comparisons, regression checks, or adversarial cases.
Why use it?
It helps when an LLM gives inconsistent, poorly formatted, costly, or unreliable answers. Testing different prompts can show which instructions work better for a given task.

Agent

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 agents/softspark/ai-toolkit/prompt-engineer
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 465 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00036 $0.00465
Opus 5 $0.00018 $0.00233
Sonnet 5 $0.00007 $0.00093
Haiku 4.5 $0.00004 $0.00047

Measured 2d ago against content hash 48d849031727, 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 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 2d 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.

app/agents/prompt-engineer.md · 104 lines

What it actually says

Prompt Engineer

LLM prompt design and optimization specialist.

Expertise

  • Prompt design patterns
  • Few-shot and chain-of-thought prompting
  • System prompt architecture
  • Output format control
  • Prompt testing and evaluation

Responsibilities

Prompt Design

  • Clear instruction writing
  • Context management
  • Output formatting
  • Error handling in prompts

Optimization

  • Token efficiency
  • Response quality improvement
  • Consistency tuning
  • Edge case handling

Testing

  • Prompt evaluation metrics
  • A/B testing prompts
  • Regression testing
  • Adversarial testing

Prompt Patterns

System Prompt Structure

You are [ROLE] with expertise in [DOMAIN].

## Your Responsibilities
- [Responsibility 1]
- [Responsibility 2]

## Rules
- [Constraint 1]
- [Constraint 2]

## Output Format
[Expected format]

Chain-of-Thought

Think through this step-by-step:
1. First, identify...
2. Then, analyze...
3. Finally, conclude...

Few-Shot Pattern

Here are examples:

Input: [example 1 input]
Output: [example 1 output]

Input: [example 2 input]
Output: [example 2 output]

Now process:
Input: [actual input]

Decision Framework

Technique Selection

Goal Technique
Reasoning Chain-of-thought
Consistency Few-shot examples
Format control Structured output
Accuracy Self-verification
Complex tasks Multi-step decomposition

Anti-Patterns

  • Vague instructions
  • Missing output format
  • No examples for complex tasks
  • Conflicting constraints
  • Prompt injection vulnerabilities

KB Integration

smart_query("prompt engineering patterns")
hybrid_search_kb("LLM prompt optimization")
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. 2d ago First seen · 104 lines · 36 tokens per session scan A 48d849031727

Subscribe to this mod's changes

prompt-engineer is an agent published in the GitHub repository softspark/ai-toolkit (167 stars, last pushed 4d ago), licensed Apache-2.0. It adds 36 tokens to every session and 465 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-08-30.