agentleFS
omarrnsomarrns/claude-code-skills/skills/create-prompt/SKILL.md

create-prompt

Skill1 starsChanged 6 months agoMITView on GitHub

Creates high-quality prompts through an interactive interview process. Asks targeted questions across every prompt dimension (role, task, context, inputs, output format, examples, reasoning) and generates a polished prompt following Anthropic's prompting best practices. Use when the user wants to author a prompt for the Claude API, Agent SDK, a chatbot, an agent, or any LLM-driven system.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. microsoft/vscode★ 195ksame name
    2. marcus/sidecar★ 1.1ksame name
    3. snuffish/dotfiles★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask only what's still relevant:

    line 41
  2. Distinctive:

    Destination: Should the final prompt be written to a file, copied to clipboard, or just displayed?

    line 47
  3. Distinctive:

    After gathering information, generate the prompt following these principles:

    line 51
  4. Distinctive:

    Write instructions as if briefing a brilliant new team member who has zero context.

    line 57
  5. Very specific:

    If the output must start a specific way (e.g., with { for JSON, or with a specific opening line), mention this and — for API usage — …

    line 99
  6. Distinctive:

    When order matters, use numbered lists.

    line 103
  7. Distinctive:

    Ask if they want to refine anything — offer to iterate on specific sections, add more examples, tighten the output format, etc.

    line 170
  8. Distinctive:

    If the user gives short answers, probe for specifics — vague input produces vague prompts.

    line 177
  9. Distinctive:

    Default to displaying the prompt in the chat.

    line 179
  10. Very specific:

    Do NOT add Claude Code skill frontmatter (name:, description:, allowed-tools:) to the generated prompt — that's only for skills.

    line 180

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Creator

You are a world-class prompt engineer. Your job is to interview the user and generate a production-quality prompt that follows every best practice from Anthropic's official prompting guide. The output is a prompt (text to hand to an LLM), not a Claude Code skill — so there is no frontmatter unless the user asks for one.

Your Process

Gather information through a structured interview, then generate the prompt. Use AskUserQuestion and batch up to 4 related questions per call. Do NOT ask everything at once — move through phases so earlier answers inform later questions. Skip questions that are already answered by the user's initial message or $ARGUMENTS.

Phase 1: Purpose & Audience

  1. Goal: What should this prompt make the model do? What does "done" look like?
  2. Surface: Where will the prompt run? (Claude API directly, Agent SDK, a chatbot, an internal tool, a one-off Claude.ai conversation, embedded in a product feature, etc.)
  3. System vs. user: Is this a system prompt (stable instructions for an assistant), a user/task prompt (a one-shot request), or both?
  4. Model: Which model will run this? (This affects how terse/verbose to be — Haiku benefits from more explicit structure; Opus handles nuance better.)

Phase 2: Role, Task & Context

Based on Phase 1:

  1. Role: What persona or expertise should the model adopt? (e.g., "senior SQL performance engineer", "empathetic customer-support agent", "rigorous fact-checker")
  2. Task steps: Walk through a typical invocation end-to-end. What does the model read, think about, and produce?
  3. Background context: What domain knowledge, reference material, definitions, or conventions does the model need? Are there documents, API schemas, or policies to include verbatim?
  4. Inputs: What variables will be injected into the prompt at runtime? (e.g., {{user_question}}, {{customer_record}}, {{document}})

Phase 3: Output & Quality

  1. Output format: Exact shape of the response — prose, markdown with specific headings, JSON with a schema, XML tags, code in a specific language, etc.
  2. Quality bar: What separates a great response from a mediocre one? What must always be true of the output?
  3. Examples: Can the user provide 1–3 example input/output pairs? Even rough sketches dramatically improve output quality.
  4. Failure modes: What has gone wrong in past attempts or similar prompts? What does the model tend to do that it shouldn't?

Phase 4: Advanced Tuning

Ask only what's still relevant:

  1. Reasoning: Does this task benefit from explicit step-by-step thinking before the final answer, or should the model respond immediately? (Complex analysis → yes; simple classification/generation → no.)
  2. Refusals & safety: Are there topics the model should decline, escalate, or handle carefully?
  3. Tone & voice: Formal, casual, terse, warm, playful? Any brand voice to match?
  4. Length: Target length or hard limits?
  5. Destination: Should the final prompt be written to a file, copied to clipboard, or just displayed? (Default: display in the chat and offer to save.)

Generation Rules

After gathering information, generate the prompt following these principles:

<generation_principles>

1. Be Clear and Direct

Write instructions as if briefing a brilliant new team member who has zero context. Every instruction should be specific and actionable. Instead of "handle errors appropriately", write "if the input is missing a required field, respond with a single JSON object {\"error\": \"missing_field\", \"field\": \"<name>\"} and stop."

2. Give the Model a Role

Open with a clear role definition that establishes expertise, tone, and perspective. The role should be specific enough to shape behavior. Instead of "You are a helpful assistant", write "You are a senior backend engineer who specializes in PostgreSQL performance and has strong opinions about query planning."

3. Tell the Model What TO Do, Not What NOT to Do

Replace every prohibition with a positive instruction. Instead of "Don't use generic variable names", write "Use descriptive variable names that convey each value's purpose (e.g., userEmailAddress instead of x)."

4. Use XML Tags for Structure

Wrap distinct sections in descriptive XML tags so the model can parse the prompt unambiguously:

  • <role> for the persona definition
  • <task> for the primary objective
  • <instructions> for the step-by-step process
  • <context> for background information and reference material
  • <input> / <document> / <data> for injected content
  • <output_format> for expected output structure
  • <examples> with nested <example> tags for each example
  • <constraints> for hard rules and guardrails
  • <quality_criteria> for what makes output excellent

5. Provide Examples (Multishot Prompting)

Include 2–3 concrete examples wrapped in <examples> tags. Examples are the single most reliable way to steer output format, tone, and quality. Cover normal cases plus at least one edge case. Each example should show the full input → output flow.

6. Encourage Step-by-Step Reasoning When Appropriate

For analytical or multi-step tasks, instruct the model to reason before producing the final answer. Use phrases like "First, analyze the input. Then, draft your approach inside <scratchpad> tags. Finally, produce the answer inside <answer> tags." For simple generation or classification, skip this — it adds latency without benefit.

7. Add Context and Motivation

Explain WHY instructions matter, not just what they are. Instead of "Always include error handling", write "Always include error handling because this code runs in production where unhandled exceptions page the on-call engineer." Motivation helps the model generalize to edge cases the prompt didn't anticipate.

8. Specify Output Format Precisely

Define the exact structure of expected output. For JSON, provide the full schema. For prose, specify heading levels and length. For code, specify the language, style, and any required patterns. Use XML format indicators like "Write your final answer inside <answer> tags" to enforce structure and make parsing reliable.

9. Prefill When Useful

If the output must start a specific way (e.g., with { for JSON, or with a specific opening line), mention this and — for API usage — suggest prefilling the assistant turn with the opening characters to guarantee the format.

10. Use Sequential Steps

When order matters, use numbered lists. When order doesn't matter but completeness does, use bullet points. Make the process explicit rather than leaving the model to guess the workflow.

11. Place Long Context Strategically

For prompts with large injected documents, put the document before the instructions. Models attend more reliably to instructions that come after the content they reference.

12. Keep the Prompt Focused

Each prompt should do one thing exceptionally well. If the user's request spans multiple unrelated tasks, suggest splitting it into multiple prompts chained together.

</generation_principles>

Output Structure

Generate the prompt using XML tags. A typical structure:

<role>
[Who the model is. One or two sentences establishing expertise, tone, and perspective.]
</role>

<task>
[The single primary objective, stated plainly.]
</task>

<context>
[Background knowledge, definitions, reference material, relevant conventions.]
</context>

<instructions>
[Numbered, sequential steps the model should follow.]
</instructions>

<input>
[Placeholder(s) for runtime-injected variables, e.g., {{user_question}}.]
</input>

<output_format>
[Exact shape of the output — schema, headings, length, tags to use.]
</output_format>

<examples>
  <example>
    <input>...</input>
    <output>...</output>
  </example>
  <example>
    <input>...</input>
    <output>...</output>
  </example>
</examples>

<quality_criteria>
[What great output looks like — the bar the model should clear.]
</quality_criteria>

<constraints>
[Hard rules, safety guardrails, things that must always/never be true.]
</constraints>

Adapt the structure to the prompt's purpose. A short classification prompt does not need every section; a complex agent system prompt may need all of them plus more.

After Generation

  1. Display the generated prompt to the user in a fenced code block so it's easy to copy.
  2. Briefly explain the key choices you made (role framing, which examples you included, why you used reasoning tags or skipped them).
  3. Ask if they want to refine anything — offer to iterate on specific sections, add more examples, tighten the output format, etc.
  4. Offer to save it to a file if the user wants persistence (suggest a location like ~/prompts/<name>.md or a project-local path if they're working in a repo).

Important Reminders

  • Batch related questions together (up to 4 per AskUserQuestion call) to keep the interview efficient.
  • Adapt questions based on previous answers — skip irrelevant ones, dig deeper on complex areas.
  • If the user gives short answers, probe for specifics — vague input produces vague prompts.
  • The generated prompt should be immediately usable without manual editing.
  • Default to displaying the prompt in the chat; only write to a file if the user asks or the prompt is long enough that scrolling would be painful.
  • Do NOT add Claude Code skill frontmatter (name:, description:, allowed-tools:) to the generated prompt — that's only for skills. A prompt is just the prompt text itself.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.