### Few-Shot Template for Structured Output Source: https://context7.com/nidhinjs/prompt-master/llms.txt Use this template to provide examples of input-output pairs to guide the model toward a specific structured format. ```text Convert informal product feedback into structured bug reports. Here are examples of the exact format needed: the login button doesn't work on mobile **Title:** Login button unresponsive on mobile devices **Severity:** High **Steps:** 1. Open app on mobile 2. Navigate to login 3. Tap login button **Expected:** User is logged in **Actual:** Button does not respond to tap dark mode is too dark can't see text **Title:** Insufficient text contrast in dark mode **Severity:** Medium **Steps:** 1. Enable dark mode 2. View any text content **Expected:** Text is readable **Actual:** Text has insufficient contrast with background Now apply this exact pattern to: "the search takes forever and sometimes shows wrong results" ``` -------------------------------- ### Few-Shot Prompt Template Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use when the output format is easier to show than describe. Examples outperform written instructions for format-sensitive tasks. Use XML tags to wrap examples as Claude parses XML reliably. ```plaintext [Task instruction] Here are examples of the exact format needed: [example input 1] [example output 1] [example input 2] [example output 2] Now apply this exact pattern to: [actual input] ``` -------------------------------- ### Install Prompt Master for Claude Code Source: https://context7.com/nidhinjs/prompt-master/llms.txt Commands to clone the repository into the local Claude Code skills directory. ```bash # Clone into Claude Code skills directory mkdir -p ~/.claude/skills git clone https://github.com/nidhinjs/prompt-master.git ~/.claude/skills/prompt-master ``` -------------------------------- ### Invoke Prompt Master via Natural Language or Slash Command Source: https://context7.com/nidhinjs/prompt-master/llms.txt Examples of how to trigger the skill using natural language requests or the explicit slash command. ```text # Natural invocation examples 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 # Explicit invocation /prompt-master I want to ask Claude Code to build a todo app with React and Supabase ``` -------------------------------- ### Generate Midjourney Prompt for Image Source: https://github.com/nidhinjs/prompt-master/blob/main/README.md Example of a user input and the corresponding generated Midjourney prompt for an image. The generated prompt includes detailed descriptors, lighting, mood, and technical parameters. ```text Write me a midjourney prompt for a realistic samurai standing in the rain at night ``` ```text 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 ``` -------------------------------- ### Generate Claude Code Prompt for Coding Task Source: https://github.com/nidhinjs/prompt-master/blob/main/README.md Example of a user input for a coding task, requesting a Claude Code prompt to build a Notion-like landing page with smooth animations and clean UI. ```text Build a claude code prompt for a landing page for a business dashboard that looks and feels exactly like notion - smooth animations, clean ui ``` -------------------------------- ### Explicitly Invoke Prompt Master Skill Source: https://github.com/nidhinjs/prompt-master/blob/main/README.md Example of explicitly invoking the Prompt Master skill using its command prefix, followed by the user's request. ```text /prompt-master I want to ask Claude Code to build a todo app with React and Supabase ``` -------------------------------- ### Invoke Prompt Master Skill Naturally Source: https://github.com/nidhinjs/prompt-master/blob/main/README.md Examples of how to invoke the Prompt Master skill within Claude by naturally describing the desired prompt. The skill will then ask clarifying questions if needed. ```text Write me a prompt for Cursor to refactor my auth module ``` ```text I need a prompt for Claude Code to build a REST API — ask me what you need to know ``` ```text Here's a bad prompt I wrote for GPT-4o, fix it: [paste prompt] ``` ```text Generate a Midjourney prompt for a cyberpunk city at night ``` ```text I have a reference image — help me write a prompt to edit just the head angle ``` ```text Break this prompt down and adapt it for Stable Diffusion ``` -------------------------------- ### Diagnostic Patterns for Prompt Optimization Source: https://context7.com/nidhinjs/prompt-master/llms.txt Replace vague instructions with specific, goal-oriented prompts to reduce token waste and improve accuracy. ```markdown # Task Patterns ❌ "help me with my code" ✅ "Refactor getUserData() to use async/await and handle null returns" ❌ "explain AND rewrite this function" ✅ Split into two prompts: explain first, rewrite second ❌ "make it better" ✅ "Done when function passes existing unit tests and handles null input" # Context Patterns ❌ "continue where we left off" ✅ Include Memory Block with all prior decisions ❌ "what do experts say about X?" ✅ "Cite only sources you are certain of. If uncertain, say so." ``` -------------------------------- ### Tool-Specific Routing for Reasoning Models Source: https://context7.com/nidhinjs/prompt-master/llms.txt Adjust prompt complexity and structure based on whether the target model is a standard LLM or a reasoning-native model. ```markdown # For Claude, GPT-5.x, Gemini, Qwen2.5 (standard reasoning) - Use full structure, XML tags, explicit format specs - Chain of Thought is appropriate for logic tasks - Can handle longer, more complex prompts # For o3, o4-mini, DeepSeek-R1, Qwen3 thinking mode (reasoning-native) - SHORT clean instructions ONLY — under 200 words - NEVER add CoT, "think step by step", or reasoning scaffolding - State goal and desired output format. Nothing more. - Zero-shot first, few-shot only if strictly needed # Example for o3: Write a Python function that finds the longest palindromic substring. Return only the code, no explanation. # Example for Claude: Building a user management system in Python for a Flask application. Need to find palindromic substrings in user-generated content for a word game feature. Write a Python function that finds the longest palindromic substring in a given string. - Time complexity must be O(n²) or better - Handle empty strings and single characters - Return the first occurrence if multiple palindromes have the same length Python function with docstring explaining parameters and return value. Include 2-3 test cases as comments. ``` -------------------------------- ### ComfyUI Node-Based Workflow Prompts Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use for ComfyUI node-based workflows. Always output Positive and Negative prompts separately. Inquire about the checkpoint model being used, as syntax and token limits vary. Recommended settings for Sampler, CFG Scale, Steps, and Resolution are provided. ```text POSITIVE PROMPT: [subject], [style], [mood], [lighting], [composition], [quality boosters: highly detailed, sharp focus, 8k] NEGATIVE PROMPT: [what to exclude: blurry, low quality, watermark, extra limbs, bad anatomy, distorted, oversaturated] CHECKPOINT: [model name] SAMPLER: Euler a (recommended starting point) CFG SCALE: 7 (increase for stricter prompt adherence) STEPS: 20-30 RESOLUTION: [width x height — must be divisible by 64] ``` -------------------------------- ### RTF Template for One-Shot Tasks Source: https://context7.com/nidhinjs/prompt-master/llms.txt A template structure for simple, clear tasks requiring a specific role, task, and format. ```text Role: You are a senior technical writer. Task: Write a one-paragraph description of what a REST API is. Format: Plain prose, 3 sentences maximum, no jargon, suitable for a non-technical audience. ``` -------------------------------- ### Opus 4.7 Task Brief Template Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use this template for complex, multi-step, or agentic tasks on Claude Opus 4.7. It front-loads all necessary information to ensure the first turn is comprehensive. ```text ## Objective [What needs to be built, fixed, or produced — one clear sentence. Add WHY if it affects approach.] ## Context [What exists now — relevant files, current behavior, stack already in place, what was tried and failed] ## Target State [What done looks like — specific files changed, behavior produced, tests passing. Binary where possible.] ## Scope - Work only in: [specific files and directories] - Do NOT touch: [forbidden files — .env, package-lock.json, configs, anything outside scope] ## Constraints - [Stack version, naming conventions, no new dependencies without asking] - Only make changes directly requested. Do not add features, abstractions, or files beyond what was asked. ## Acceptance Criteria - [ ] [Binary check 1] - [ ] [Binary check 2] - [ ] [Binary check 3] ## Stop Conditions Stop and ask before: - Deleting any file - Adding any dependency - Modifying database schema or migrations - Touching anything outside Scope ## Progress After each completed step: ✅ [what was done] — [file(s) affected] ``` ```text ## Session Strategy [Pick one:] - New session — unrelated to prior context, start fresh - Continue — prior context still needed - Subagent — spin off for [file-heavy research / verification] so intermediate output stays out of main context - Compact first — run /compact [focus on X] then begin ``` -------------------------------- ### Prompt Decompiler Output Format Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use this format to break down, adapt, simplify, or split existing prompts. It helps in understanding prompt structure and rewriting for different tools or clarity. ```text Original prompt: [paste] Structure analysis: - Role/Identity: [what role is assigned and why] - Task: [what action is being requested] - Constraints: [what limits are set] - Format: [what output shape is expected] - Weaknesses: [what is missing or could cause wrong output] Recommended fix: [rewritten version with gaps filled] ``` ```text Original ([source tool]): [original prompt] Adapted for [target tool]: [rewritten prompt using target tool syntax and best practices] Key changes made: - [change 1 and why] - [change 2 and why] ``` ```text Original prompt: [paste] This prompt is doing [N] things. Split into [N] sequential prompts: Prompt 1 — [what it handles]: [prompt block] Prompt 2 — [what it handles]: [prompt block] Run these in order. Each output feeds the next. ``` -------------------------------- ### Memory Block System for Context Preservation Source: https://context7.com/nidhinjs/prompt-master/llms.txt Prepend this block to prompts to maintain project-specific constraints and architectural decisions across a conversation. ```markdown ## 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 [Your actual prompt continues here...] ``` -------------------------------- ### ReAct + Stop Conditions Prompt Template for Autonomous Agents Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use for AI that takes autonomous actions. This template helps prevent runaway loops and scope explosion by defining clear objectives, states, allowed/forbidden actions, stop conditions, and checkpoints. ```plaintext Objective: [Single, unambiguous goal in one sentence] Starting State: [Current file structure / codebase state / environment] Target State: [What should exist when the agent is done] Allowed Actions: - [Specific action the agent may take] - Install only packages listed in [requirements.txt / package.json] Forbidden Actions: - Do NOT modify files outside [directory/scope] - Do NOT run the dev server or deploy - Do NOT push to git - Do NOT delete files without showing a diff first - Do NOT make architecture decisions without human approval Stop Conditions: Pause and ask for human review when: - A file would be permanently deleted - A new external service or API needs to be integrated - Two valid implementation paths exist and the choice affects architecture - An error cannot be resolved in 2 attempts - The task requires changes outside the stated scope Checkpoints: After each major step, output: ✅ [what was completed] At the end, output a full summary of every file changed. ``` -------------------------------- ### File-Scope Template for IDE AI Source: https://context7.com/nidhinjs/prompt-master/llms.txt A template for IDE-based AI tools to restrict changes to specific files, functions, and scopes while defining constraints. ```text File: src/pages/Login.tsx Function/Component: handleLogin Current Behavior: Validates email format only, no password validation Desired Change: Add password validation requiring minimum 8 characters, one uppercase, one number Scope: Only modify handleLogin function. Do NOT touch: form rendering, API calls, other validation functions Constraints: - React 18, TypeScript strict - Do not add dependencies not in package.json - Preserve existing type signatures Done When: Password validation runs before API call, invalid passwords show error message ``` -------------------------------- ### Reference Image Editing Prompt Template Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use when modifying an existing image with tools like Midjourney, DALL-E 3, or Stable Diffusion. Focus only on the changes, not the entire scene. Always instruct the user to attach the reference image first. ```text Reference image: [attached / URL] What to keep exactly the same: [list everything that must not change] What to change: [specific edit only — be precise] How much to change: [subtle / moderate / significant] Style consistency: maintain the exact style, lighting, and mood of the reference Negative prompt: [what to avoid introducing] ``` ```text Reference image: [attached portrait photo] What to keep exactly the same: face, hair, clothing, background, lighting What to change: head angle — rotate from facing left to facing straight forward How much to change: subtle, preserve all facial features exactly Style consistency: maintain photorealistic style, same lighting direction Negative prompt: no new elements, no style changes, no background changes ``` -------------------------------- ### RISEN Template for Complex Projects Source: https://context7.com/nidhinjs/prompt-master/llms.txt A template for multi-step projects that defines role, instructions, specific steps, end goals, and narrowing constraints. ```text Role: You are a product manager with 10 years of experience in mobile apps. Instructions: Write a product requirements document for a habit tracking feature. Steps: 1. Define the problem statement in one paragraph 2. List user stories in the format "As a [user], I want [goal] so that [reason]" 3. Define acceptance criteria for each story 4. List out-of-scope items explicitly End Goal: A PRD that an engineering team can begin sprint planning from immediately. Narrowing: No technical implementation details. No wireframes. Under 600 words total. ``` -------------------------------- ### Clone Prompt Master Skill Source: https://github.com/nidhinjs/prompt-master/blob/main/README.md Use this command to clone the Prompt Master repository directly into the Claude Code skills directory. This method is not recommended for general use. ```bash mkdir -p ~/.claude/skills git clone https://github.com/nidhinjs/prompt-master.git ~/.claude/skills/prompt-master ``` -------------------------------- ### Visual Descriptor Prompt Template Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use for image and video generation tools like Midjourney, DALL-E 3, and Stable Diffusion. Structure your prompt with specific details for subject, action, setting, style, mood, lighting, color, composition, and aspect ratio. Include negative prompts and style references as needed. ```text Subject: [Main subject — specific, not vague] Action/Pose: [What the subject is doing] Setting: [Where the scene takes place] Style: [photorealistic / cinematic / anime / oil painting / vector / etc.] Mood: [dramatic / serene / eerie / joyful / etc.] Lighting: [golden hour / studio / neon / overcast / candlelight / etc.] Color Palette: [dominant colors or named palette] Composition: [wide shot / close-up / aerial / Dutch angle / etc.] Aspect Ratio: [16:9 / 1:1 / 9:16 / 4:3] Negative Prompts: [blurry, watermark, extra fingers, distortion, low quality] Style Reference: [artist / film / aesthetic reference if applicable] ``` -------------------------------- ### File-Scope Prompt Template for Code Editing Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use for AI that edits code inside a codebase. This template prevents editing the wrong file or breaking existing logic. Specify scope, constraints, and the done condition precisely. ```plaintext File: [exact/path/to/file.ext] Function/Component: [exact name] Current Behavior: [What this code does right now — be specific] Desired Change: [What it should do after the edit — be specific] Scope: Only modify [function / component / section]. Do NOT touch: [list everything to leave unchanged] Constraints: - Language/framework: [specify version] - Do not add dependencies not in [package.json / requirements.txt] - Preserve existing [type signatures / API contracts / variable names] Done When: [Exact condition that confirms the change worked correctly] ``` -------------------------------- ### RTF Template for Simple Tasks Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use the RTF template for straightforward, one-shot tasks where the request is clear and simple. It defines Role, Task, and Format. ```plaintext Role: [One sentence defining who the AI is] Task: [Precise verb + what to produce] Format: [Exact output format and length] ``` ```plaintext Role: You are a senior technical writer. Task: Write a one-paragraph description of what a REST API is. Format: Plain prose, 3 sentences maximum, no jargon, suitable for a non-technical audience. ``` -------------------------------- ### Prompt Decompiler for Analysis and Adaptation Source: https://context7.com/nidhinjs/prompt-master/llms.txt Use this structure to break down existing prompts for improvement or to adapt them for different tools. ```markdown # Break down output format Original prompt: [paste user's prompt] Structure analysis: - Role/Identity: [what role is assigned and why] - Task: [what action is being requested] - Constraints: [what limits are set] - Format: [what output shape is expected] - Weaknesses: [what is missing or could cause wrong output] Recommended fix: [rewritten version with gaps filled] # Adapt output format (tool-to-tool conversion) Original (ChatGPT): Write a function that validates email addresses and returns true or false. Adapted for Cursor: File: src/utils/validation.ts Function: validateEmail Current Behavior: No email validation exists Desired Change: Add validateEmail function that returns boolean Constraints: - TypeScript strict mode - Use regex, no external libraries - Handle edge cases: empty string, null, unicode Done When: Function validates standard email format and passes test cases Key changes made: - Added file path scope for IDE context - Added TypeScript constraint - Added explicit completion criteria ``` -------------------------------- ### CO-STAR Template for Professional Documents Source: https://context7.com/nidhinjs/prompt-master/llms.txt A template for business writing that defines context, objective, style, tone, audience, and response constraints. ```text Context: I am a founder pitching a B2B SaaS tool that automates expense reporting for mid-size companies. Objective: Write a cold email that gets a reply from a CFO. Style: Direct and conversational, not salesy. Tone: Confident but not pushy. Audience: CFO at a 200-person company, busy, skeptical of vendor emails. Response: 5 sentences max. Subject line included. No bullet points. ``` -------------------------------- ### Chain of Thought Prompt Template Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md Use for logic-heavy tasks, math, debugging, and multi-factor analysis where the AI needs to reason carefully before committing to an answer. Only use for standard reasoning models; do NOT add to models that reason internally. ```plaintext [Task statement] Before answering, think through this carefully: 1. What is the actual problem being asked? 2. What constraints must the solution respect? 3. What are the possible approaches? 4. Which approach is best and why? Give your final answer in tags only. ``` -------------------------------- ### CRISPE Template for Creative Work Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md The CRISPE template is designed for creative tasks, brand voice writing, and iterative content generation. It includes Capacity, Role, Insight, Statement, Personality, and Experiment fields. ```plaintext Capacity: [What capability or expertise the AI should have] Role: [Specific persona to adopt] Insight: [Key background insight that shapes the response] Statement: [The core task or question] Personality: [Tone and style — witty / authoritative / casual / sharp] Experiment: [Request variants or alternatives to explore] ``` ```plaintext Capacity: Expert copywriter specializing in SaaS product launches. Role: Brand voice for a productivity tool aimed at developers. Insight: Developers hate marketing speak and respond to honesty and specificity. Statement: Write the hero headline and sub-headline for the landing page. Personality: Sharp, dry, confident — no adjectives, no exclamation marks. Experiment: Give 3 variants ranging from minimal to bold. ``` -------------------------------- ### CO-STAR Template for Professional Writing Source: https://github.com/nidhinjs/prompt-master/blob/main/references/templates.md The CO-STAR template is suitable for professional documents, business writing, and marketing content. It requires detailed Context, Objective, Style, Tone, Audience, and Response specifications. ```plaintext Context: [Background the AI needs to understand the situation] Objective: [Exact goal — what success looks like] Style: [Writing style: formal / conversational / technical / narrative] Tone: [Emotional register: authoritative / empathetic / urgent / neutral] Audience: [Who reads this — their knowledge level and expectations] Response: [Format, length, and structure of the output] ``` ```plaintext Context: I am a founder pitching a B2B SaaS tool that automates expense reporting for mid-size companies. Objective: Write a cold email that gets a reply from a CFO. Style: Direct and conversational, not salesy. Tone: Confident but not pushy. Audience: CFO at a 200-person company, busy, skeptical of vendor emails. Response: 5 sentences max. Subject line included. No bullet points. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.