/autonomous-dev:prompt-engineeringfrom autonomous-dev
Provides prompt engineering patterns for writing agent prompts and skill files: constraint budgets, register shifting, HARD GATE patterns, anti-personas. Useful when writing or reviewing agent prompts or skill files.
Ships in autonomous-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Compact, actionable patterns for writing agent prompts and skill files. See docs/PROMPT-ENGINEERING.md for full rationale and academic citations.
| 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).
Before finalizing any hard gate or enforcement directive, verify the verbs:
audit, verify, critically analyse, enumerate — use for HARD GATEsreview, check, describe — use for standard task instructionslook at, mention, note — advisory only; never in enforcementFORBIDDEN: Tier 3 verbs in REQUIRED or FORBIDDEN lists.
FORBIDDEN for analytical agents (reviewers, auditors, analysts, planners):
You are a [role]... persona prefixesAct as an expert in... framingImagine you are... setupsSource: PRISM (arxiv:2603.18507) — expert personas reduce knowledge-retrieval accuracy for analytical tasks.
Correct pattern: Role description + behavioral directive.
# BAD
You are a senior security engineer. Review this code.
# GOOD
Perform a security audit. Enumerate all CWE categories present.
### HARD GATE: [Topic]
**[One-sentence scope statement]**
**REQUIRED** (all must be met):
- Specific action A
- Specific action B
**FORBIDDEN** — You MUST NOT do any of the following:
- ❌ You MUST NOT [prohibited action]
- ❌ You MUST NOT [prohibited action]
**Why**: [One sentence — increases compliance]
<model-tier-compensation tier="[haiku|sonnet|opus]">
## Model-Tier Behavioral Constraints ([Tier Name])
- Do NOT [specific tendency to suppress].
- ALWAYS [specific required behavior].
</model-tier-compensation>
Rules:
tier attribute for automated validationUse for planning, security scans, and architecture tasks. 2–3 passes optimal (NeurIPS 2023).
## Pass 1: GENERATE
[Initial output]
## Pass 2: FEEDBACK
Critically analyse Pass 1. Enumerate:
- Gaps (missing)
- Errors (wrong)
- Ambiguities (unclear)
## Pass 3: REFINE
Apply Pass 2 feedback. Produce final output.
Anti-pattern: "Review your answer and improve it" — Tier 3, will be ignored. Use Tier 1: "Critically analyse for gaps and enumerate missing cases."
Every block (hook or agent) MUST include a required next action:
# STICK only (bad)
BLOCKED: Cannot edit agents/*.md outside the pipeline.
# STICK + CARROT (good)
BLOCKED: Cannot edit agents/*.md outside the pipeline.
REQUIRED NEXT ACTION: Use /implement to run the pipeline with your changes.
Hook JSON format:
{
"decision": "block",
"reason": "What failed and why.",
"requiredNextAction": "Specific step to take next."
}
| Anti-Pattern | Why Wrong | Fix |
|---|---|---|
>15 constraints per section | MOSAIC: degraded compliance | Split into subsections ≤6 each |
| Persona prefix for analytical tasks | PRISM: reduces accuracy | Role description + directive |
| Hedge words in hard gates | Weakens enforcement | Delete or replace with MUST |
| Prose-buried constraints | Low compliance | Convert to numbered list |
| Meta-commentary about model weaknesses | May reinforce behavior | Reframe as behavioral directive |
| Block without carrot | Model loops | Add REQUIRED NEXT ACTION |
See docs/PROMPT-ENGINEERING.md for:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub akaszubski/autonomous-dev --plugin autonomous-dev29 skills in this plugin
/advisor-triggersDetects when user requests warrant critical analysis via /advise command/agent-output-formatsStandardized output formats for research, planning, implementation, and review agents. Use when generating agent outputs or parsing agent responses./api-designREST API design best practices covering versioning, error handling, pagination, and OpenAPI documentation. Use when designing or implementing REST APIs or HTTP endpoints. TRIGGER when: API design, REST endpoint, HTTP route, OpenAPI, swagger, pagination. DO NOT TRIGGER when: internal library code, CLI tools, non-HTTP interfaces.Other plugins' skills for the same job