Crafting Prompts
Analyzes, crafts, and improves prompts using 19 research-backed techniques (Chain-of-Thought, Structured Output, Few-Shot, Placement, Salience, Roles, Positive Framing, Reasoning-First, Verbalized Sampling, Self-Reflection, plus extended and agentic techniques). Use when improving a prompt, writing a new prompt, critiquing a prompt's weaknesses, explaining a prompting technique, crafting subagent/tool prompts, or optimizing prompts for a specific model (Claude, GPT, DeepSeek, Gemini, Kimi, Qwen).
Diagnostic practice for prompt engineering, not a checklist service. The default failure mode is "more instructions = better" — wrong past a threshold (IFScale shows instruction overload degrades output). Focus on what to REMOVE and ACTIVATE, not just what to add.
Detect intent and route:
| Signal | Mode |
|---|---|
| User pastes an existing prompt | A: Analyze |
| User describes requirements for a new prompt | B: Craft |
| User asks about a specific technique | C: Teach |
| User wants a fast improvement, low ceremony | D: Quick Fix |
| Unclear | Ask which mode fits, or show the menu below |
Commands:
- A/B/C/D or mode name to begin
- 1-10 or technique name for Teach mode
- *model [name] - model-specific guidance
- *extended - show extended techniques
- *help - show this menu
| # | Technique | Impact | Summary | Failure if missing |
|---|---|---|---|---|
| 1 | Chain-of-Thought | +40% accuracy | "Think step by step before answering" | Skips reasoning steps |
| 2 | Structured Output | 99%+ compliance | Constrain to JSON/XML schema | Format drift |
| 3 | Few-Shot Examples | +15-30% specificity | Show 2-5 input/output examples | Calibration gap |
| 4 | Placement | +50% retrieval | Critical info at start/end, not middle | Buried instructions |
| 5 | Salience | +23-31% compliance | XML tags, caps, explicit labels | Constraints overlooked |
| 6 | Roles | +10-20% domain accuracy | Assign persona with expertise | Generic register |
| 7 | Positive Framing | +15-20% compliance | "Do X" not "Don't Y" | Constraint confusion |
| 8 | Reasoning-First | -20-30% hallucination | Evidence before conclusion | Hallucinated conclusions |
| 9 | Verbalized Sampling | +1.6-2.1x diversity | Multiple variants with probabilities | Centroid output (bland average) |
| 10 | Self-Reflection | +15-25% accuracy | Ask model to critique and revise | Uncaught errors |
Extended techniques (load reference/extended/{name}.md when relevant): decomposition, compression, sufficiency, scope, format-spec, uncertainty (epistemic labels: [E]vidence/[L]ogical/[S]peculation/[C]ontrarian), chaining, self-consistency, tree-of-thoughts, react-loop, tool-description-craft, context-engineering, multi-session, negative-space-definition, permission-escalation.
Model guides (load reference/models/{name}.md): claude, openai, deepseek, gemini, kimi, qwen.
Mode A — Analyze
Diagnose why this prompt will underperform. Never just note absence — name the specific failure each gap causes for this task.
Progress:
- Quote the prompt exactly
- Score against 10-technique scorecard (+/!/x/-)
- Identify top 3 improvements with before/after + one-sentence "why"
- Produce full optimized rewrite
- Note target model if specified, apply model-specific adjustments
Output template:
PROMPT ANALYSIS
===============
CURRENT PROMPT
--------------
[verbatim]
TECHNIQUE SCORECARD
--------------------
| # | Technique | Status | Issue/Note |
|---|-----------|--------|------------|
... (10 rows, + present / ! partial / x missing / - N/A)
TOP 3 IMPROVEMENTS
-------------------
1. [Technique]: [improvement]
Before: ...
After: ...
Why: [1 sentence]
2. ...
3. ...
OPTIMIZED PROMPT
-----------------
[full rewrite]
QUALITY SUMMARY
- Improvement potential: High/Medium/Low
- Techniques applied: [list]
- Target model: [note adjustments]
Next steps: explain a technique (Mode C)? iterate? targeting a specific model?
Mode B — Craft
Goal: activate expert behavior, not generate "probability-averaged centroid output." Ask before drafting — do not assume:
- What task should this prompt accomplish?
- What model will run this? (Claude, GPT, DeepSeek, etc.)
- What output format do you need?
- Any specific constraints or requirements?
- Should the prompt default to implementing or recommending? (Action Bias)
- Single-turn or part of an agentic workflow? (if agentic → use Agentic Prompting section below)
- Who is the audience? Expert peers, beginners, mixed?
Wait for answers. Then select techniques by task type: reasoning→CoT/Reasoning-First; structured data→Structured Output/Format-Spec; complex→Decomposition/Few-Shot; consistency-critical→Self-Reflection.
Output template:
CRAFTED PROMPT
==============
REQUIREMENTS UNDERSTOOD
- Task: ...
- Target model: ...
- Output format: ...
- Constraints: ...
TECHNIQUES APPLIED
- [Technique]: [why relevant]
...
THE PROMPT
----------
[full prompt]
RATIONALE
---------
[key design choices]
QUALITY SUMMARY
- Techniques applied: [n]/10 core
- Model-specific: Yes/No
- Confidence: High/Medium/Low
Next steps: test and iterate? explain techniques used? different approach?
Mode C — Teach
Load reference/{technique}.md. Present mechanism, a deep worked example, model-specific notes, then a practice exercise.
Mode D — Quick Fix
Speed over depth. Identify the 3 highest-impact improvements, apply immediately, minimal explanation.
QUICK FIX
=========
CHANGES MADE
- [Change 1]: one-liner
- [Change 2]: one-liner
- [Change 3]: one-liner
IMPROVED PROMPT
----------------
[full improved prompt]
Want deeper analysis? Try mode A.
Tool description optimization (reference/extended/tool-description-craft.md): make implicit context explicit, use human-readable return values, consolidate tools.
Subagent briefing pattern — every subagent prompt needs:
- Context — what the task is and why it matters
- Constraints — time budget, scope limits, effort level
- Output format — exactly what to return
- Success criteria — how to know it's done
ReAct loop: Reason → Act → Observe → Reason. See reference/extended/react-loop.md.
Action bias — choose one explicitly per prompt:
- Proactive: "Implement changes rather than suggesting them"
- Conservative: "Default to research and recommendations"
- Balanced: "Implement straightforward changes; recommend for complex ones"
Context window management: just-in-time loading over pre-loading. Compaction strategies: summarize, clear tool results, full reset. See reference/extended/context-engineering.md and reference/extended/multi-session.md.
4.6 over-triggers on "CRITICAL: You MUST…" scaffolding. 4.7 follows literal MUST statements too rigidly, ignoring softening context. Same fix, different cause:
- Drop "CRITICAL: You MUST…" — let instructions stand on their own
- Reserve CAPS for genuinely load-bearing rules only (e.g., iron laws in debugging skills)
- Drop anti-laziness pressure ("be thorough", "don't be lazy") — causes overthinking, not more effort
- Use the
effortparameter (xhigh for agentic, high for knowledge work) instead of prompt-level reasoning simulation - Drop explicit "think step by step" — adaptive thinking already handles it; competes with native reasoning
- Soften tool-triggering language: "use when helpful" > "MUST use when X" (literal firing burns tokens)
- At low/medium effort, 4.7 scopes tightly — add one targeted nudge where depth matters: "This step involves multi-step reasoning. Outline your logic before responding."
- Critical info at start or end (Placement)
- Constraints explicit and positive-framed
- Output format specified
- Model-specific adjustments applied
- Action bias declared
- Context budget considered
Example 1: Input: "Analyze this: 'You are an expert. Summarize the article.'" Output: Scorecard shows Roles=partial (generic "expert," no domain), Structured Output=missing (no format spec → inconsistent length/structure), Placement=N/A (too short to matter). Top improvement: add role specificity ("You are a financial analyst summarizing for a non-technical CFO") + output format (3 bullets, max 50 words each) — because without format spec, summary length will drift across calls.
Example 2: Input: "Craft a prompt for a code review subagent, targeting Claude, agentic workflow" Output: Asks clarifying questions (task scope, output format, action bias, audience) → applies Subagent Briefing Pattern (Context/Constraints/Output/Success criteria) + Reasoning-First (evidence before verdict) + Structured Output (findings as JSON with severity field) + soft tool-triggering language per Claude 4.7 guidance.
- Diagnose why a gap causes failure for this specific task — never a bare checklist
- In Craft mode, always wait for answers to elicitation questions before drafting
- Prefer removing/consolidating instructions over adding more once a prompt is dense
- Match technique selection to task type, not habit
- Load model-specific reference files only when a model is named — JIT, not upfront
- Treating Analyze mode as a scorecard-only exercise (missing the "why it fails" diagnosis)
- Assuming unstated requirements in Craft mode instead of asking
- Piling on "CRITICAL/MUST" language for non-load-bearing instructions
- Adding CoT to reasoning models (o1/o3, R1) — hurts performance, it's already built in
- Using anti-laziness pressure phrases, which cause overthinking rather than diligence
- Recommending more instructions as the default fix — check for instruction overload first