This code is too clever and hard to read. Rewrite it for clarity: descriptive names, small functions, comments only where needed, and the same behaviour. Explain what the original was doing. Code: [paste code]
Results for “function”
8 prompts
This function is too slow for large inputs ([input size]). Analyse its time and space complexity, propose a more efficient approach, implement it, and show a quick benchmark plan. Code: [paste code]
Write Jest unit tests for this function/module. Cover normal cases, edge cases, error handling, and mock [dependencies]. Use descriptive test names and arrange-act-assert structure. Code: [paste code]
Help me revise the [diagram, e.g. human heart]. Describe the diagram in words with numbered parts, then quiz me: give a number and ask me to name the part and its function. Correct me as we go and finish with a summary table of all parts and functions.
Biology diagram labeling practice
Quiz yourself on diagrams like the cell, heart or flower.
Suggest better names in this code. Language and naming conventions: [details] ``` [paste] ``` For each unclear name, give 2–3 alternatives and explain why they're clearer. Then show the code with the best names applied. Don't change behaviour.
Better names for variables and functions
Get clearer, more descriptive names for confusing variables, functions and classes.
Turn this code into documentation. Code: ``` [paste] ``` Provide: a plain-English step-by-step description, a Mermaid flowchart (or sequence diagram if it involves multiple services), the inputs and outputs, and any edge cases visible in the logic.
Turn code into a flowchart
Visualise how a function or process works with a Mermaid flowchart and plain-English steps.
Act as a senior product manager. Feature: [name] Problem and evidence: [details] Target users: [who] Goals: [outcomes] Write a PRD: background, problem statement, goals and non-goals, user stories with acceptance criteria, functional requirements, UX notes, edge cases, analytics/success metrics, launch plan, and open…
Product requirements document (PRD)
Write a clear PRD with problem, goals, user stories, requirements and success metrics.
Act as a senior [language] developer. Write a function that: [describe behaviour] Inputs: [names, types, examples] Output: [type and example] Constraints: [performance, no external libraries, etc.] Include: - Type hints/annotations and a docstring - Input validation and clear error messages - Handling for edge cases (…
Write a function from a plain-English description
Describe what a function should do and get clean, typed, tested code with edge cases handled.