Prompt Lab
Capture the original session prompt, analyze it, and generate an optimized version. Builds prompt engineering intuition over time.
Process
- •
Check for existing file — Read
./PROMPT_LAB.mdif it exists. If found:- •Preserve previous entries under a
## Previous Promptsheading - •Add new entry as the primary (top) section with updated timestamp
- •Preserve previous entries under a
- •
Identify the initial prompt — Find the user's first substantive message that defined the session's work. This is the raw prompt exactly as written.
- •
Analyze the prompt against these dimensions:
- •Clarity — Was the goal unambiguous?
- •Scope — Was the scope well-defined or open-ended?
- •Context provided — Did it give enough background?
- •Constraints — Were boundaries/requirements stated?
- •Actionability — Could Claude act immediately or needed clarification?
- •
Generate the optimized prompt — Rewrite incorporating:
- •Everything learned during the session
- •Context that had to be discovered/clarified mid-session
- •Specific file paths, module names, or technical details that emerged
- •Explicit scope boundaries
- •Skills to load
- •Clear success criteria
- •
Add coaching notes — Brief, specific tips about what made the difference between the original and optimized versions.
- •
Write
PROMPT_LAB.mdin the current working directory.
Output Format
markdown
# Prompt Lab
**Date:** {YYYY-MM-DD}
**Session:** {branch or topic}
---
## Original Prompt
> {Exact verbatim copy of the user's initial prompt, in a blockquote}
## Analysis
| Dimension | Rating | Notes |
| ------------- | ------------------------------------------ | ------------------------------- |
| Clarity | {good/fair/vague} | {specific observation} |
| Scope | {focused/broad/undefined} | {specific observation} |
| Context | {sufficient/partial/missing} | {what was missing} |
| Constraints | {explicit/implicit/none} | {what should have been stated} |
| Actionability | {immediate/needed-clarification/ambiguous} | {what blocked immediate action} |
**What worked well:** {1-2 things the prompt did right}
**What cost time:** {things that required clarification or discovery mid-session}
## Optimized Prompt
> {The rewritten prompt — ready to copy-paste into a new session}
>
> {This should be self-contained: include context, constraints, relevant paths,
> skills to load, and clear success criteria. A new Claude session reading only
> this prompt should be able to start working immediately.}
## Prompt Tips
{2-4 bullet points — specific, actionable lessons from this prompt. Not generic advice.}
- {Tip grounded in what actually happened this session}
- {Tip about what context/constraint would have saved time}
---
_Generated by /prompt-lab — building prompt intuition one session at a time._
Rules
- •Verbatim original — Copy the exact original prompt, warts and all. No editing.
- •Honest analysis — If the prompt was great, say so. If it was vague, say that too. No flattery.
- •Optimized != longer — The best prompts are concise. Add specificity, not word count.
- •Session-specific tips — Generic prompt advice ("be specific") is useless. Ground every tip in what actually happened.
- •The optimized prompt must be self-contained — Someone should be able to paste it cold into a new session and get productive immediately.
- •Write to
./PROMPT_LAB.mdunless the user specifies a different path