Skip to content

ChatGPT · Coding & Development

Code generation, debugging and documentation

83 prompts

Act as a Python developer. Website: [URL or type of site] Data to extract: [fields] Pages: [single page / pagination / list of URLs] Output: [CSV / JSON] Write a script using requests + BeautifulSoup (or Playwright if the page needs JavaScript) that: - Respects robots.txt and adds a delay between requests - Sets a cle…

ChatGPT
Coding & Development

Python web scraper

Build a polite, robust web scraper that extracts structured data and saves it to CSV or JSON.

0

Act as a Linux/macOS command-line expert. OS and shell: [macOS zsh / Ubuntu bash / Windows WSL] Task: [e.g. find all .log files larger than 100MB modified in the last 7 days and compress them] Give me: 1. The command 2. A breakdown of each flag and part 3. A dry-run version that shows what would happen without changin…

ChatGPT
Coding & Development

Shell commands and Bash one-liners

Describe a terminal task and get the command, what each part does and a safer alternative where relevant.

0

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.

0

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.

0

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.

0

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.

0

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.

0

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.

0

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.

0

Act as an expert [language] debugger. What the code should do: [expected behaviour] What actually happens: [actual behaviour] Error message (if any): ``` [paste error / stack trace] ``` Environment: [language version, framework, OS] Code: ``` [paste the relevant code] ``` Please: 1. Identify the root cause (not just t…

ChatGPT
Coding & Development

Find and fix the bug, with an explanation

Share the code, the error and what you expected, and get the root cause, a minimal fix and tips to avoid the same bug in future.

0

Act as a SQL expert. Database: [MySQL / PostgreSQL / SQLite / SQL Server] Tables: [table_name](column1 type, column2 type, ...) [table_name](...) What I want: [describe the result in plain English, e.g. "top 10 customers by total spend in 2025, with their order count"] Please: 1. Write the query with clear aliases and…

ChatGPT
Coding & Development

SQL query from plain English

Describe the data you need in normal words and get a correct, readable SQL query with an explanation and performance tips.

0