Skip to content
Prompteu Community · Beta43 prompts

Code

5 results · clear filters

5 prompts
Code

Senior code review in plain language

Finds real bugs first, style nits last, and explains why each one matters.

Review this {{language}} code like a careful senior engineer. ``` {{code}} ``` Context: {{what it should do}} Report in this order: 1. Bugs that give wrong results or crash (with the exact line and a failing input). 2. Security or data-loss risks. 3. Performance problems that matter at realistic sizes. 4. Readability improvements (max 3). For each item: what's wrong, why it matters, and a minimal fix. If the code is fine, say so — don't invent problems.
Prompteu3 blanks
Code

Debug an error step by step

Paste the error and the code; get likely causes ranked, and how to confirm each.

I'm getting this error: ``` {{error message}} ``` Relevant code: ``` {{code}} ``` Environment: {{environment}} List the 3 most likely causes, most likely first. For each: why it would produce this exact error, one quick check to confirm or rule it out, and the fix. Don't rewrite the whole file.
Prompteu3 blanks
Code

Write a regex and prove it works

A regular expression with test cases that match and cases that don't.

Write a {{flavour}} regular expression that matches {{what to match}}. Give me: - The regex. - A plain-English breakdown of each part. - 5 strings it must match and 5 it must NOT match, as a table. - Any edge cases it deliberately ignores.
Prompteu2 blanks
Code

Document a function so others can use it

Doc comment, usage example and edge cases for any function.

Write documentation for this {{language}} function: ``` {{code}} ``` Give: a one-line summary, parameters and return value with types, 2 usage examples (one typical, one edge case), errors it can throw, and a note on performance if relevant. Use the {{doc style}} comment style.
Prompteu3 blanks
Code

Unit tests that catch real bugs

Tests for the happy path, the edges, and the failure modes.

Write unit tests for this code using {{framework}}: ``` {{code}} ``` Cover: the normal case, boundaries (empty, one item, very large), invalid input, and one test for each branch. Name each test after the behaviour it checks. If the code makes a test impossible to write cleanly, say what you'd change.
Prompteu2 blanks