| name | prompt |
| description | Assemble a complete agent prompt by orchestrating the focused skills (promptrole, promptcontext, promptbehavior, prompttool, prompttask, promptverification) into one combined file. Use when drafting a new agent prompt or improving an existing one. |
| license | MIT |
Prompt
Output: a single combined file — prompts/{slug}.md (Markdown, default) or prompts/{slug}.xml (XML).
Context
Assemble a complete agent prompt. This skill applies the focused skills in sequence — promptcontext, promptrole, promptbehavior, prompttool, prompttask, promptverification — and combines their outputs into a single file with the correct section order and cross-section coherence.
Tradeoff: Not every prompt needs all sections. A simple one-shot prompt may need only role and task. Invoke only what the prompt requires.
Scope: This skill assembles section files into a single combined prompt. Each section's content is produced by the focused skills, not here.
Section order in the combined file (Markdown H2 headings or XML tags):
## Context / <context> — runtime environment
## Role / <role> — agent identity
## Behavior / <behavior> — operational rules (skip for one-shot)
## Tools / <tools> — tool definitions (skip if none)
## Task / <task> — the instruction
## Verification / <verification> — observable pass/fail checks against the produced output
Task
Apply to the User's Input
The user invokes this skill with a description of the agent, its purpose, or an existing draft to improve. Specialize every step below to that input.
- What domain is the agent operating in?
- What tools does it have access to (if any)?
- Is it a one-shot prompt, a tool-using prompt, or a fully agentic prompt?
- If the input does not supply enough signal for at least role and task, ask one clarifying question before drafting.
- If the user says "xml", "as xml", or "xml format", produce XML output; otherwise default to Markdown.
Part A: Classify the Prompt Type
Identify the type before writing any section. The type determines which sections are required.
- One-shot: single question or instruction, no tools, no loop → needs role + task only.
- Tool-using: agent has access to specific tools → needs role + behavior + tools + task.
- Agentic: agent runs more than once and may delegate → needs all sections; behavior must include a self-establishing iteration block.
- Retrieval-grounded: agent answers from provided documents → needs role + task with grounding constraints; behavior optional.
Part B: Draft Context
Apply promptcontext principles. Skip if the agent has no runtime environment dependency (e.g. a pure reasoning prompt with no file access, commands, or time sensitivity).
- Derive which fields are needed from what the agent will do: file operations → working directory; OS-sensitive commands → platform; time reasoning → date; version control → git state.
- Include only fields the agent will act on; omit everything it can infer or ignore.
- Static values as literals; dynamic values as
{placeholder} names.
Part C: Draft Role
Apply promptrole principles.
- One identity sentence: "You are a [seniority] [domain] [role] who [behavioral expectation]".
- Narrow the domain: specific beats broad.
- One role only: secondary concerns become constraints, not second roles.
- Add the fallback clause: "If you cannot answer confidently, say so."
Omit everything operational (rules, prohibitions, loop directives) — those go in behavior.
Part D: Draft Behavior
Apply promptbehavior principles. Skip for simple one-shot prompts.
- Classify the behavioral context: read-only, write-capable, or agentic.
- Define operational directives (what to do before acting).
- Define prohibition rules (NEVER + concrete action + failure mode).
- Define decision patterns (reversible-first, simplest-first, parallel vs. sequential).
- Define communication style (answer-first, omit preamble, length default, jargon level).
- For agentic roles: open with a loop declaration that names the iteration steps, then add iteration budget, escalation trigger, termination criteria.
Part E: Draft Tools
Apply prompttool principles. Omit if the agent has no tools.
- List every tool with its exact API name and one-sentence purpose.
- For each tool: trigger condition, skip condition, parameters, preference ordering (when overlap exists).
- One usage example per tool.
- Failure handling per tool.
Part F: Draft Task
Apply prompttask principles.
- Open with a precise action verb (Write, Extract, Classify, Compare — never "help me with").
- Frame the problem before the solution; embed constraints upfront.
- Scope the work: what is in, what is out.
- Provide concrete context (file paths, function names, exact values).
- Specify output format, length, and observable success criteria using
### Part subsections.
- Name edge cases explicitly.
Part G: Draft Verification
Apply promptverification principles. Skip only if the agent produces nothing observable (e.g. a pure conversational reply with no artifact and no side-effects).
- List three to six pass/fail checks against the artifact the task produces.
- Each item is a single observable condition, declarative voice, present tense.
- Cover the output, not the agent's process.
- Do not restate task MUST/NEVER directives verbatim — verification names a measurement, not a directive.
Part H: Review Cross-Section Coherence
Before writing the file, check that sections do not conflict.
- Does behavior define a communication style that contradicts the audience named in role?
- Does task reference a tool not listed in tools?
- Does behavior include a loop but role defines a read-only analyst? (Mismatch in autonomy level.)
- Does verification cover what task produces? (Every artifact named in task should have at least one check.)
- Are signal markers (
MUST, NEVER, IMPORTANT) consistent across sections — same marker means the same urgency level everywhere?
Fix any conflict before proceeding.
Part I: Write the File
Markdown (default) — write a single prompts/{slug}.md with H1 title and H2 sections in canonical order:
# {Agent Name}
## Context
Working directory: {working_directory}
Platform: macOS
## Role
You are a senior backend engineer who reviews distributed systems with a focus on correctness and performance. If you cannot answer confidently, say so.
## Behavior
- MUST read the file before proposing edits.
- NEVER predict tool results before they return — not as prose, not as structured output.
## Tools
### read_file
Read the contents of a file at a given path. Use before editing any file.
## Task
### Part A: Scope
Extract all API endpoint definitions from `src/routes/` — report file path, HTTP method, route pattern, and handler function name. Skip test files.
### Part B: Output requirements
MUST output a markdown table with columns: File, Method, Route, Handler.
NEVER include functions that are not HTTP endpoint handlers.
## Verification
1. Table contains one row per endpoint.
2. No test file endpoints included.
3. All four columns are populated for every row.
XML — write a single prompts/{slug}.xml with XML-tagged sections in canonical order:
<context>
Working directory: {working_directory}
Platform: macOS
</context>
<role>
You are a senior backend engineer who reviews distributed systems…
</role>
<behavior>
- MUST read the file before proposing edits.
</behavior>
<task>
Extract all API endpoint definitions from `src/routes/`…
MUST output a markdown table.
</task>
<verification>
1. Table contains one row per endpoint.
2. No test file endpoints included.
3. All four columns are populated for every row.
</verification>
Verification
- File follows canonical section order: Context → Role → Behavior → Tools → Task → Verification (Markdown) or context → role → behavior → tools → task → verification (XML).
- Each section present matches what this prompt type requires; no extra sections added.
- No operational rules hiding in role; no identity claims hiding in behavior.
- No section exceeds one screen — overloaded sections produce ambiguous agent behavior.
- Signal markers (
MUST, NEVER, IMPORTANT) are used consistently across all sections.
- Format matches user's request:
.md file with H1 + H2 sections for Markdown, .xml file with tags for XML.
Derive a slug: kebab-case of the 2–3 most distinctive words in the agent description. Create the prompts/ directory if it does not exist. Write the single combined file. List the file path to the user. No other output.