alternatifbusiness
Humanoid robot assisting office professional with

Home / Resources / Prompt library / AI coding & development

Prompt library · By AI task

AI coding & development prompts

12 detailed, ready-to-use prompts: code, debugging, reviews and documentation with AI assistants. Each prompt explains when to use it, what to replace and an expert tip. They work with ChatGPT, Claude, Gemini, Copilot and other assistants.

12 prompts

COD-01

Feature specification

When to use it: Plan a feature before coding.

Write a technical specification for [feature] in [stack]. Include user stories, acceptance criteria, data model changes, API endpoints, edge cases, security considerations and a step-by-step implementation plan. Ask me questions if requirements are unclear.

Replace before use

[feature][stack]

Expert tip

Agree on acceptance criteria first.

COD-02

Debugging assistant

When to use it: Find the cause of a bug.

Help me debug this issue. Expected behaviour: [expected]. Actual behaviour: [actual]. Error message: [paste]. Relevant code: [paste]. What I tried: [list]. List the most likely causes in order, how to confirm each, and the fix.

Replace before use

[expected][actual][paste][list]

Expert tip

Share the exact error and what you already tried.

COD-03

Code review

When to use it: Review code before merging.

Review this code for correctness, security, performance, readability and tests: [paste]. List issues by severity with line references and suggested fixes. Then list what is done well.

Replace before use

[paste]

Expert tip

Ask for prioritised issues, not style nitpicks only.

COD-04

Write tests

When to use it: Add tests to existing code.

Write unit tests for this function in [test framework]: [paste]. Cover normal cases, edge cases and error handling. Explain what each test checks.

Replace before use

[test framework][paste]

Expert tip

Ask for edge cases explicitly.

COD-05

Refactor safely

When to use it: Improve code without changing behaviour.

Refactor this code to improve readability and maintainability without changing behaviour: [paste]. Explain each change. Keep the public interface unchanged.

Replace before use

[paste]

Expert tip

Make sure tests pass before and after.

COD-06

Explain unfamiliar code

When to use it: Understand a codebase quickly.

Explain what this code does, step by step, for a developer new to the project: [paste]. Include the data flow, key functions, dependencies, and anything risky or unclear.

Replace before use

[paste]

Expert tip

Start from the entry point.

COD-07

SQL query builder

When to use it: Write and optimise queries.

Using this database schema [paste], write a SQL query that [goal]. Explain the query, add indexes that would help, and note any performance concerns.

Replace before use

[paste][goal]

Expert tip

Share the schema.

COD-08

API documentation

When to use it: Document endpoints clearly.

Write API documentation for these endpoints: [paste code or routes]. For each: purpose, method, URL, parameters, request example, response example, errors and authentication.

Replace before use

[paste code or routes]

Expert tip

Include example requests and responses.

COD-09

Regex helper

When to use it: Build and test a regular expression.

Write a regular expression in [language] that matches [pattern]. Should match: [examples]. Should not match: [examples]. Explain each part and give test cases.

Replace before use

[language][pattern][examples]

Expert tip

Provide examples that should and should not match.

COD-10

Commit and PR description

When to use it: Communicate changes clearly.

Write a commit message and a pull request description for these changes: [diff or summary]. Include context, what changed, how to test and any risks.

Replace before use

[diff or summary]

Expert tip

Explain why, not only what.

COD-11

Migration plan

When to use it: Upgrade a library or framework.

Create a migration plan from [old version/tool] to [new]. List breaking changes to check, steps in order, tests to run, rollback plan and estimated effort.

Replace before use

[old version/tool][new]

Expert tip

Upgrade in small steps with tests.

COD-12

Security checklist

When to use it: Check common vulnerabilities.

Review this code or design for common security issues (input validation, authentication, authorisation, secrets, injection, data exposure): [paste]. List risks and fixes. Do not output any secrets.

Replace before use

[paste]

Expert tip

Never paste real secrets into prompts.

Always review AI output before using it, and never paste confidential or personal data into a tool without checking its data settings. Legal, financial and health outputs are general information, not professional advice.

More prompt categories

Keep exploring

Go further

Turn the idea into a business.

The Business Launch System helps you test it and set it up. The Self-Funding Client System helps you find clients. Both are fill-in Word systems.

Business Launch System cover: fill-in Word modules and illustrated quick-start guide