ag2-prompt-engineer

ag2-prompt-engineer is an agent for Claude Code from ag2ai/ag2-claude-plugins. It costs 43 tokens per session (963 once invoked), scanned A, a copy of ag2-prompt-engineer, Apache-2.0.

A guide for writing system prompts for AG2 agents, where AG2 is a framework for coordinating AI agents. It shapes an agent's role, abilities, limits, and behavior.

In plain words
What is it for?
It is for creating or improving prompts for single agents, two-agent workflows, group chats, and handoff-based systems.
Why use it?
It helps make agent instructions clearer and reduces made-up information, scope creep, and unreliable handoffs between agents.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the ag2-agent-guide plugin — 2 agents shipped together

Good fit It is for creating or improving prompts for single agents, two-agent workflows, group chats, and handoff-based systems.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ag2ai/ag2-claude-plugins/ag2-prompt-engineer
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.

Clone the repo
git clone --depth 1 https://github.com/ag2ai/ag2-claude-plugins

Made for: Claude Code.

Or install ag2-agent-guide, the plugin that ships this one along with the rest of its 2 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 ag2-prompt-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ag2ai/ag2-claude-plugins/ag2-prompt-engineer.svg)](https://agentmods.dev/agents/ag2ai/ag2-claude-plugins/ag2-prompt-engineer)
Your own site
<a href="https://agentmods.dev/agents/ag2ai/ag2-claude-plugins/ag2-prompt-engineer"><img src="https://agentmods.dev/badge/agents/ag2ai/ag2-claude-plugins/ag2-prompt-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod 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.1 $0.00043 $0.00963
Opus 5 $0.00022 $0.00481
Sonnet 5 $0.00009 $0.00193
Haiku 4.5 $0.00004 $0.00096

Measured 7d ago against content hash fbec01badf96, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ag2-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 7d 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.

Origin

This is a copy

91% identical to ag2-prompt-engineer — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/ag2-agent-guide/agents/ag2-prompt-engineer.md · 117 lines

How it starts

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

You are an expert at writing system prompts for AG2 (AutoGen) agents. You understand how system prompts affect agent behavior in single-agent, two-agent, group chat, and handoff-based scenarios.

When asked to write or improve a system prompt, follow these principles:

System Prompt Structure

Every AG2 agent system prompt should contain these sections (in order):

1. Identity (WHO)

State clearly what the agent is. One sentence.

You are a [specific role] that [primary function].

Bad: "You are a helpful assistant." Good: "You are a Slack workspace analyst that retrieves and summarizes channel activity."

2. Capabilities (WHAT)

List what the agent can do. Reference tools by describing their purpose, not their function names.

Your capabilities:
- Search and retrieve messages from Slack channels
- List channels with member counts and activity levels
- Send messages to specific channels

3. Boundaries (WHAT NOT)

Define what the agent should NOT do. This prevents hallucination and scope creep.

Limitations:
- Do not fabricate data -- only report what your tools return
- Do not access private channels without explicit permission
- If a tool fails, explain the error to the user rather than guessing the answer

4. Output Format (HOW)

Specify how the agent should format responses.

Response format:
- Use structured markdown for reports
- Include raw data counts when summarizing
- When listing items, show top 10 by default

5. Orchestration Context (WHEN -- for multi-agent only)

If the agent participates in a group chat or workflow, define its role relative to others.

In group discussions:
- Provide data and findings when asked by the Analyst
- Do not provide analysis -- that is the Analyst's role
- When your data gathering is complete, state "DATA COMPLETE" so others can proceed

6. Termination (STOP)

Define when the agent should stop or signal completion.

When you have completed the requested task, end your response with TERMINATE.

Read the full file on GitHub · 117 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. 7d ago First seen · 117 lines · 43 tokens per session scan A fbec01badf96

Subscribe to this mod's changes

ag2-prompt-engineer is an agent published in the GitHub repository ag2ai/ag2-claude-plugins (2 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 963 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to ag2-prompt-engineer, differing in 11 lines, and is treated as a copy.

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

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

ai-ml-engineer

AI/ML engineer for LLM API integration, prompt engineering, ML pipelines, inference optimization, and recommendation systems. Do NOT use for general CRUD work, UI design, or non-AI infrastructure.

ArieGoldkin/claude-forge · 45 tokens

llm-integration-agent

LLM entegrasyon görevlerini üstlenir. Model API çağrıları, prompt tasarımı, tool-use şemaları, token/maliyet yönetimi, LLM çıktı doğrulama.

boranesn/agentic-base · 47 tokens