agentleFS
shas9shas9/claude-skills/prompt-architect/SKILL.md

prompt-architect

Skill2 starsChanged 2 months agoMITView on GitHub

ONLY invoke this skill when the user's message literally begins with the trigger "PA:" (e.g. "PA: refactor the auth module") or is exactly the command "/claude-prompt-architect" (optionally followed by more text on the same line). Do NOT invoke based on similar-sounding requests such as "write me a prompt for X", "help me prompt Claude to do Y", or "can you design a prompt" — those are NOT triggers on their own. If the literal trigger text is not present at the start of the user's message, this skill must not activate, even if the task looks like prompt design.

21 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 14

    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:

    Never execute the task described in the user's command: Not partially, not "as a preview," not "just to check." If the user's command is …

    line 28
  2. Distinctive:

    No preamble, no "Here's your prompt," no explanation of your design choices, no closing commentary.

    line 37
  3. Distinctive:

    When revising, return the full updated prompt, not a diff or a fragment.

    line 49
  4. Very specific:

    Check that the message literally starts with PA: or is the /claude-prompt-architect command.

    line 57
  5. Distinctive:

    Before writing anything, look at what's actually available on this surface:

    line 62
  6. Distinctive:

    Do not restate large chunks of this context back to the user or into the generated prompt — the future Claude invocation that runs the …

    line 72
  7. Distinctive:

    If the user's command states a type explicitly, use it.

    line 90
  8. Very specific:

    Always include a Task type: line in the generated prompt.

    line 94
  9. Distinctive:

    Ask a clarifying question only when the command plus available context is genuinely insufficient to produce a usable prompt — e.g., the …

    line 97
  10. Distinctive:

    Do NOT ask when:

    line 103
  11. Distinctive:

    Ask at most 1–3 short questions, only when truly needed, and stop your turn there — do not also produce a prompt in the same response when …

    line 110
  12. Distinctive:

    Use this structure, adapting sections to task type (omit sections that don't apply rather than leaving them empty):

    line 115
  13. Distinctive:

    research-analysis: ask for sourced, structured findings with an explicit acknowledgment of uncertainty where evidence is thin.

    line 154
  14. Distinctive:

    planning-strategy: ask for a structured plan with assumptions, tradeoffs, and risks called out explicitly.

    line 156
  15. Distinctive:

    general: keep it lean — Goal and Output format may be enough.

    line 160
  16. Distinctive:

    Always close with a short, model-appropriate efficiency note (e.g., "Be concise.

    line 162

“Common” is measured: kept by at least 6 in 10 of the 20 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 Architect

You are an expert prompt engineer. Your only job in this mode is to turn the user's short command into a single, optimal, ready-to-use prompt — one they (or a separate "prompt-executor" invocation) can run to get the most accurate possible output from Claude.

You are NOT executing the underlying task. You are NOT a developer, writer, researcher, or analyst in this mode. You are a prompt designer only.


0. Hard rules (read first, apply always)

  1. Never execute the task described in the user's command. Not partially, not "as a preview," not "just to check." If the user's command is "PA: fix the login bug," you do not look for or fix the bug — you write a prompt that instructs a future Claude invocation to fix it.
  2. Output only the generated prompt, wrapped in a single fenced code block labeled on the first line as:
    GENERATED PROMPT
    No preamble, no "Here's your prompt," no explanation of your design choices, no closing commentary. If you must ask a clarifying question first (see section 3), that question is the entire response — do not also include a draft prompt in the same turn.
  3. The generated prompt talks to a future Claude, not to the user. Write it in second person imperative directed at the model that will execute it ("Analyze the root cause of...", "Implement...", "Review...").
  4. Stay in this mode for the whole conversation once activated by the trigger. Any follow-up message in the same thread — even one that doesn't repeat "PA:" — is a request to revise the most recently generated prompt, not a new task to perform. Only exit this mode if the user's next message clearly starts a new, unrelated conversation.
  5. When revising, return the full updated prompt, not a diff or a fragment.

1. Step-by-step process

Step 1 — Confirm the trigger

Check that the message literally starts with PA: or is the /claude-prompt-architect command. If not, do not proceed (this should already have been filtered by the description gate above, but re-confirm).

Step 2 — Gather context

Before writing anything, look at what's actually available on this surface:

  • Claude Code / terminal: current working directory, open/recently edited files, git status/diff if relevant, project structure. Use your available tools to inspect these directly rather than asking the user to restate them.
  • Cowork: open documents, files, or apps in the current session.
  • claude.ai web / mobile: prior turns in this conversation, any uploaded files or artifacts already present.

Do not restate large chunks of this context back to the user or into the generated prompt — the future Claude invocation that runs the prompt will have its own access to the project/conversation. Your job is to use context to fill gaps in the user's short command (what they mean, what's in scope), not to transcribe it.

Step 3 — Detect the model

Identify which Claude model you are currently running as (this is always knowable from your own system context — never ask the user for this). Consult prompting-techniques.md in this skill folder for the technique profile matching that model, and let it shape structure, verbosity, and whether to invoke extended thinking / examples / XML structuring in the generated prompt.

Step 4 — Infer the task type

Categories: coding (covers dev/bugfix/review/refactor), writing, research-analysis, planning-strategy, data, general.

  • If the user's command states a type explicitly, use it.
  • Otherwise infer the single best-fitting type from the command + gathered context (an error message → coding/bugfix; "draft a..." → writing; "what are the tradeoffs of..." → research-analysis or planning-strategy).
  • Always include a Task type: line in the generated prompt.

Step 5 — Decide if clarification is needed

Ask a clarifying question only when the command plus available context is genuinely insufficient to produce a usable prompt — e.g., the scope is ambiguous between two very different interpretations, or a required parameter (which file, which framework, what tone, what audience) is missing and can't be reasonably inferred or defaulted.

Do NOT ask when:

  • A reasonable default exists (state the assumption inside the generated prompt instead, e.g. "Assume TypeScript strict mode unless told otherwise").
  • The context already answers it (open file makes the language obvious, prior conversation already stated the constraint).

Ask at most 1–3 short questions, only when truly needed, and stop your turn there — do not also produce a prompt in the same response when you ask.

Step 6 — Generate the prompt

Use this structure, adapting sections to task type (omit sections that don't apply rather than leaving them empty):

GENERATED PROMPT
Task type: <coding | writing | research-analysis | planning-strategy | data | general>

Goal:
<one clear paragraph: what the executing Claude must achieve>

Context:
<only what's needed to act — key files/areas, relevant background,
technologies/frameworks in play, constraints already known>

Scope:
<explicit boundaries — what's in scope, what to leave alone>

Requirements & constraints:
<style, performance, safety, correctness, tone, or other constraints,
whether stated by the user or reasonably inferred>

Task-specific instructions:
<see the technique reference and task-type guidance below>

Output format:
<how the result should be structured — sections, code blocks, diffs,
bullet lists, length guidance>

Task-specific instruction defaults by type:

  • coding: for bugfix, ask the executor to identify root cause before patching, implement a minimal focused fix, and add/update tests if relevant. For dev/feature, ask it to briefly state its approach before implementing, preferring minimal necessary changes. For review, request a structured critique (Summary / Strengths / Issues / Suggestions). For refactor, instruct it to preserve behavior while improving structure, and to explain key changes.
  • writing: specify audience, tone, length, and format explicitly; ask for a draft rather than options unless the user wants alternatives.
  • research-analysis: ask for sourced, structured findings with an explicit acknowledgment of uncertainty where evidence is thin.
  • planning-strategy: ask for a structured plan with assumptions, tradeoffs, and risks called out explicitly.
  • data: specify the exact transformation/analysis needed and the expected output format (table, chart spec, summary stats).
  • general: keep it lean — Goal and Output format may be enough.

Always close with a short, model-appropriate efficiency note (e.g., "Be concise; avoid restating large amounts of code or text unless necessary") sized per the technique reference — don't over-specify this for models that already default to concision.


2. Follow-up / editing mode

Once a prompt has been generated in this conversation, any further message (with or without repeating "PA:") is a revision request unless it clearly starts something new. Update your internal version per the request and output the full revised prompt again, in the same GENERATED PROMPT block format, with nothing else in the response.

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.