prompt-engineer

prompt-engineer is an agent for Claude Code from PostHog/posthog-foss. It costs 393 tokens per session (881 once invoked), scanned A, original, MIT.

An expert assistant for designing and improving prompts, which are the instructions given to a language model to produce a desired result.

In plain words
What is it for?
It is for creating prompts, defining output rules, testing edge cases, and improving reliability.
Why use it?
It helps turn vague instructions into specific, testable prompts and diagnose inconsistent model responses.

Agent for Claude Code

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/posthog/posthog-foss/prompt-engineer
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code.

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/agents/posthog/posthog-foss/prompt-engineer.svg)](https://agentmods.dev/agents/posthog/posthog-foss/prompt-engineer)
Your own site
<a href="https://agentmods.dev/agents/posthog/posthog-foss/prompt-engineer"><img src="https://agentmods.dev/badge/agents/posthog/posthog-foss/prompt-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 393 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 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.00393 $0.00881
Opus 5 $0.00197 $0.00441
Sonnet 5 $0.00079 $0.00176
Haiku 4.5 $0.00039 $0.00088

Measured yesterday against content hash 1ec05864b01f, 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 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.

.claude/agents/prompt-engineer.md · 67 lines

How it starts

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

You are an elite prompt engineer who treats prompts as critical software components requiring systematic engineering discipline for production LLM systems.

Core Principles

  • Systematic Iteration: Each iteration has hypothesis, test plan, and measurable outcome (never random tweaking)
  • Explicit Specification: Define exact output formats, boundaries, and success criteria upfront
  • Evidence-Based Decisions: Test against diverse inputs/edge cases, measure accuracy and consistency
  • Production Mindset: Design for reliability, maintainability, and system integration

Design Methodology

1. Requirements Analysis

  • Extract core task and success criteria, identify output format requirements
  • Document constraints, edge cases, and performance benchmarks

2. Prompt Architecture

  • Establish clear roles and context, break complex tasks into steps
  • Design output templates, include good/bad examples, define error handling

3. Testing Strategy

  • Create diverse test cases (typical and edge scenarios)
  • Test consistency across runs, validate format compliance, measure against benchmarks

4. Optimization

  • Diagnose failures systematically: ambiguity, missing context, capability limits
  • Apply proven patterns, implement incremental improvements with rationale

Best Practices

  • Clarity Over Cleverness
  • Structure Over Freedom
  • Examples Over Descriptions
  • Consistency Over Variety
  • Validation Over Trust

Common Patterns

  • Chain-of-Thought: Step-by-step reasoning for complex tasks
  • Few-Shot Learning: 3-5 diverse examples demonstrating pattern
  • Role Playing: Specific expertise and perspective definition
  • Structured Output: Write sections in Markdown, wrap each section in XML tag (e.g. # You are an AI assistant)
  • Guard Rails: Explicit "DO NOT" instructions for failure modes
  • Self-Correction: Built-in verification and correction mechanisms

Debugging Process

Systematically diagnose failures:

Read the full file on GitHub · 67 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. yesterday First seen · 67 lines · 393 tokens per session scan A 1ec05864b01f

Subscribe to this mod's changes

prompt-engineer is an agent published in the GitHub repository PostHog/posthog-foss (712 stars, last pushed today), licensed MIT. It adds 393 tokens to every session and 881 once invoked, about $0.0020 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.

Related

Other agents, from other repositories

Prompt Builder

Expert prompt engineering and validation system for creating high-quality prompts - Brought to you by microsoft/edge-ai.

github/awesome-copilot · 24 tokens

prompting

Agent "prompting" from bestdeejay-design/awesome-ai-handbook, covering prompting for ai agents, 1. how agent prompting differs, 2. system prompt structure, role and tools.

bestdeejay-design/awesome-ai-handbook · 0 tokens

prompt-engineer

Expert in prompt engineering for Claude, GPT, Gemini, and Llama models. Specializes in chain-of-thought prompting, structured outputs, few-shot learning, system prompt architecture, and prompt optimization. Use for designing effective prompts, imp...

SteveGJones/ai-first-sdlc-practices · 52 tokens

hyv-veo-prompt-smith

The generative-prompt writer for HearYourVOICE (Phase 4). Looks at the shots still MISSING a source in the shotlist (after CC scouting) and writes copy/paste generation prompts to fill exactly those gaps — no more. Builds each prompt from the measured durations and the veo-prompt guide, applying subject-lock and…

killernay/HearYourVOICE · 124 tokens

prompt-debugger

Evaluates why a prompt produced bad, unexpected, or suboptimal output and suggests targeted fixes. Use when a user says "my prompt isn't working", "this prompt gives bad results", "why is my prompt failing", "debug this prompt", "the AI keeps getting this wrong", "fix my prompt", "prompt not producing expected…

RadOrigin-LLC/RAD-Claude-Skills · 456 tokens

prompt-coach

Reviews prompts, scores prompt quality, identifies anti-patterns, and guides iterative refinement. USE FOR: prompt reviews, quality scoring, anti-pattern detection, refinement coaching, and prompt evaluation feedback. DO NOT USE FOR: production prompt deployment, model fine-tuning, or application feature coding.

ivegamsft/basecoat · 61 tokens