Skip to content

Coding & Development prompts

Code generation, debugging and documentation

127 prompts

Review this React component for accessibility issues: semantic elements, labels, keyboard navigation, focus management, ARIA usage, color contrast notes and screen reader announcements. Return a fixed version with comments. Component: [paste code]

ChatGPT
Coding & Development

Web accessibility fixes in React

Fixes common accessibility problems in React components.

0

Here's my regex: [regex] meant to match [description]. Generate 15 test strings that should match and 15 that shouldn't, including edge cases. Tell me which ones my regex gets wrong and suggest a fixed version.

ChatGPT
Coding & Development

Regex test cases

Tests a regular expression against tricky inputs.

0

Write a Bash script that [task]. Use set -euo pipefail, validate arguments, print usage help, log steps with timestamps, clean up temporary files on exit, and make it safe to run twice.

ChatGPT
Coding & Development

Bash script with safe defaults

A robust shell script with error handling and logging.

0

Optimise this Dockerfile for size, build speed and security. Use multi-stage builds, a minimal base image, layer caching, a non-root user and .dockerignore suggestions. Explain each change. Dockerfile: [paste]

ChatGPT
Coding & Development

Docker image size reduction

Makes Docker images smaller, faster and more secure.

0

Write a TypeScript client for the [API name] REST API covering [endpoints]. Include typed requests and responses, auth handling, retries with backoff, timeouts, helpful errors, and usage examples.

ChatGPT
Coding & Development

API client SDK wrapper

A typed wrapper around a third-party REST API.

0

Explain [data structure, e.g. a hash map / heap / trie] for a [level] developer. Include a text diagram, how operations work with time complexity, a clean implementation in [language], and when to use it in real projects.

ChatGPT
Coding & Development

Data structure explanation with code

Explains a data structure with visuals and an implementation.

0

This function is too slow for large inputs ([input size]). Analyse its time and space complexity, propose a more efficient approach, implement it, and show a quick benchmark plan. Code: [paste code]

ChatGPT
Coding & Development

Algorithm optimisation

Speeds up an algorithm by improving its complexity.

0

Review and rewrite this page's HTML for SEO and accessibility: semantic elements, heading order, meta title and description, Open Graph tags, canonical link, structured data for [type], and image alt text. HTML: [paste HTML]

ChatGPT
Coding & Development

SEO-friendly HTML structure

Semantic HTML and meta tags that help search engines.

0

Explain this pull request diff for a reviewer. Summarise what changed and why (as far as you can tell), list risky areas, possible bugs, missing tests, and questions to ask the author. Diff: [paste diff]

Claude
Coding & Development

Explain a pull request diff

Summarises what a PR changes and what to watch for.

0

Show how to add Stripe Checkout to a [framework] app for [product type: one-time / subscription]. Include server code to create a session, redirect handling, a webhook endpoint that verifies signatures and fulfils orders, and test-mode steps. Use environment variables for keys.

ChatGPT
Coding & Development

Stripe payment integration

A secure Stripe Checkout setup with webhooks.

0

Implement user authentication in [framework]: sign-up, login, logout, password reset by email, and session or token handling. Hash passwords properly, rate-limit login attempts, protect against CSRF, and explain each security choice.

ChatGPT
Coding & Development

User authentication flow

Secure sign-up, login, logout and password reset.

0

Build validation for a [form type] form in [framework or vanilla JS]. Validate [fields] on blur and submit, show inline accessible error messages, disable submit while sending, and handle server-side errors gracefully.

ChatGPT
Coding & Development

Form validation on the frontend

Accessible form validation with helpful error messages.

0