writing-effective-prompts
Structure Claude prompts for clarity and better results using roles, explicit instructions, context, positive framing, and strategic organization. Use when crafting prompts for complex tasks, long documents, tool workflows, or code generation.
Install
mkdir -p .claude/skills/writing-effective-prompts && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2474" && unzip -o skill.zip -d .claude/skills/writing-effective-prompts && rm skill.zipInstalls to .claude/skills/writing-effective-prompts
About this skill
Writing Effective Prompts
Core Principles
1. Start with a Role
Set behavioral context upfront:
You are an expert software test engineer. Help me write comprehensive unit tests covering edge cases and error conditions.
2. Be Explicit with Instructions
Replace vague requests with specific requirements:
Create a dashboard with:
- Real-time data visualization
- Interactive filtering and drill-down
- Responsive design (mobile + desktop)
- Export functionality for reports
Include as many relevant features as possible.
3. Add Context and Motivation
Explain why to help Claude generalize:
Your response will be read aloud via text-to-speech, so avoid ellipses (TTS engines cannot pronounce them). Use complete sentences instead.
4. Use Positive Framing
Tell what TO do, not what NOT to do:
Format your response as plain text with clear paragraph breaks.
5. Provide Aligned Examples
Examples powerfully shape output. Use <example> tags:
<example>
Input: "Added JWT authentication"
Output:
feat(auth): implement JWT-based authentication
Add login endpoint and token validation middleware.
</example>
Structural Techniques
XML Tags for Complex Output
Structure multi-section responses clearly:
<code_quality>
Assess overall code quality and patterns
</code_quality>
<security_review>
Review security concerns step-by-step
</security_review>
<optimization_suggestions>
List specific performance improvements
</optimization_suggestions>
Chain Complex Tasks
Break multi-step processes into explicit phases:
Phase 1: Research and Analysis
- Examine existing codebase structure
- Identify patterns and conventions
Phase 2: Design and Planning
- Create architectural design
- Define interfaces and data flow
Phase 3: Implementation
- Build core functionality
- Add error handling
- Implement tests
Long Context Best Practices
Document Placement
Put large documents (~20K+ tokens) at the top, queries at the end:
[20,000 tokens of annual report]
[15,000 tokens of competitor analysis]
Analyze above. Identify strategic advantages and Q3 focus areas.
Improves response quality by up to 30% for complex multi-document inputs.
Organize Multiple Documents with XML
<documents>
<document>
<source>annual_report_2023.pdf</source>
<document_content>
[CONTENT]
</document_content>
</document>
<document>
<source>competitor_analysis.xlsx</source>
<document_content>
[CONTENT]
</document_content>
</document>
</documents>
Provide comprehensive market position analysis with specific recommendations.
Ground Responses in Quotes
For accuracy in long document analysis:
1. Extract relevant quotes from documents (use <relevant_quotes> tags)
2. Based on quotes, provide analysis (use <analysis> tags)
3. List recommendations (use <recommendations> tags)
Tool Usage Strategy
Define Tool Purposes
You have access to file and search tools. When working with multiple files:
- Execute independent operations in parallel
- Prefer batch operations over sequential processing
- Verify changes before finalizing
- Clean up temporary artifacts when complete
Encourage Parallelization
Request simultaneous execution for efficiency.
Output Quality Enhancements
Basic Quality Modifier
Create an analytics dashboard.
Enhanced Quality Modifier
Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond basics to create a fully-featured implementation.
Code Generation Guidance
For frontend code:
- "Add thoughtful details like hover states, transitions, and micro-interactions"
- "Apply design principles: hierarchy, contrast, balance, and movement"
For general solutions:
Please write a high quality, general purpose solution. Implement logic that works for all valid inputs, not just test cases. Don't hard-code values. Provide a principled, maintainable implementation following best practices.
Best Practices Checklist
✅ Do
- Start with clear role definition
- Provide explicit, specific instructions
- Use positive framing (what TO do)
- Add context explaining why behaviors matter
- Include aligned examples showing exact desired output
- Leverage XML tags for complex structures
- Request parallel execution when possible
- Break complex tasks into clear phases
- Match prompt style to desired output format
❌ Avoid
- Negative instructions ("Don't do X")
- Vague requirements with implicit expectations
- Examples contradicting instructions
- Sequential operations when parallel works
- Test-focused hard-coding for specific cases
- Assuming tool/library availability
- Instructions without explanation
- Overly complex prompts when simple ones work
Key Success Factors
- Role Definition — Clear identity and expertise
- Explicit Instructions — Specific, actionable directives
- Contextual Reasoning — Explain why behaviors matter
- Example Alignment — Show exact desired output
- Structural Clarity — Use XML tags and organized format
- Quality Modifiers — Use "Include as many features as possible" and "Give it your all"
- Tool Strategy — Specify when/how to use tools and encourage parallelization
- Iterative Refinement — Test and improve prompts based on results
More by CaptainCrouton89
View all skills by CaptainCrouton89 →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversUnlock AI-ready web data with Firecrawl: scrape any website, handle dynamic content, and automate web scraping for resea
Connect Blender to Claude AI for seamless 3D modeling. Use AI 3D model generator tools for faster, intuitive, interactiv
Supercharge your NextJS projects with AI-powered tools for diagnostics, upgrades, and docs. Accelerate development and b
Guide your software projects with structured prompts from requirements to code using the waterfall development model and
TaskManager streamlines project tracking and time management with efficient task queues, ideal for managing projects sof
Integrate Claude with any OpenAI-compatible chat API and SDKs (OpenAI, Perplexity, Groq, xAI, PyroPrompts). Easy Claude
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.