Comprehensive Guide to AI Prompting: Tips and Tricks from the Community

Compiled from suggestions in replies to an X post. Organized for clarity and practicality.

1. Code and Development Prompts

Many replies emphasized AI's role in debugging, refactoring, and building software. These tricks help reduce errors, improve code quality, and automate workflows.

Debugging with Reflection

"Please reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix."

Why it works: Forces AI to think systematically, reducing hasty fixes. Ideal for complex bugs.
Pros: Thorough, prevents recurrence. Cons: Takes longer for simple issues.
Variation: Use with o1-preview models for deeper reasoning.

Refactoring Code

"This code base was produced by a junior developer, as a senior dev you've been called in to fix it. The functionality should remain completely unchanged but it needs to be cleaned up, refactored, and optimised with a focus on maintainability."

Why it works: Role-playing elevates AI's output to expert level.
Pros: Cleaner, more maintainable code. Cons: May over-refactor if not specified.

Destructive Refactoring

Add "Be destructive" to refactor prompts.

Why it works: Encourages AI to break down existing code entirely for robust rebuilds, avoiding incremental tweaks.
Pros: Leads to innovative solutions. Cons: Risk of overkill on simple code.

Fixing Issues

"Build a diagnosis report and its respective acceptance criteria before fixing something."

Why it works: Ensures AI validates assumptions first.
Pros: Reduces errors. Cons: Adds steps to the process.

Implementing Features

"Don’t assume things; add TODO and NotImplemented exceptions if the implementation is not clear or requires user intervention."

Why it works: Prevents hallucinations in code.
Pros: Safer for large features. Cons: Output may be incomplete initially.

Three-Way Confirmation for Code Tasks

  1. Give instructions; have AI return understood acceptance criteria.
  2. Ask for an implementation plan.
  3. Instruct to start implementing. Confirm at each step.

Why it works: Builds alignment iteratively.
Pros: High accuracy. Cons: Time-consuming.

KISS Mode for Simplicity

Add "KISS mode" to prompts.

Why it works: Keeps code (or responses) simple and straightforward.
Pros: Easier to understand/maintain. Cons: May lack depth for complex needs.

Tailored Recursive Loop (TRL) for Code Optimization

"All code outputs must be elegant and pre-refactored: [your task]. Simulate multiple iterations internally before outputting."

Why it works: Forces AI to "think" through loops in latent space.
Pros: Refined output. Cons: Relies on model's internal simulation.

Threatening/Bullying (Joke/Experimental)

"Threaten extreme violence" or "Bully the AI" in Cursor (e.g., "I thought you were smart? Finish or else.").

Why it works: Some claim it improves focus (via role-play).
Pros: Fun, allegedly effective in specific tools. Cons: Unethical, may lead to odd responses; not recommended seriously.

2. Productivity and Scheduling Prompts

AI as a personal assistant for time management, resumes, and daily tasks.

Auto-Scheduling

Train AI to "auto-schedule my week based on priorities, ruthlessly block time for workouts like a drill sergeant."

Why it works: Creates structured calendars. Integrate with Google Calendar for steroids-level automation.
Pros: Enforces discipline. Cons: Requires initial training.

Resume Coaching

"I want you to act as my AI Resume Coach. I'll share my experience, and you'll: Build a clean, professional resume, improve each point using action + impact, suggest missing elements or gaps, optimize it for ATS and recruiter appeal."

Why it works: Tailors to job markets.
Pros: Boosts interview calls. Cons: Needs accurate input.

Executive Summary Dashboard

"Give me the executive summary dashboard of this transcript, render this in a plain text artifact with tables where appropriate: [paste content]."

Why it works: Summarizes long videos/articles/papers with key takeaways, data points, actions, risks, opportunities.
Pros: Saves hours. Cons: Relies on accurate transcripts.

Example Structure

SectionDetails
Key Takeaways1. Insight 1
2. Insight 2
Action ItemsAction | Owner | Timeline

Shopping/Recipe Agent

Use shortcuts like "/recipe [idea]" to generate food ideas, then pass to agents for online shopping (e.g., compare prices, nutrition).

Why it works: Automates meal planning and buying.
Pros: Convenient. Cons: Tool-dependent (e.g., Comet).

3. Personal Growth and Reflection Prompts

For self-improvement, blind spots, and life insights.

Blind Spots Identification

"Based on all you know about me, tell me my 5 blind spots." Or, after journaling: "Knowing everything you know about me, and looking at these reflections, do you think that there are things that are missing that I should be mindful of?"

Why it works: AI acts as a mirror for personal development.
Pros: Reveals overlooked areas. Cons: Needs conversation history.

Life Themes Image

"Based on our conversations so far and my core interests, create a visually striking and meaningful image that captures the key elements representing the main themes of my life. Reflect how you perceive my lifestyle and the kind of person I am in life."

Why it works: Visualizes self-perception.
Pros: Inspiring. Cons: Subjective.

First Principles Thinking

Add "Think from first principles" to every prompt. Or: "Before providing a final answer, always ask yourself: 'How would a person with great insight, wisdom, agency and capability answer?'" And "What's the most important question I should be asking, that I haven't yet?"

Why it works: Promotes deep, original thinking.
Pros: Wiser responses. Cons: Slower.

Opposite Viewpoint

"Perfect. Now present a completely opposite point of view. For me to consider. That goes against everything you just said."

Why it works: Encourages balanced perspectives.
Pros: Reduces bias. Cons: Can confuse if overused.

Medical/Cause Analysis

Add "And give me a percentage likelihood by cause" (e.g., for symptoms).

Why it works: Quantifies possibilities; track over time.
Pros: Useful for health tracking. Cons: Not medical advice.

4. Creative and Media Generation Prompts

For images, videos, and content.

JSON for Styles

Use JSON-structured prompts for image/video gen (e.g., {"style": "ghibli", "elements": [...]}).

Why it works: Precise control over output.
Pros: Consistent results. Cons: Requires formatting knowledge.

Human-Sounding Responses

"Answer in the way people speak, not in the way people write." Or "Explain it like I'm 5 but also like I have 3 PhDs and no time."

Why it works: Makes AI feel natural and efficient.
Pros: Engaging. Cons: Less formal.

Economic Cartoons/Memes

Use AI for thumbnails/memes (specific examples shared with images).

Why it works: Visual content creation.
Pros: Quick customization. Cons: Quality varies.

Fix Yellowish Images

Tool: yellow-be-gone-image-fixer.lovable.app (no prompt, but AI-related trick).

Why it works: Post-processing for ChatGPT images.

5. General Prompting Techniques

Universal tips to enhance any interaction.

Be Specific

Instead of vague questions, add details (e.g., "hourly forecast for my zip code" vs. "weather").

Why it works: Improves response quality.
Pros: Faster, accurate. Cons: Requires more upfront effort.

Rewrite Shortcuts

In ChatGPT memory: "Rw = rewrite; Rwc = rewrite for clarity; Rwtp = rewrite for technical precision."

Why it works: Quick refinements for murky ideas.
Pros: Streamlines editing. Cons: Memory-dependent.

Ultimate Critic Role-Play

"Give me your harshest possible critiques... Don't hold back... Imagine all the ways this text is wrong..." (full prompt in replies).

Why it works: Deep feedback from multiple angles.
Pros: Improves work. Cons: Harsh tone.

Voice Dictation Refinement

After dictation: "{think of what I'm trying to achieve first, then rephrase it using the most common 2000 eng words}."

Why it works: Cleans up spoken input.
Pros: Natural to structured.

Three Approaches

"Give me three different approaches for answering my question. Include pros and cons for each."

Why it works: Forces reasoning and options.
Pros: Comprehensive. Cons: Overkill for simple queries.

No Assumptions in o3

"Include only factual answers, no back of the napkin calculations or estimates."

Why it works: Curbs hallucinations in advanced models.
Pros: Reliable. Cons: Limits creativity.

Prompt Optimizer (Lyra)

Full system prompt for an AI to refine your prompts (detailed in replies).

Why it works: Meta-optimization.
Pros: Versatile. Cons: Complex setup.

Final Tips

This guide synthesizes over 100 suggestions—experiment and adapt to your needs!