Coding

Prompts for code work depend on context more than any other kind. The AI needs to know the language and framework, what the code is supposed to do, what actually happens, and what you have already tried. A pasted function with the request "fix this" forces it to guess your intent, and a guess can produce a confident change that breaks something else.

The templates in this category ask for that context in a fixed order. The review template sorts issues by severity and asks for concrete fixes. The debugging template starts from the error message and the expected behavior, and asks for the cause before the fix. The refactoring template states what must not change. The test template derives cases from the expected behavior, not only from the code, and the documentation template forbids inventing behavior.

In every case, run the code and the tests yourself. An AI cannot see your environment, and it may suggest functions or options that do not exist in your version. Treat its output as a proposal you verify, review small changes at a time, and keep your own tests as the final check.

5templates

templates

  • Code Review

    Get a prioritized code review that covers correctness, security, readability and tests.

    code reviewqualitysecurity All models
  • Debug an Error

    Diagnose an error by giving the AI the message, the code, what you tried and what you expected.

    debuggingerrorstroubleshooting All models
  • Refactor for Readability

    Improve the structure and naming of code without changing what it does, with a list of changes.

    refactoringreadabilityclean code All models
  • Write Unit Tests

    Generate unit tests that cover normal cases, edge cases and failures, with the reasoning for each.

    testingunit testsquality All models

Read the guide

Related categories