Topic

Coding prompts for developers

Writing a good prompt for a coding assistant takes more than "fix my code." This collection gives developers ready-to-use prompts for the tasks that come up every day: finding bugs and explaining their root cause, writing unit tests that cover edge cases, reviewing a diff for readability and performance, and breaking down unfamiliar code line by line. Every prompt is free, works with any language or framework, and uses {{variable}} placeholders so you can drop in your own code and get a useful answer immediately — no prompt engineering required. Whether you're debugging a production issue, prepping a pull request, or just want a second pair of eyes on a function, start here.

53 prompts · page 1 of 6

Coding

Concurrency and race condition review

Paste code along with its concurrency model and the shared state involved for a review that skips general code-review concerns entirely and focuses only on concurrency. - Race conditions from unsynchronized read-modify-write or check-then-act patterns - Deadlock or livelock risk from lock ordering across threads or async tasks - Cleanup gaps under concurrent cancellation or failure - Each issue ships with the exact interleaving that triggers it, not a generic warning

Coding

Database schema design assistant

Describe a feature in plain language along with your database engine, expected scale, and existing tables to get a second opinion before writing migrations that are painful to undo. Returns proposed tables, keys, and indexes with the reasoning behind each normalization or denormalization decision, flags which constraints belong at the database level instead of application code, and stress-tests the design against one likely future change.

Coding

Debug a stack trace or error message

Paste the full error message and stack trace, the code where it originates, and what you were trying to do, and get back a plain-language explanation of what the error actually means. Returns likely causes ranked from most to least probable, points to the exact lines responsible, and suggests a minimal fix or next debugging step for each — including how you might be misusing a library if the trace points there.

Coding

Git commit message writer

Takes a pasted diff plus a short note on why the change was made, and returns a commit message ready to paste into git: an imperative summary line under 72 characters, followed by an optional body covering rationale and tradeoffs. It skips line-by-line narration in favor of describing intent and impact, and flags diffs that look like they're bundling unrelated changes that should be split into separate commits.

Coding

Regex generator and explainer

Describe a matching pattern in plain language, list a few strings it must reject, and name the language or regex engine, and get back a working regular expression. It comes with a token-by-token breakdown of what each part does, a callout of edge cases it might mishandle like unicode, empty strings, or catastrophic backtracking, and three example strings that should match plus three that shouldn't.

Coding

AI First-Pass Code Review

Paste a diff or code block and get a senior-engineer-style first pass before it reaches a human reviewer. - Flags bugs, security risks, performance issues, and maintainability problems - Rates each finding Critical, High, Medium, or Low with line references and a fix - Add project conventions (e.g. "no nested ifs") for sharper, more relevant results - Run it on every PR so reviewers only spend time on what's left after the obvious stuff is caught

Coding

AI-Generated Code Explanation Request

Paste any AI-generated code snippet you're about to merge and get a plain-language walkthrough of what it does, how it works step by step, and where its assumptions or edge cases might fail. Built for the moment right after a code-generation tool hands you something you don't fully trust yet, so you catch problems before they reach review instead of during an incident.

Coding

Algorithm Implementation Request

Name an algorithm and a target language to get a complete, ready-to-run implementation rather than just the core loop. - Typed main function with clear parameters and return values - Helper functions where the logic benefits from decomposition - Time and space complexity analysis - A runnable example call to verify it works

Coding

Architecture Tradeoff Advisor

Describe a system you're about to build along with its scale, team, timeline, and current plan, and get tradeoffs surfaced instead of textbook best practices. - Ranks the top 3 risks specific to your approach - Identifies what would break first at 10x scale - Proposes the simplest version you could ship first - Best used before writing code — for schema design, API contracts, or system boundaries