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 2 of 6

Coding

Auth and Input Security Auditor

Paste code that touches auth, payments, or user data for an OWASP-style scan of the most common real-world vulnerabilities. - Checks injection, session and privilege issues, data exposure, weak validation, and crypto mistakes - Each finding includes an attack scenario, severity rating, and the exact fix - Not a substitute for a real penetration test, but catches the obvious holes fast

Coding

Automated Code Documentation Generator

Paste a module or function to get documentation a new hire could actually use, not filler that just repeats function names back to you. Returns an overview, a 3-step quick start, a full API reference with examples, the most common usage patterns, and a dedicated Gotchas section covering edge cases and limitations that usually only live in one developer's head.

Coding

Backward Compatibility Audit

Run a compatibility audit on a single diff before a library release or service deployment. - Flags removed or renamed public methods, changed signatures, and schema changes missing a migration - Catches renamed JSON fields and environment variable changes that break callers silently - Rates each issue as breaking or deprecation-worthy with a migration path - Mention your semver policy to get major-bump items flagged separately

Coding

Balanced Senior Engineer PR Review

Give it the PR's stated goal and your repo's architecture and conventions to get a review that avoids both rubber-stamping and nitpicking. It checks correctness, readability, maintainability, test coverage, and backward compatibility in one pass, then sorts findings into Confirmed Issues, Possible Risks, and Nice-to-Haves, closing with three ready-to-paste GitHub review comments.

Coding

Class or Module Creation

Describe the functionality, language, and whether you want a class or module to get a clean, well-encapsulated starting point instead of a flat script. - Constructor or initialization with a clear signature - Public methods with docstrings, plus private helpers where useful - Proper encapsulation following OOP principles - Ask for unit test stubs alongside it to lock in the interface early

Coding

Code Simplification Pass

Paste code to get a complexity-reduction pass that swaps over-engineered solutions and hand-rolled reimplementations for built-in language or library features. The simplified version is shown side by side with the original, and only genuine simplifications are suggested — if a change would alter behavior in edge cases, or the code is already about as simple as it can get, it says so instead of forcing a rewrite.

Coding

Constructive Review Comment Writer

Describe the issue you've spotted in plain English along with the specific lines and fuller details, and get back a ready-to-paste GitHub review comment instead of staring at a blank comment box. The output is specific, explains why the issue matters, includes a concrete suggested fix, and skips filler openers like "Great work, but..." — also useful as a template for junior reviewers learning to write good comments.

Coding

Correctness-Only Bug Review

Paste a diff to get a review that stays narrowly focused on logic errors, null dereferences, race conditions, and off-by-one bugs — the kind that actually reach production — while ignoring formatting and naming entirely. Each bug found comes with the exact line, why it's a bug, and a suggested fix, and it says so explicitly if nothing turns up rather than padding the review with style notes.

Coding

Edge Case Enumerator

Paste a diff or function to get a systematic sweep of the edge cases it doesn't handle, before you sit down to write tests. - Covers empty inputs, nil/null values, boundary values (0, -1, MaxInt), concurrent access, timeouts, and malformed data - For each gap, shows what currently happens versus what should happen instead - Follow up with "write a test for the three most dangerous ones" to get code immediately