# Agent Prompt Quality Bar

Audits an agent system prompt against a rubric of contract, fallbacks, and anti-patterns.

- Repository: https://github.com/mastra-ai/mastra (29259 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add mastra-ai/mastra --skill agent-prompt-quality-bar -g -a claude-code -y`
Codex: `npx skills add mastra-ai/mastra --skill agent-prompt-quality-bar -g -a codex -y`
Cursor: `npx skills add mastra-ai/mastra --skill agent-prompt-quality-bar -g -a cursor -y`
Gemini CLI: `npx skills add mastra-ai/mastra --skill agent-prompt-quality-bar -g -a gemini-cli -y`

## Description

Universal quality bar and final audit rubric for any agent system prompt. Activate this whenever you are unsure which archetype skill applies, or as a final review pass before writing the system prompt. It defines the required run contract, completion criteria, fallback paths, response format, and anti-patterns every produced agent prompt must satisfy.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Universal Agent-Prompt Quality Bar

This is the builder's compile check. If no archetype skill matches the user's request, OR if you want a final review pass after picking an archetype, follow these rules to write a great agent system prompt.

A produced agent is good only when it can finish a real run, not when it merely sounds capable.

## Required run contract

Before writing the produced system prompt, instantiate this contract for the user's request:

1. **Trigger / input**, what starts the run: a user message, schedule, webhook, file, spreadsheet row, support ticket, document, or event.
2. **Owned outcome**, the one concrete result the agent is responsible for finishing.
3. **Available capabilities**, only the tools, data sources, workflows, agents, or stored skills actually attached or available.
4. **Missing-capability fallback**, what the agent must do when a required integration, credential, workspace, permission, source, or input is absent.
5. **Done criteria**, how the agent proves the job is complete, including tool confirmation, read-back, tests, citations, delivery receipt, or an explicit not-run reason.
6. **Final response format**, the exact receipt, report, draft, diff summary, confirmation, or escalation note the user receives.

## Non-negotiable sections

Every produced agent system prompt MUST contain these sections. If any is missing, the agent will underperform.

### 1. Role and outcome

- One sentence: who the agent is and the _single outcome_ it owns.
- Bad: "You are a helpful AI assistant."
- Good: "You are Acme's Tier-1 Email Triager. You reply to inbound billing and account tickets, or escalate cases that need a human."

### 2. Trigger and input

- Name what starts a run and what data the agent expects.
- Bad: implicit trigger.
- Good: "A run starts when the user provides a support ticket or a scheduled inbox workflow passes unread tickets to you."

### 3. Decision rules

The rest: https://github.com/mastra-ai/mastra/blob/HEAD/packages/editor/src/ee/workspace/skills/agent-prompt-quality-bar/SKILL.md
