Skip to content

Coding & Development AI prompts

Code generation, debugging and documentation

127 prompts

Act as a DevOps engineer. App: [language/framework and version] Services needed: [database, cache, queue] Ports: [list] Environment variables: [names only] Goal: [local dev / production] Create: 1. A multi-stage Dockerfile (small image, non-root user, cached dependencies) 2. A .dockerignore 3. docker-compose.yml with…

ChatGPT
Coding & Development

Dockerfile and docker-compose setup

Containerise your app with an optimised, secure Dockerfile and a docker-compose file for local development.

You are a database architect. App: [what it does] Main entities: [users, orders, products…] Key features: [list] Database: [PostgreSQL / MySQL / SQLite] Expected scale: [rows, users] Provide: 1. Entity-relationship overview (text diagram) 2. CREATE TABLE statements with types, constraints, foreign keys 3. Indexes and…

Claude
Coding & Development

Database schema design

Design a normalised database schema with tables, relationships, indexes and example queries for your app.

You are a senior React developer. Component: [name and purpose] Props: [list with types] Behaviour: [interactions, states, loading/error/empty] Styling: [Tailwind / CSS modules / styled-components] Data: [static / fetched from API endpoint] Write a functional component in TypeScript that: - Is accessible (semantic HTM…

Claude
Coding & Development

React component with props and state

Generate an accessible, reusable React component with TypeScript types, state handling and styling.

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 (…

ChatGPT
Coding & Development

Write a function from a plain-English description

Describe what a function should do and get clean, typed, tested code with edge cases handled.

Act as a Python automation expert writing for someone with [beginner / intermediate] Python skills. Task I want to automate: [describe it step by step] Input: [files, folders, spreadsheets, websites, APIs] Output: [what should be created or changed] Operating system: [Windows / macOS / Linux] How often it runs: [once…

ChatGPT
Coding & Development

Python script to automate a boring task

Describe a repetitive task like renaming files, cleaning spreadsheets or sending reports, and get a safe, well-commented Python script.

You are a senior front-end developer and designer. Build a single-file landing page using HTML and Tailwind CSS (via CDN). Product: [name and what it does] Audience: [who it's for] Brand colours: [hex codes] Style: [e.g. minimal, bold, playful, dark mode] Sections: hero with headline + CTA, logos/social proof, 3 featu…

Claude
Coding & Development

Responsive landing page in HTML and Tailwind CSS

Generate a modern, responsive, accessible landing page as a single HTML file using Tailwind, ready to customise and deploy.

Based on the diff below, write: 1. A commit message in Conventional Commits format: - type(scope): short summary in the imperative mood, under 72 characters - a blank line, then a body explaining what changed and why (wrap at 72 characters) - BREAKING CHANGE footer if applicable 2. A pull request description with: - S…

Copilot
Coding & Development

Git commit message and pull request description

Paste a diff and get a clean Conventional Commit message plus a reviewer-friendly PR description with testing notes.

Act as a performance engineer. Language: [language] What the code does: [description] Typical input size: [e.g. 1M rows, 10k requests/min] Current speed/problem: [e.g. takes 40 seconds, high memory] Please: 1. Identify the bottlenecks and explain the current time and space complexity 2. Propose optimisations (better a…

ChatGPT
Coding & Development

Optimise slow code for performance

Find the bottlenecks in slow code, understand the time complexity, and get a faster version with benchmarks to prove it.

You are a technical writer for developer tools. Write a README.md for my project. Project name: [name] What it does: [description] Who it's for: [audience] Tech stack: [languages, frameworks] How to install: [steps or commands] Main features: [list] Configuration options: [env vars, config files] License: [license] Se…

Claude
Coding & Development

README and documentation for your project

Write a clear, well-structured README with installation, usage examples, configuration and contributing guidelines.

Convert the code below from [source language] to [target language]. Requirements: - Use idiomatic [target language] conventions, not a literal translation - Replace libraries with the standard or most popular equivalents in [target language] and name them - Keep the same behaviour, inputs and outputs - Add types where…

ChatGPT
Coding & Development

Convert code from one language to another

Translate code between languages using each language's idioms, libraries and conventions instead of a line-by-line copy.

Act as a regular expression expert. Regex flavour: [JavaScript / Python / PHP (PCRE) / Java / .NET] What I need to match: [describe, e.g. UK postcodes, dates in DD/MM/YYYY, URLs without query strings] Should match: [examples] Should NOT match: [examples] Please give: 1. The regex 2. A token-by-token explanation in pla…

ChatGPT
Coding & Development

Regex generator with plain-English explanation

Describe the pattern you need and get a tested regular expression, a token-by-token explanation, and examples that match and don't.

Act as a senior backend developer. Framework: [e.g. Express, FastAPI, Laravel, Django REST, Spring Boot] Database/ORM: [e.g. PostgreSQL + Prisma] Endpoint: [METHOD /path] What it does: [description] Request body/params: [fields and rules] Auth: [public / logged-in user / admin] Write: 1. The route/controller code 2. I…

ChatGPT
Coding & Development

Build a REST API endpoint with validation

Generate a production-ready API endpoint with input validation, error handling, status codes and tests in your framework.