8 ready-made prompts
Software and Code
Code, debugging, refactoring, SQL, regex, unit tests and single-file HTML pages.
Vague coding requests produce code that compiles and does the wrong thing. Every prompt here starts from a contract: input, output, error cases, tests.
Code Writing Prompt: Clean, Testable Function
Defines a contract instead of a wish: language, version, input, output, error cases and tests.
Intermediate ChatGPTClaudeDebug Prompt: From "Why Doesn't It Work" to a Diagnosis
Converts "why doesn't it work" into a systematic diagnosis: reproduce, hypothesise, isolate, verify.
Intermediate ChatGPTClaudeRefactor Prompt: Improve Without Breaking Behaviour
Simplifies working code without changing behaviour, planned as reversible steps you can review one at a time.
Advanced ChatGPTClaudeSQL Query Prompt (Schema Included)
SQL written without the schema rarely runs; this prompt requires schema, relationships and expected output.
Intermediate ChatGPTClaudeRegex Prompt: Testable Pattern, Not a Guess
Builds regex from test cases rather than guesses: strings that must match, strings that must not, and the explanation.
Intermediate ChatGPTClaudePython Code Prompt (Working and Explained)
"Write me a script" produces incomplete code; this prompt defines input, output, error handling and tests up front.
Intermediate ChatGPTClaudeHTML CSS Page Prompt: Responsive in One File
A landing page, portfolio or simple form in one HTML file: responsive, accessible and with no build step.
Intermediate ChatGPTClaudeUnit Test Prompt (Edge Cases Included)
Write tests that catch bugs rather than inflate coverage: happy path, edge cases, error paths and a mock strategy.
IntermediateFrequently asked
About Software and Code
Why does generated code fail on the first run?
Usually a missing import, a wrong version, or an unstated assumption about the input. The contract fields exist to remove the third.
Can I ship AI-written code?
After review, tests and error-path checks. Treat it as a competent first draft, never as reviewed work.
Other categories