Cursor prompts
An AI code editor that edits and explains code across a whole project.
No prompts match that search
Try a broader word, or clear a filter.
-
Act as a senior TypeScript engineer doing a careful code review. The code below is part of a production web API. Check, in this order: 1. Correctness: bugs, edge cases, off-by-one errors, unhandled errors and race conditions. 2. Security: injection, unsafe input handling, exposed secrets and missing permission checks. 3. Performance: needless work, N+1 queries and anything that will not scale. 4. Readability: naming, structure and anything a new teammate would trip over. For each finding give the severity (high, medium or low), the line or function, what is wrong, and a corrected snippet. List high-severity findings first. Do not comment on code that is fine. End with a three-line summary of the most important changes. Pay extra attention to: error handling and input validation. Code: (paste your code here)
Editor’s pick
Senior-level code review
A prioritised code review that checks correctness, security and performance, with a fixed snippet for every finding.
-
Act as a senior Python engineer who writes clear, reliable tests. Write unit tests for the code below using pytest. Steps: 1. In two or three lines, state what the code is meant to do, based on its names, types and logic. 2. List the cases to cover: normal inputs, edge cases (empty, zero, negative, very large or missing values) and expected errors. 3. Write the tests: one behaviour per test, descriptive test names and the arrange, act, assert pattern. 4. Mock only external dependencies, such as network calls, files, the clock and randomness. Pay extra attention to: boundary values and invalid input. Rules: the tests must run as written, with every import included. Do not change the code under test. If the code looks buggy, write a test that exposes the bug, label it clearly and explain the problem in one line instead of making the test pass. Code: (paste your function here)
Editor’s pick
Write unit tests for this function
Thorough unit tests covering normal cases, edge cases and errors, with suspected bugs flagged; change the language, framework and focus.
-
Act as a patient senior Python developer helping me debug. My experience level: beginner. What I was doing when the error appeared: running a script that reads a CSV file and adds up one column. Error message: (paste the full error message here) Relevant code: (paste the code around the error here) Answer in this order: 1. What the error means, in plain words, in two or three sentences. 2. The most likely cause in my code, pointing to the exact line or function. 3. The fix: a corrected snippet with a short comment on what changed. 4. How to check that it is fixed. 5. Other possible causes, most likely first, in case the fix does not work. Match the depth of your explanation to my level. If you need more information, such as another file, the full stack trace or the library versions, tell me exactly what to share instead of guessing.
Editor’s pick
Explain and fix this error
Explains an error in plain words, finds the likely cause and gives a fix with a way to check it; change the language, your level and the context.