prompt-optimizer

Optimize agent instructions with reasoning, examples, and decision trees.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/bennybennison/agent-toolkit --skill prompt-optimizer-bennybennison
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-optimizer
Source: https://github.com/bennybennison/agent-toolkit/tree/main/skills/prompt-optimizer
Command: npx skills add https://github.com/bennybennison/agent-toolkit --skill prompt-optimizer-bennybennison

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents often ignore or misinterpret instructions because prompts lack reasoning, examples, and clear decision criteria. This Skill helps create prompts that are understood and followed reliably.

Core Features & Use Cases

  • Step‑by‑step optimization: Identify intent, explain reasoning, add examples, decision trees, edge‑case tests, and compliance measurement.
  • Prompt patterns: Provides reusable patterns for reasoning over commands, decision trees, example‑first writing, and progressive disclosure.
  • Use Cases: Writing new skills, refining existing rules, debugging ignored instructions, and quality‑checking framework files.

Quick Start

Refine the given instruction by following the optimization process to add reasoning, examples, and decision criteria.

Frequently Asked Questions about prompt-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my agent ignore instructions in the system prompt?

Agents ignore instructions when prompts lack reasoning, examples, and clear decision criteria. Optimizing agent instructions by adding explicit intent identification and edge-case tests ensures prompts are followed reliably.

How do I optimize agent instructions for better compliance?

To optimize agent instructions for compliance, apply a step-by-step process: identify intent, explain reasoning, add examples, build decision trees, test edge cases, and measure compliance without external dependencies.

Can I use this to refine rules in an AGENTS.md file?

Yes, you can apply prompt optimization to any agent-facing text such as AGENTS.md files, system prompts, or skill rules during authoring or review to improve agent reliability.

What are the best prompt patterns for writing agent instructions?

The best prompt patterns for agent instructions include reasoning over commands, decision trees, example-first writing, and progressive disclosure to provide reusable structures that agents follow reliably.

Do I need external dependencies to measure prompt compliance?

No, you do not need external dependencies to measure prompt compliance. The optimization process incorporates compliance measurement, intent identification, and edge-case testing natively within the prompt engineering workflow.