glunty

AI prompt library / Coding and debugging prompts

Coding and debugging prompts

Prompts that make AI a better pair programmer: understand code, find bugs, and write tests, without pasting your whole codebase. Fill in the brackets and paste into any AI tool.

Understand

Explain this code

Explain what this code does, step by step, and point out anything surprising or risky: [paste code].

Why it works: Faster than reading unfamiliar code line by line yourself.

Explain an error

I got this error: [paste]. Explain in plain English what it means, the likely cause, and 2 things to check first.

Why it works: Turns a wall of stack trace into a short list of next steps.

Fix and improve

Targeted debug

This code is not doing [expected]. Here is the code and what happens: [paste]. Do not rewrite everything; find the smallest likely cause and suggest a targeted fix.

Why it works: The "smallest cause" instruction stops the AI from rewriting your whole file.

Code review

Review this function for bugs, edge cases, and readability. List issues by severity, most important first: [paste].

Why it works: A ranked list tells you what to fix first, not just a pile of nitpicks.

Write

Unit tests

Write unit tests for this function, including edge cases and one failure case. Use [test framework]: [paste].

Why it works: Edge cases and a failure case are the tests people forget to write.

Regex with an explanation

Write a regex that matches [describe]. Explain each part, and give 2 examples it matches and 2 it does not.

Why it works: The examples let you verify the regex without trusting it blindly.

More prompt packs

Study and homework help prompts

Free copy-paste AI prompts that turn ChatGPT, Claude, or Gemini into a patient study partner: explain, quiz, summarize, and plan work you write yourself.

Better prompting basics

The simple prompting framework novices miss, as copy-paste templates. Get clearer, more reliable answers from ChatGPT, Claude, and Gemini. Free.

Writing and email prompts

Copy-paste AI prompts for clearer emails, better tone, and faster drafts. They rewrite and sharpen your writing without inventing facts. Free, for any AI tool.

Small business and marketing prompts

Free copy-paste AI prompts for social captions, product descriptions, ad copy, and customer replies. Keep your voice, save the time. Any AI tool.

Resume and job hunt prompts

Free copy-paste AI prompts to sharpen your resume, write a cover letter, and prep for interviews. They rework what is true and never invent experience.

Homework survival prompts

Free copy-paste AI prompts to break down big assignments, plan a study week, and get tutor-style help that never just hands you the answer.

Essay workflow prompts

Free AI prompts for essay thesis, outline, evidence, and feedback. They structure and critique your work; you write every sentence yourself.

Math and science check prompts

Free AI prompts that find where your work went wrong, explain concepts, and generate practice problems, without handing you the final answer.

Work email prompts

Free copy-paste AI prompts for PTO requests, deadline pushback, raise conversations, and professional disagreement. You supply the facts.

Refund and escalation prompts

Free copy-paste AI prompts for refund requests, warranty claims, manager escalation, and chargeback letters. Your facts and their policy only.

Tenant letter prompts

Free AI prompt templates for repair requests, deposit returns, and disputing deductions. Fill in your facts. Templates only, not legal advice.

Medical bill appeal prompts

Free AI prompts to decode an EOB, request an itemized bill, and draft an appeal for a denied claim. Informational only, not medical or legal advice.

Small claims prep prompts

Free AI prompts to organize your timeline, list evidence, and draft a demand letter before small claims court. Organization only, not legal advice.

New to prompting? Read the setup guide for ChatGPT, Claude, and Gemini.

Embedded tool from glunty.com