Prompt engineering patterns for writing agent prompts and skill files — constraint budgets, register shifting, HARD GATE patterns, anti-personas. Use when writing or reviewing agents/*.md or skills/*/SKILL.md. TRIGGER when: agent prompt, skill file, prompt engineering, model-tier compensation, HARD GATE, prompt quality. DO NOT TRIGGER when: user-facing docs, README, CHANGELOG, config files.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Prompt Engineering Patterns
Compact, actionable patterns for writing agent prompts and skill files. See [docs/PROMPT-ENGINEERING.md](../../docs/PROMPT-ENGINEERING.md) for full rationale and academic citations.
---
## Constraint Budget (MOSAIC finding)
| Range | Compliance |
|-------|-----------|
| 1–6 | Reliable |
| 7–15 | Unpredictable |
| >15 | Degraded |
**Rule**: Max 6 hard constraints per section. Hard gates at the END of sections (Claude recency effect).
---
## Register Shifting Checklist
Before finalizing any hard gate or enforcement directive, verify the verbs:
- [ ] Tier 1 (deep): `audit`, `verify`, `critically analyse`, `enumerate` — use for HARD GATEs
- [ ] Tier 2 (balanced): `review`, `check`, `describe` — use for standard task instructions
- [ ] Tier 3 (minimal): `look at`, `mention`, `note` — advisory only; never in enforcement
**FORBIDDEN**: Tier 3 verbs in REQUIRED or FORBIDDEN lists.
---
## Persona Anti-Pattern
**FORBIDDEN for analytical agents** (reviewers, auditors, analysts, planners):
- ❌ `You are a [role]...` persona prefixes
- ❌ `Act as an expert in...` framing
- ❌ `Imagine you are...` setups
…
The line at the top of this page pins the label git:20260414.6e64c38, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_pl2lnz577ig3vyug
GET https://markdownregistry.com/api/v1/resolve?ref=akaszubski/autonomous-dev/prompt-engineering
GET https://markdownregistry.com/api/v1/blob/dfdcc1cb31d143ea7261716a39641f030feec8776596e7e59e956ab10a69ea4f
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
akaszubski/autonomous-dev · plugins/autonomous-dev/skills/api-design/SKILL.md · REST API design best practices covering versioning, error handling, pagination, and OpenAPI documentation. Use when…
akaszubski/autonomous-dev · plugins/autonomous-dev/skills/architecture-patterns/SKILL.md · File-by-file architecture planning with ADR format, dependency ordering, and testability gates. Use when designing…
akaszubski/autonomous-dev · plugins/autonomous-dev/skills/archived/advisor-triggers/SKILL.md · Detects when user requests warrant critical analysis via /advise command
akaszubski/autonomous-dev · plugins/autonomous-dev/skills/archived/agent-output-formats/SKILL.md · Standardized output formats for research, planning, implementation, and review agents. Use when generating agent…
akaszubski/autonomous-dev · plugins/autonomous-dev/skills/archived/quality-scoring/SKILL.md · Multi-dimensional data assessment for training quality evaluation including IFD scoring, factuality, and reasoning…
ericrisco/rsc-harness · skills/prompt-engineering/SKILL.md · Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed…
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-ai/skills/prompt-engineering/SKILL.md · Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection…
codealive-ai/ai-driven-development · skills/prompt-engineering/SKILL.md · Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models…
doodledood/manifest-dev · claude-plugins/manifest-dev-tools/skills/prompt-engineering/SKILL.md · Create, update, review, or discuss an LLM prompt — a system prompt, a skill, or an agent. Use when writing or improving…
nahid-sparktales/agent-dispatcher · skills/ai/prompt-engineering/SKILL.md · Write or revise a prompt so it holds up — output contract, instruction placement, examples that earn their place, an…
vodailocz/kilo-kit-mcp · skills/engineering/prompt-engineering/SKILL.md · Use when designing, optimizing, testing, or deploying robust prompt systems for AI agents. This skill provides…