agent-prompt-patterns

agent-prompt-patterns is a skill for Claude Code, Codex from LeoYeAI/openclaw-master-skills. It costs 68 tokens per session (6,423 once invoked), scanned A, original, MIT.

A collection of design patterns for making AI agents follow reliable operating rules. It covers validation, approval levels, proof of completed work, recurring workflows, contradiction detection, and multi-agent processes.

In plain words
What is it for?
It is for writing agent operating manuals, designing human approval steps, improving scheduled workflows, debugging rule violations, and building safer multi-agent pipelines.
Why use it?
It addresses agents that skip steps, claim unfinished work is complete, or break rules despite being told what to do. The patterns are aimed at agents that persist, use tools, or take actions.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions subagents; positional $N argument; mentions AGENTS.md.

Good fit It is for writing agent operating manuals, designing human approval steps, improving scheduled workflows, debugging rule violations, and building safer multi-agent pipelines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leoyeai/openclaw-master-skills/agent-prompt-patterns
About the project

OpenClaw Master Skills is a curated, regularly updated collection of skills that extends an AI personal assistant platform with capabilities such as research, browser automation, presentation creation, and prompt work. It is intended for people using OpenClaw or MyClaw.ai to give their agents additional tasks and workflows. The catalogue contains many skills and agents from this collection.

LeoYeAI/openclaw-master-skills · 2,141 stars · on GitHub · myclaw.ai

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.

Any agent
npx skills add LeoYeAI/openclaw-master-skills --skill agent-prompt-patterns
Clone the repo
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills

Made for: Claude Code, Codex.

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 agent-prompt-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns/github.svg)](https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns)
Your own site
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-prompt-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-prompt-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 264
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 278
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 446
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00068 $0.06423
Opus 5 $0.00034 $0.03211
Sonnet 5 $0.00014 $0.01285
Haiku 4.5 $0.00007 $0.00642

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

Security

Grade A, and why

agent-prompt-patterns scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- [ ] Health check returns 200 — verified by: curl to /health within 60s
skills/agent-prompt-patterns/SKILL.md · 775 lines

How it starts

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

Agent Prompt Patterns

Battle-tested patterns for agents that ship, not agents that demo. If your agent works in a live-fire notebook but breaks in production, you have a demo, not an agent.


When to Use

  • Designing a new agent's behavioral rules and operating manual
  • An agent is hallucinating completions, skipping steps, or claiming work it didn't do
  • Building multi-agent pipelines where output quality compounds (or collapses)
  • Setting up human-in-the-loop approval tiers for different risk levels
  • Enforcing reliability in automated workflows (cron jobs, scheduled tasks, pipelines)
  • Writing AGENTS.md or operating manuals for production agent workspaces
  • Debugging why an agent keeps violating rules you've already stated
  • Evaluating whether an agent should exist at all (deletion test)
  • Building harnesses that make autonomy safe and useful

When NOT to Use

  • One-shot prompts with no agent persistence — these patterns assume continuity
  • Pure chatbot / conversational UX with no action-taking capability
  • Academic prompt engineering research — these are production patterns, not benchmarks
  • Agents with no filesystem, no tool access, and no side effects — nothing to harness
  • You're still in the "make it work at all" phase — get basic functionality first, then harden

1. Consumer-First Design

Principle: Every agent output must have a named consumer. If nobody uses the output, the agent shouldn't exist.

This is the most important pattern because it kills bloat before it starts. Agents proliferate. Each one feels useful when you build it. Six months later you have 14 agents and can't remember what half of them do.

The Deletion Test

Ask: If I delete this agent, which other agent's work breaks?

If the answer is "nothing" or "I'm not sure," the agent is a vanity project.

# Agent Registry (in AGENTS.md)

## daily-digest
- **Consumers:** Sam (morning briefing), weekly-report agent (aggregation)
- **Deletion impact:** Sam loses morning summary, weekly-report loses daily inputs
- **Verdict:** KEEP

## inbox-sorter
- **Consumers:** None identified
- **Deletion impact:** Unknown
- **Verdict:** CANDIDATE FOR REMOVAL — validate or kill within 7 days

Read the full file on GitHub · 775 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 775 lines · 68 tokens per session scan A ab364312b14f

Subscribe to this mod's changes

agent-prompt-patterns is a skill published in the GitHub repository LeoYeAI/openclaw-master-skills (2,141 stars, last pushed 1mo ago), licensed MIT. It adds 68 tokens to every session and 6,423 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

comfyui-skill-openclaw

Run registered ComfyUI workflows through the fast comfyui-skill CLI, and use the official local Comfy MCP for live template, node, model, validation, and orchestration capabilities. Use this Skill when: (1) The user requests to "generate an image", "draw a picture", or "execute a ComfyUI workflow". (2) The user has…

HuangYuChuh/ComfyUI_Skills_OpenClaw · 125 tokens

openclaw-auto-dream

Cognitive memory architecture for OpenClaw agents — periodic dream cycles that consolidate daily logs into structured long-term memory with importance scoring, insights, and push notifications. Use when: user asks for 'auto memory', 'dream', 'auto-dream', 'memory consolidation', 'memory dashboard'. Powered by…

LeoYeAI/openclaw-auto-dream · 79 tokens

openclaw-ultra-scraping

Powerful web scraping, crawling, and data extraction with stealth anti-bot bypass. Bypasses anti-bot systems (Cloudflare Turnstile, CAPTCHAs) out of the box. Use when: (1) scraping websites that block normal requests, (2) extracting structured data from web pages, (3) crawling multiple pages with concurrency, (4)…

LeoYeAI/openclaw-ultra-scraping · 180 tokens

myclaw-backup

Backup and restore all OpenClaw configuration, agent memory, skills, and workspace data. Part of the MyClaw.ai (https://myclaw.ai) open skills ecosystem — the AI personal assistant platform that gives every user a full server with complete code control. Use when the user wants to create a snapshot of their OpenClaw…

LeoYeAI/openclaw-backup · 179 tokens

agentsec

Audit AI agent skills for security vulnerabilities. Use when scanning installed skills against the OWASP Agentic Skills Top 10, checking skills before running them, gating CI/CD on skill safety, or generating audit reports (text, JSON, SARIF, HTML) for stakeholders.

semiotic-ai/agentsec · 57 tokens

create-teammate

Distill a teammate into an AI Skill. Auto-collect Slack/Teams/GitHub data, generate Work Skill + 5-layer Persona, with continuous evolution. Use when: user wants to capture a colleague's knowledge before they leave, create an AI version of a teammate, distill tribal knowledge into a reusable skill, or says…

LeoYeAI/teammate-skill · 78 tokens