README.md

June 10, 2026 ยท View on GitHub


A Claude skill that writes the accurate prompts for any AI tool. Zero tokens or credits wasted. Full context and memory retention. No re-prompting your way to an answer you should have gotten on attempt one.

Works with: Claude, ChatGPT, Gemini, o1/o3, MiniMax, Cursor, Claude Code, GitHub Copilot, Windsurf, Bolt, v0, Lovable, Devin, Perplexity, Midjourney, DALL-E, Stable Diffusion, ComfyUI, Sora, Runway, ElevenLabs, Zapier, Make, and any AI tool you throw at it.


๐Ÿš€ Installation

  1. Download this repo as a ZIP
  2. Go to claude.ai โ†’ Sidebar โ†’ Customize โ†’ Skills โ†’ Upload a Skill

OR Clone directly into Claude Code skills directory (Not Suggested)

mkdir -p ~/.claude/skills
git clone https://github.com/nidhinjs/prompt-master.git ~/.claude/skills/prompt-master

๐Ÿ”ฅ The Problem This Solves

Every AI user wastes credits the same way:

Write vague prompt โ†’ get wrong output โ†’ re-prompt โ†’ get closer โ†’ re-prompt again โ†’ finally get what you wanted on attempt 4

That's 3 wasted API calls. Multiply by 50 prompts a day. That's real money and real time gone.

The key insight

"The best prompt is not the longest. It's the one where every word is load-bearing."

Most "prompt generators" make prompts longer. This skill makes them sharper.


๐ŸŽฏ Usage

In Claude, you can invoke the skill naturally:

Write me a prompt for Cursor to refactor my auth module
I need a prompt for Claude Code to build a REST API โ€” ask me what you need to know
Here's a bad prompt I wrote for GPT-4o, fix it: [paste prompt]
Generate a Midjourney prompt for a cyberpunk city at night
I have a reference image โ€” help me write a prompt to edit just the head angle
Break this prompt down and adapt it for Stable Diffusion

Or explicitly invoke it:

/prompt-master

I want to ask Claude Code to build a todo app with React and Supabase

How It Works

Prompt Master runs a structured pipeline on every request:

  1. Detects the target tool โ€” figures out which AI system the prompt is for and routes silently to the right approach
  2. Extracts 9 dimensions of intent โ€” task, input, output, constraints, context, audience, memory, success criteria, examples
  3. Asks targeted clarifying questions โ€” max 3 questions if critical info is missing, never more
  4. Routes to the right framework โ€” picks and applies the correct prompt architecture automatically, never shown to the user
  5. Applies safe techniques only โ€” role assignment, few-shot examples, XML structure, grounding anchors, memory block as needed
  6. Runs a token efficiency audit โ€” strips every word that doesn't change the output
  7. Delivers the prompt โ€” one clean copyable block with a one-line strategy note

Full Example #1: Generating Prompts for Images

User Input

Write me a midjourney prompt for a realistic samurai standing in the rain at night

Generated Prompt

lone samurai standing in heavy rain at night, traditional armor, 
neon reflections on wet cobblestone street, cinematic lighting, 
dramatic shadows, fog, ultra detailed, photorealistic, 
shallow depth of field --ar 16:9 --v 6 --style raw

negative: blurry, low quality, watermark, cartoon, anime, extra limbs

๐ŸŽฏ Target: Midjourney ยท โšก Framework: Visual Descriptor ยท ๐Ÿ’ฐ Tokens: Light (~60) ยท ๐Ÿ’ก Strategy: Comma-separated descriptors over prose, lighting and mood anchored early, aspect ratio and version locked, negative prompt prevents style drift.


Full Example #2: Generating Prompts for Coding

User Input

Build a claude code prompt for a landing page for a business 
dashboard that looks and feels exactly like notion - smooth animations, 
clean ui

Generated Prompt

Objective:
Build a fully detailed, production-quality static landing page for a 
business dashboard product. Design must match Notion's exact aesthetic โ€” 
clean, minimal, typographic, with smooth animations throughout.

Stack:
Single HTML file with embedded CSS and vanilla JS. No frameworks. 
No external dependencies except Google Fonts (Inter).

Design Spec โ€” match these exactly:
- Background: #ffffff
- Primary text: #1a1a1a
- Secondary text: #6b7280
- Border color: #e5e7eb
- Accent: #000000
- Font: Inter, weights 400 / 500 / 600 / 700
- Base spacing unit: 8px
- Border radius: 6px on cards, 4px on buttons
- Box shadows: 0 1px 3px rgba(0,0,0,0.08) only โ€” no dramatic shadows
- Buttons: black fill, white text, no border radius above 6px

Sections to build in order:
1. Navbar โ€” logo left, nav links center, "Get started free" CTA right. 
   Sticky on scroll, adds subtle border-bottom on scroll with JS.
2. Hero โ€” large left-aligned heading (max 3 lines), subtext, two CTAs 
   (primary black + secondary outlined), hero screenshot mockup 
   placeholder (gray rounded card, 16:9 ratio).
3. Logos bar โ€” "Trusted by teams at..." with 5 placeholder company names 
   in muted gray, centered.
4. Features โ€” 3-column grid. Each card: icon (use emoji), bold title, 
   2-line description. Hover state: border darkens to #d1d5db, 
   translateY(-2px), transition 200ms ease.
5. How it works โ€” alternating left/right layout, 3 steps. Number badge, 
   heading, description, placeholder screenshot card.
6. Pricing โ€” 2 tiers side by side. Free tier: outlined card. Pro tier: 
   black background, white text, "Most popular" badge. List 4 features 
   each with checkmarks.
7. CTA banner โ€” full-width dark section, centered heading, subtext, 
   single CTA button.
8. Footer โ€” 4-column links, copyright line, minimal.

Animations โ€” implement all of these:
- Fade-in + translateY(20px) to translateY(0) on scroll for every section, 
  using IntersectionObserver. Threshold 0.15. Duration 500ms ease-out.
- Staggered animation on feature cards: 100ms delay between each card.
- Navbar CTA button: background transitions from black to #333 on hover, 
  200ms ease.
- Hero CTA primary: same hover transition. Secondary: background goes from 
  transparent to #f3f4f6 on hover.
- Smooth scroll on all anchor links.
- Navbar border-bottom fades in on scroll past 60px using JS scroll event.

Constraints:
- Single file only โ€” all CSS and JS embedded, no external files
- No dependencies except Google Fonts via CDN link tag
- All placeholder images replaced with styled gray div elements
- Must be pixel-perfect at 375px mobile and 1440px desktop
- No CSS frameworks, no utility classes from external sources

Done When:
- All 8 sections render correctly at both breakpoints
- All animations trigger on scroll without layout shift
- Navbar sticks and border appears on scroll
- Hover states work on all interactive elements
- Opens in browser with zero console errors

๐ŸŽฏ Target: Claude Code ยท ๐Ÿ’ฐ Tokens: Medium (~380) ยท ๐Ÿ’ก Strategy: Every vague Notion aesthetic cue translated into exact hex values and pixel specs โ€” Claude Code cannot guess wrong. Animations defined with exact timing, method, and trigger so there is no interpretation needed.


๐Ÿค Works With Any AI Tool

Prompt Master includes specific profiles for 20+ tools. For anything not on the list, it uses a Universal Fingerprint: 4 questions that let it write a quality prompt for any AI system it has never seen before.

Click to view all 30+ tool profiles

ToolCategoryWhat Prompt Master Fixes
ClaudeReasoning LLMRemoves padding, adds XML structure, specifies length
ChatGPT / GPT-5.xReasoning LLMOutput contract, verbosity control, completion criteria
Gemini 2.xReasoning LLMGrounding anchors, citation rules, format locks
o3 / o4-miniThinking LLMShort clean instructions only โ€” never adds CoT (they think internally)
OllamaLocal LLMAsks which model is loaded, includes system prompt for Modelfile
Qwen 2.5 / Qwen3Open-weight LLMChat template format, thinking vs non-thinking mode detection
Local models (Llama, Mistral)Open-weight LLMShorter prompts, simpler structure, no complex nesting
DeepSeek-R1Reasoning LLMShort clean instructions, strips CoT, suppresses thinking output if needed
MiniMax (M3 / M2.7)Reasoning LLMTemperature clamping, thinking tag control, structured output optimization
Claude CodeAgentic AIStop conditions, file scope, checkpoint output
Cursor / WindsurfIDE AIFile path, function name, do-not-touch list, sequential prompt guidance
Cline (formerly Claude Dev)Agentic IDEFile scope, approval gates, stop conditions, task breakdown
GitHub CopilotAutocomplete AIExact function contract as docstring
AntigravityAgentic IDETask-based prompting, Artifact verification, autonomy level
Bolt / v0 / LovableFull-stack generatorStack spec, version, what NOT to scaffold
Figma MakeFull-stack generatorComponent name references, frame-to-code scope
Google StitchFull-stack generatorInterface goal over implementation, Material Design 3 spec
Devin / SWE-agentAutonomous agentStarting state, target state, stop conditions
ManusAutonomous agentTask outcome focus, permission scope, memory anchors
OpenAI Computer UseComputer-use agentScreen state, allowed apps, stop before irreversible actions
Perplexity ComputerComputer-use agentArtifact-first prompting, scoped permissions, verification steps
OpenClawComputer-use agentConversational precision, persistent memory, security constraints
Perplexity / SearchGPTSearch AIMode spec: search vs analyze vs compare
MidjourneyImage AIComma-separated descriptors, parameters, negative prompts
DALL-E 3Image AIProse description, text exclusion โ€” edit vs generate detection
Stable DiffusionImage AIWeight syntax (word:1.3), CFG guidance, mandatory negative prompt
SeeDreamImage AIArt style first, mood and atmosphere descriptors, negative prompt
ComfyUIImage AIPositive/negative node split, checkpoint-specific syntax
Meshy / Tripo / Rodin3D AIStyle + export format + polygon budget + rig requirements
BlenderGPT3D AIPython script output, Blender version, scene context
Unity AI3D / Game AIGame genre, platform target, mechanic description over code
Sora / RunwayVideo AICamera movement, duration, cut style
LTX / Dream Machine / KlingVideo AICinematic language, motion intensity, style reference
ElevenLabsVoice AIEmotion, pacing, emphasis, speech rate
Zapier / Make / n8nWorkflow automationTrigger app + event, action app + field mapping

๐Ÿ“ 12 Prompt Templates (Auto-Selected)

Prompt Master picks the right architecture for every task automatically and routes silently โ€” you never see the framework name, just the prompt.

Click to view all 12 templates

TemplateBest For
RTF (Role, Task, Format)Fast one-shot tasks
CO-STAR (Context, Objective, Style, Tone, Audience, Response)Professional documents, reports, business writing
RISEN (Role, Instructions, Steps, End Goal, Narrowing)Complex multi-step projects
CRISPE (Capacity, Role, Insight, Statement, Personality, Experiment)Creative work, brand voice, iterative content
Chain of ThoughtMath, logic, debugging, multi-step analysis
Few-ShotConsistent structured output, pattern replication
File-Scope TemplateCursor, Windsurf, Copilot โ€” any code editing AI
ReAct + Stop ConditionsClaude Code, Devin, AutoGPT โ€” any autonomous agent
Visual DescriptorMidjourney, DALL-E, Stable Diffusion, Sora โ€” generation
Reference Image EditingEditing an existing image โ€” detects edit vs generate automatically
ComfyUINode-based image workflows โ€” positive/negative split per checkpoint
Prompt DecompilerBreaking down, adapting, simplifying, or splitting existing prompts

๐Ÿ›ก๏ธ 5 Safe Techniques, Applied When Needed

Prompt Master only uses techniques with reliable, bounded effects. Methods known to produce hallucinations or unpredictable output (Tree of Thought, Graph of Thought, Universal Self-Consistency, prompt chaining) are explicitly excluded.

TechniqueWhat It Does
Role AssignmentAssigns a specific expert identity to calibrate depth and vocabulary
Few-Shot ExamplesAdds 2-5 examples when format consistency matters more than instructions
XML Structural TagsWraps sections in XML for Claude-based tools that parse it reliably
Grounding AnchorsAdds anti-hallucination rules for factual and citation tasks
Chain of ThoughtForces step-by-step reasoning for logic tasks โ€” never applied to o1/o3

๐Ÿšซ 35 Credit-Killing Patterns Detected (with Before/After Examples)

Task Patterns (7)

#PatternBeforeAfter
1Vague task verb"help me with my code""Refactor getUserData() to use async/await and handle null returns"
2Two tasks in one prompt"explain AND rewrite this function"Split: explain first, rewrite second
3No success criteria"make it better""Done when function passes existing unit tests and handles null input"
4Over-permissive agent"do whatever it takes"Explicit allowed + forbidden actions list
5Emotional task description"it's totally broken, fix everything""Throws uncaught TypeError on line 43 when user is null"
6Build-the-whole-thing"build my entire app"Break into Prompt 1 (scaffold), Prompt 2 (feature), Prompt 3 (polish)
7Implicit reference"now add the other thing we discussed"Always restate the full task, never reference "the thing we discussed"

Context Patterns (6)

Context Patterns

#PatternBeforeAfter
8Assumed prior knowledge"continue where we left off"Include Memory Block with all prior decisions
9No project context"write a cover letter""PM role at B2B fintech, 2yr SWE experience, shipped 3 features as tech lead"
10Forgotten stackNew prompt contradicts prior tech choiceAlways include Memory Block
11Hallucination invite"what do experts say about X?""Cite only sources you are certain of. If uncertain, say so."
12Undefined audience"write something for users""Non-technical B2B buyers, no coding knowledge, decision-maker level"
13No mention of prior failures(blank)"I already tried X and it failed because Y. Do not suggest X."

Format Patterns (6)

#PatternBeforeAfter
14Missing output format"explain this concept""3 bullet points, each under 20 words, one-sentence summary at top"
15Implicit length"write a summary""Write a summary in exactly 3 sentences"
16No role assignment(blank)"You are a senior backend engineer specializing in Node.js and PostgreSQL"
17Vague aesthetic adjectives"make it look professional""Monochrome palette, 16px base font, 24px line height, no decorative elements"
18No negative prompts (image AI)"a portrait of a woman"Add: "no watermark, no blur, no extra fingers, no distortion, no text"
19Prose prompt for MidjourneyFull descriptive sentence"subject, style, mood, lighting, --ar 16:9 --v 6"

Scope Patterns (6)

#PatternBeforeAfter
20No scope boundary"fix my app""Fix only login form validation in src/auth.js. Touch nothing else."
21No stack constraints"build a React component""React 18, TypeScript strict, no external libraries, Tailwind only"
22No stop condition for agents"build the whole feature"Explicit stop conditions + checkpoint after each step
23No file path for IDE AI"update the login function""Update handleLogin() in src/pages/Login.tsx only"
24Wrong template for toolGPT-style prose used in CursorAdapted to File-Scope Template with path + scope
25Pasting entire codebaseFull repo context every promptScoped to relevant function and file only

Reasoning Patterns (5)

#PatternBeforeAfter
26No CoT for logic task"which approach is better?""Think through both approaches step by step before recommending"
27Adding CoT to reasoning models"think step by step" sent to o1/o3Removed, reasoning models think internally and CoT instructions degrade output
28No self-check on complex output(nothing)"Before finishing, verify output against the constraints above"
29Expecting inter-session memory"you already know my project"Always re-provide the Memory Block
30Contradicting prior decisionsNew prompt ignores earlier architectureMemory Block with all established facts

Agentic Patterns (5)

#PatternBeforeAfter
31No starting state"build me a REST API""Empty Node.js project, Express installed, src/app.js exists"
32No target state"add authentication""/src/middleware/auth.js with JWT verify. POST /login and POST /register in /src/routes/auth.js"
33Silent agentNo progress output"After each step output: โœ… [what was completed]"
34Unlocked filesystemNo file restrictions"Only edit files inside src/. Do not touch package.json, .env, or any config file."
35No human review triggerAgent decides everything"Stop and ask before: deleting any file, adding any dependency, or touching the database schema"

๐Ÿง  Memory Block System

When your conversation has history, Prompt Master pulls out prior decisions and prepends a Memory Block so the AI never contradicts earlier work:

## Memory (Carry Forward from Previous Context)
- Stack: React 18 + TypeScript + Supabase
- Auth uses JWT stored in httpOnly cookies, not localStorage
- Component naming convention: PascalCase, no default exports
- Design system: Tailwind only, no custom CSS files
- Architecture: no Redux, context API only

This is the single biggest fix for long sessions. Most wasted re-prompts come from the AI forgetting what you already decided.


โ„น๏ธ Version History

  • 1.7.0 โ€” Opus 4.8 compatibility. Made Claude 4.x routing version-aware: durable advice generalized across 4.6/4.7/4.8, added Opus 4.8 (current default) profile, kept Opus 4.7 labeled. De-hardcoded the effort-level note (now harness-managed). Template M and pattern 36 cover 4.7 and 4.8. Fixed a stray fragment in patterns.md.
  • 1.6.0 โ€” Opus 4.7 update. Added Template M (Opus 4.7 Task Brief). Updated Claude and Claude Code routing for literalism, adaptive thinking, xhigh effort, and session hygiene. Added patterns 36โ€“37.
  • 1.5.0 โ€” Added more tool routing. New Agentic AI and 3D Model AI routing added. Fixed description to 189 chars. Removed token estimate from output. Added instruction layer and copywriting placeholders
  • 1.4.0 โ€” Added reference image editing detection, ComfyUI support, Prompt Decompiler mode. Fixed trigger description to invoke correctly in Claude Code. 3 new templates added to references folder
  • 1.3.0 โ€” Rebuilt around PAC2026 positional structure (30/55/15). Silent routing replaces user-facing framework selection. References folder introduced
  • 1.2.0 โ€” Restructured for attention architecture. Removed fabrication-prone techniques (ToT, GoT, USC, prompt chaining). Templates and patterns moved to references folder
  • 1.1.0 โ€” Expanded tool coverage, added memory block system, 35 credit killing patterns
  • 1.0.0 โ€” Initial release

๐Ÿ“„ License

MIT: See LICENSE for details.


โญ Star History

Star History Chart