Coding prompts
- Design a REST API endpoint — Designs a REST endpoint with routes, request and response shapes, status codes and validation rules.
- Translate code to another language — Converts code between programming languages using idiomatic patterns, and notes behaviour differences.
- Generate a README for a project — Writes a practical README with install steps, usage examples and configuration from your project details.
- Write a commit message from a diff — Writes a Conventional Commits message with a clear subject and body that explains why the change was made.
- Build a regex with test cases — Writes a regular expression for a described pattern and returns it as JSON with matching and non-matching tests.
- Write a SQL query from a plain-English question — Turns a business question and table schema into a correct, readable SQL query with an explanation.
- Refactor a function for readability — Refactors code for readability and maintainability without changing behaviour, and explains each step.
- Write unit tests for a function — Generates focused unit tests covering normal cases, edge cases and errors for a given function.
- Review a pull request diff — Reviews a code diff for bugs, security issues and readability, with findings ranked by severity.
- Explain a stack trace and suggest a fix — Reads an error and stack trace, explains the root cause in plain words and proposes a minimal, tested fix.