<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: massot</title>
    <description>The latest articles on DEV Community by massot (@tyralis).</description>
    <link>https://dev.to/tyralis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3957347%2F351eb8b7-2266-485f-b7d9-582a9516cbd2.png</url>
      <title>DEV Community: massot</title>
      <link>https://dev.to/tyralis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tyralis"/>
    <language>en</language>
    <item>
      <title>10 ChatGPT/Claude Prompts Every Developer Should Have Saved</title>
      <dc:creator>massot</dc:creator>
      <pubDate>Thu, 28 May 2026 21:38:45 +0000</pubDate>
      <link>https://dev.to/tyralis/10-chatgptclaude-prompts-every-developer-should-have-saved-2e33</link>
      <guid>https://dev.to/tyralis/10-chatgptclaude-prompts-every-developer-should-have-saved-2e33</guid>
      <description>&lt;p&gt;I've been using AI coding tools daily for over a year. The biggest lesson: &lt;strong&gt;vague prompts give vague results&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The fix is simple — structure your prompts with a role, context, and output format. Here are 10 templates I use every week. Copy them, fill the &lt;code&gt;[brackets]&lt;/code&gt;, and paste into Claude or ChatGPT.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Root Cause Debugger
&lt;/h2&gt;

&lt;p&gt;Stop describing the error in your own words. Give the AI exactly what it needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a senior debugger. Here is my code and the error I'm getting:

Code:
[PASTE CODE]

Error:
[PASTE ERROR]

Explain the root cause in simple terms, then give me the fixed code with a one-line comment explaining what changed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Forcing the AI to explain the root cause before fixing prevents it from just patching symptoms.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Silent Bug Hunter
&lt;/h2&gt;

&lt;p&gt;For bugs that don't throw errors but produce wrong results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review this code for bugs that don't throw errors but produce wrong results (off-by-one, wrong conditions, mutating shared state, etc.):

[PASTE CODE]

List each bug with: line number → what's wrong → how to fix it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Naming specific bug categories (off-by-one, shared state) guides the AI to look in the right places.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Unit Test Generator
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write comprehensive unit tests for this function:

[PASTE FUNCTION]

Testing framework: [JEST/PYTEST/VITEST]
Cover: happy path, edge cases, error cases, boundary values.
Use descriptive test names that explain what's being tested.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Without specifying "descriptive test names", you get &lt;code&gt;test1&lt;/code&gt;, &lt;code&gt;test2&lt;/code&gt;. The explicit instruction makes all the difference.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Senior Engineer Code Review
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review this code as a senior engineer preparing it for production. Check for:
- Security vulnerabilities
- Performance issues
- Readability and naming
- Missing error handling
- Test coverage gaps

Code:
[PASTE CODE]

Format: issue → severity (low/medium/high) → fix suggestion.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; The severity format forces prioritization — you know what to fix first.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. SQL Query Builder
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;Write&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;optimized&lt;/span&gt; &lt;span class="k"&gt;SQL&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;POSTGRESQL&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;MYSQL&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;SQLITE&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;

&lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="n"&gt;need&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;DESCRIBE&lt;/span&gt; &lt;span class="n"&gt;WHAT&lt;/span&gt; &lt;span class="n"&gt;YOU&lt;/span&gt; &lt;span class="n"&gt;WANT&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;Tables&lt;/span&gt; &lt;span class="n"&gt;involved&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;PASTE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;SCHEMAS&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;DESCRIBE&lt;/span&gt; &lt;span class="n"&gt;THEM&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;Return&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;brief&lt;/span&gt; &lt;span class="n"&gt;explanation&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;why&lt;/span&gt; &lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="s1"&gt;'s written this way.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Asking for the explanation catches bad query patterns before they hit production.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Dockerfile Generator
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;Write an optimized Dockerfile for:

App type: [NODE/PYTHON/GO]
App entry point: [FILE/COMMAND]
Port: [PORT]
Environment variables needed: [LIST]

Requirements: multi-stage build, non-root user, minimal image size, proper layer caching.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Without the requirements line, you get a single-stage Dockerfile running as root. The explicit constraints are everything.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. GitHub Actions Workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Create a GitHub Actions CI/CD workflow for&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;span class="na"&gt;Trigger&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;PUSH TO MAIN / PR / RELEASE&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;Steps needed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;TEST / BUILD / LINT / DEPLOY&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;Deploy target&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;WHERE IT DEPLOYS TO&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;Secrets needed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;LIST SECRET NAMES&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;Include&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;caching for faster runs, failure notifications.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Specifying secret names upfront means you get a workflow that actually runs, not one that needs 10 edits.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Commit Message Writer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Write a conventional commit message for these changes:

[DESCRIBE OR PASTE DIFF]

Format: type(scope): description
Types: feat, fix, docs, style, refactor, test, chore
Keep the subject under 72 chars. Add body if needed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Conventional commits are parseable by changelogs and release tools. This prompt enforces the format automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Rubber Duck Debugger
&lt;/h2&gt;

&lt;p&gt;When you're completely stuck:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I'm stuck on this problem. Help me think through it:

What I'm trying to do: [GOAL]
What I've tried: [LIST ATTEMPTS]
What happens: [ACTUAL RESULT]
What I expected: [EXPECTED RESULT]

Ask me clarifying questions first, then suggest approaches I might not have considered.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; "Ask me clarifying questions first" forces a dialogue instead of a wall of generic suggestions. It often reveals you missed something obvious.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Blameless Post-Mortem Writer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Help me write a blameless post-mortem for this incident:

What happened: [DESCRIBE INCIDENT]
When: [DATE/TIME]
Impact: [WHO WAS AFFECTED AND HOW]
How it was resolved: [FIX]

Generate: timeline, root cause analysis, contributing factors, action items with owners and deadlines.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; Post-mortems written under pressure miss contributing factors. Letting the AI structure it from your notes is a huge time saver.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pattern Behind All of These
&lt;/h2&gt;

&lt;p&gt;Every prompt above follows the same structure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt; — "You are a senior debugger / engineer"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context&lt;/strong&gt; — paste the actual code, error, or situation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output format&lt;/strong&gt; — exactly how you want the response structured&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;code&gt;[brackets]&lt;/code&gt; are intentional — they force you to fill in real context instead of leaving the AI to guess.&lt;/p&gt;




&lt;h2&gt;
  
  
  Want All 50?
&lt;/h2&gt;

&lt;p&gt;I packaged 40 more prompts across debugging, architecture, testing, DevOps, documentation, prompt engineering, and problem solving into a single Markdown file you can keep open in Obsidian, VS Code, or Notion.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://massot.gumroad.com/l/vwdpnd" rel="noopener noreferrer"&gt;50 Power Prompts for Developers — €7 on Gumroad&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What prompts do you find yourself rewriting over and over? Drop them in the comments — I might add them to v2.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>productivity</category>
      <category>chatgpt</category>
    </item>
  </channel>
</rss>
