Fix a bug with root-cause analysis
Makes the agent find the cause before patching symptoms.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Library / Coding & Technology / Testing
Covers happy path, edge cases and failures without testing implementation details.
Write tests for [file/function/endpoint] using [Pest / PHPUnit / Vitest / Jest]. Cover: - The main happy path - Edge cases: empty input, boundaries, invalid types, large input - Failure paths: exceptions, validation errors, external service failure (mock it) Test behaviour through the public interface, not private methods. Use the project's existing factories/fixtures. Run the tests and show the output. If you find a real bug, stop and report it instead of writing a test that encodes the bug.
Copies your prompt and opens the official site in a new tab. You may need to paste it yourself (Ctrl/⌘ + V). Nothing is sent to the AI by us.
Replace [bracketed] parts with your own details before sending. Want it tailored? Build a custom coding assistant prompt.
A typical one-line request compared with this prompt. We only show sample responses where we've written an illustration.
Prompt
testing
1 words · no role, context, format or constraints
Prompt
Write tests for [file/function/endpoint] using [Pest / PHPUnit / Vitest / Jest]. Cover: - The main happy path - Edge cases: empty input, boundaries, invalid types, large input - Failure paths: exceptions, validation errors, external service failure (mock it) Test behaviour through the public interface, not private methods. Use the project's existing factories/fixtures. Run the tests and show the output. If you find a real bug, stop and report it instead of writing a test that encodes the bug.
79 words · generated instantly from templates, no AI called
What we added
Makes the agent find the cause before patching symptoms.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Behaviour-preserving refactor with tests as a safety net.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1
Prioritised review: bugs, security, tests, then style.
Agent task · Cursor / coding agents, Claude Code, ChatGPT +1