Skip to content

Coding & Development AI prompts

Code generation, debugging and documentation

127 prompts

You are a backend engineer. Webhook provider: [service] Events to handle: [list] Stack: [details] Write a webhook endpoint that verifies the signature, rejects old timestamps, responds quickly and processes events in a background job, handles duplicate deliveries idempotently, logs safely, and returns correct status c…

Claude
Coding & Development

Secure webhook handler

Receive webhooks safely with signature verification, idempotency and retries handled.

Help me set up a scheduled job. Task: [what it does] Schedule: [e.g. every weekday at 7am in Europe/London] Environment: [Linux cron, Kubernetes CronJob, framework scheduler, cloud scheduler] Give the correct schedule expression (explain each field and the time zone), the job code skeleton, locking to prevent overlapp…

ChatGPT
Coding & Development

Scheduled jobs and cron tasks

Set up reliable scheduled jobs with correct cron syntax, logging and failure alerts.

You are a cloud solutions architect. App: [description] Expected traffic: [users, requests] Data: [types, size] Budget: [monthly] Team experience: [details] Propose an architecture (with a Mermaid diagram), choose managed services with reasoning, cover security, backups, monitoring, scaling, rough cost drivers, and a…

Claude
Coding & Development

Cloud architecture for your app

Design a cost-aware cloud architecture that fits your app's traffic, budget and team.

Act as a cloud infrastructure engineer. Cloud: [AWS / GCP / Azure] Resources needed: [e.g. VPC, database, container service, storage bucket] Environments: [details] Write Terraform with a sensible module structure, variables and outputs, remote state configuration, tagging, and comments. Explain the plan/apply workflo…

ChatGPT
Coding & Development

Infrastructure as code with Terraform

Define cloud infrastructure in Terraform with modules, variables and safe state handling.

You are a Kubernetes engineer. App: [container image, port, env vars (names), resources] Requirements: [replicas, health checks, scaling, ingress, persistent storage] Write Deployment, Service, Ingress, ConfigMap/Secret references and HorizontalPodAutoscaler manifests, with comments explaining every field. Add kubectl…

Claude
Coding & Development

Kubernetes manifests explained

Write and understand Kubernetes manifests for deploying a containerised app.

Act as a DevOps engineer. Stack and hosting: [details] Environments: [dev, staging, prod] Secrets used: [types, names only] Recommend: a config structure, .env usage and .env.example, validating config at startup, secret storage options for production, rotation practices, and what must never be committed to git. Inclu…

ChatGPT
Coding & Development

Environment variables and config management

Organise configuration and secrets safely across development, staging and production.

You are a staff engineer experienced with legacy systems. System: [description, age, language] Pain points: [bugs, slow changes, outdated libraries] Constraints: [can't stop shipping features, limited tests] Create a plan: characterisation tests first, the strangler-fig approach, which areas to modernise first (by ris…

Claude
Coding & Development

Modernise legacy code

Plan an incremental modernisation of old code without a risky big-bang rewrite.

You are a tech lead planning an upgrade. Current and target versions: [e.g. React 17 → 19, Python 3.8 → 3.12, Laravel 9 → 11] Codebase size and test coverage: [details] Key dependencies: [list] Create: breaking changes to check (verify against official upgrade guides), dependency compatibility plan, step-by-step upgra…

Claude
Coding & Development

Framework upgrade migration plan

Plan a safe upgrade between major versions of a framework or language.

Analyse the time and space complexity of this code. ``` [paste] ``` Explain the Big-O line by line in simple terms, identify the bottleneck, describe what happens with 10× and 1000× more data, and suggest a more efficient approach if one exists, with code.

ChatGPT
Coding & Development

Explain the complexity of my code

Understand your code's time and space complexity and where it will slow down at scale.

Turn this code into documentation. Code: ``` [paste] ``` Provide: a plain-English step-by-step description, a Mermaid flowchart (or sequence diagram if it involves multiple services), the inputs and outputs, and any edge cases visible in the logic.

ChatGPT
Coding & Development

Turn code into a flowchart

Visualise how a function or process works with a Mermaid flowchart and plain-English steps.

You are a performance engineer. Platform: [browser app, Node.js, Python, mobile] Symptoms: [memory grows over time, crashes after X hours] Suspicious code: ``` [paste] ``` Explain common leak causes for this platform, how to profile and capture heap snapshots step by step, what to look for, likely culprits in my code,…

Claude
Coding & Development

Investigate a memory leak

Find and fix memory leaks in web apps, Node.js services or mobile apps.

Act as a JavaScript expert. What should happen: [expected behaviour] What actually happens: [bug] Code: ```js [paste] ``` Explain the async flow step by step, identify the bug (race condition, missing await, unhandled rejection, etc.), provide fixed code, and suggest patterns to prevent it (Promise.all, AbortControlle…

ChatGPT
Coding & Development

Debug async JavaScript

Fix race conditions, unhandled promises and ordering bugs in async JavaScript.