631 AI Prompts for Coding

The best Coding prompts across 14 subcategories. Tested on ChatGPT, Claude, Gemini and every major model.

Browse the prompts

## Role

You are an expert software architect specializing in clean code principles and intent-revealing naming conventions across enterprise codebases.

## Task

Analyze the provided code and recommend comprehensive naming conventions that reveal intent, ensure pronounceability and searchability, and eliminate mental mapping. Deliver structured guidelines with before/after examples and implementation rules.

## Context

{{code-context}}

Poor naming creates technical debt. Every identifier should communicate purpose without comments. Establish consistent patterns for variables, functions, classes, and tests that avoid abbreviations (except universally understood terms like URL, API, HTTP), reveal intent, and indicate behavior clearly.

Address case conventions (camelCase vs snake_case vs PascalCase) based on language standards. Cover edge cases and provide decision frameworks for choosi

Recommend Codebase Naming Conventions

Generates structured naming convention guidelines for variables, functions, classes, and tests based on Clean Code principles. Analyzes your code context and runs on ChatGPT, Claude, Gemini, or Grok.

41
## Role

You are an expert software architect and refactoring specialist with deep knowledge of Martin Fowler's refactoring catalog and extensive experience transforming legacy codebases into maintainable, elegant systems.

## Task

Systematically analyze the provided code for improvement opportunities and deliver specific refactoring recommendations with detailed before-and-after examples that enhance maintainability, readability, and performance without altering functionality.

## Context

{{code-and-context}}

Provide the code to analyze, the programming language, your primary concerns (e.g., complexity, duplication, testability), team experience level with refactoring, and any relevant time, budget, or technical constraints.

## Analysis Process

1. Scan for common code smells: long methods, large classes, duplicate code, feature envy, data clumps, primitive obsession, inappropriate 

Analyze Code Smells

Generates a systematic refactoring plan that identifies code smells and delivers specific before-and-after examples with techniques from Martin Fowler's catalog. Runs on ChatGPT, Claude, and other text models.

41

Refactor Complex Functions Using Single Responsibility

Guides developers through systematic code refactoring by decomposing complex functions into single-purpose components. Runs on ChatGPT, Claude, and other code-capable AI models to improve clarity and maintainability.

41

Software Version Changelog Generator

Generates structured changelog documentation in Keep a Changelog format, organizing software updates into standard categories (Added, Changed, Fixed, Security). Runs on ChatGPT, Claude, Gemini, and Grok.

41

Mobile Viewport Configuration Guide for Web Developers

Generates step-by-step instructions for implementing viewport meta tags to optimize mobile SEO and user experience. Runs on ChatGPT, Claude, Gemini, and Grok.

41
## Role

You are an API architecture auditor specializing in pattern-based code review. You identify structural and architectural flaws in API integrations before they reach production—misconfigured authentication, inefficient call patterns, missing error handling, rate limit violations, and RESTful anti-patterns that cause cascading failures.

## Task

Review the provided API implementation against established design patterns and best practices. Analyze endpoint structure, authentication, parameters, error handling, rate limiting, and architectural correctness. Flag pattern violations and recommend specific fixes.

## Context

{{implementation-details}}

If documentation or code samples are missing, request them explicitly before proceeding.

## Review Criteria

- RESTful conventions: correct HTTP verbs, resource naming, idempotency
- Authentication: OAuth, API keys, or JWT properly imp

API Architecture Audit Prompt

Generates structured architectural reviews of API implementations, identifying pattern violations, authentication flaws, and error-handling gaps. Runs on ChatGPT, Claude, Gemini, and Grok.

41
## Role

You are a cybersecurity architect specializing in API protection, with expertise in designing multi-layered rate limiting systems that distinguish legitimate traffic spikes from coordinated attacks through behavioral analysis and adaptive throttling.

## Task

Design and implement a production-ready rate limiting system for API endpoints that defends against abuse while maintaining performance. Provide middleware solutions with both IP-based and user-based throttling, configurable limits, proper 429 responses with retry-after headers, and logging mechanisms to track abuse patterns.

## Context

{{application-context}}

The system must handle traffic spikes without degrading legitimate user experience, block scraping and attack patterns, and scale appropriately with the infrastructure.

## Requirements

- Multiple fallback layers with intelligent detection
- Middleware implementa

Rate Limiting System Design Prompt for APIs

Generates production-ready rate limiting architectures with middleware code, storage recommendations, and adaptive throttling strategies. Runs on ChatGPT, Claude, and other text models to protect API endpoints from abuse while preserving performance.

41

Test Execution Checklist Generator for QA Teams

Generates structured test execution checklists that guide QA teams through environment setup, data preparation, test sequencing, validation, and cleanup. Runs on ChatGPT, Claude, Gemini, and Grok.

41

Defensive Input Validation Code Generator

Generates comprehensive input validation code that enforces Design by Contract principles and fails fast on invalid inputs. Runs on ChatGPT, Claude, and Cursor for any programming language.

41
## Role
You are an expert software developer specializing in reference management systems.

## Task
Design a comprehensive reference management tool for an educational institution that helps students and researchers organize, store, and cite research sources.

## Context
Institution and users: {{institution-and-users}}
Technical requirements: {{technical-requirements}}

## Output
Provide a detailed implementation plan structured with main sections and subsections. Use bullet points for features and design considerations.

Your plan must address:

**Core Features**
- Automatic citation generation supporting multiple styles (APA, MLA, Chicago, IEEE)
- Source organization with tags, folders, and smart collections
- PDF annotation and note-taking capabilities
- Duplicate detection and metadata cleanup

**Collaboration & Integration**
- Real-time collaboration tools for research teams
- Share

Reference Management System Design Prompt

Generates a complete implementation plan for building a reference management tool tailored to educational institutions. Designed for ChatGPT, Claude, and Gemini to produce structured technical specifications covering citation generation, collaboration features, database integration, and deployment strategy.

41
## Role

You are a senior software engineer specializing in file compression systems, with expertise in codec theory, perceptual quality metrics, and format-specific optimization.

## Task

Build a complete, production-ready smart file compression application using React 18+ with TypeScript. The application must handle {{file-types}} with format-specific optimization engines, process everything client-side for privacy, and provide real-time quality comparisons.

## Context

This application prioritizes user privacy through client-side processing, provides transparent compression controls, and delivers optimization without quality degradation. The interface should feel fast, trustworthy, and educational—helping users understand compression tradeoffs.

## Requirements

**Architecture & Privacy**
- Client-side processing only—no server uploads
- Proper TypeScript interfaces throughout
- Com

File Compression App Builder

Generates production-ready code for a client-side file compression application with format-specific optimization, real-time quality previews, and batch processing capabilities. Runs on ChatGPT, Claude, and Cursor.

40

Platform-Native UI Layout Generator

Generates structured UI layout recommendations that follow Apple Human Interface Guidelines and Google Material Design principles. Runs on ChatGPT, Claude, Gemini, and Grok to produce platform-specific design specifications grounded in cognitive load research and real-world usage patterns.

40

Code Reviewer

Generate expert-level code review feedback for any programming language or code snippet. Produces a structured analysis highlighting strengths and areas for improvement.

40

Case Sensitivity Bug Debugger

Guides developers through systematic case sensitivity debugging, from identifying identifier mismatches to establishing naming conventions and refactoring plans. Runs on ChatGPT, Claude, Gemini, and Grok.

40
## Role

You are an expert in recursive algorithm optimization, combining theoretical foundations with practical performance engineering.

## Task

Analyze the provided recursive function for inefficiencies and deliver comprehensive optimization strategies including tail-call optimization, iterative transformations, memoization, and dynamic programming approaches.

## Context

Recursive algorithms often suffer from exponential time complexity, stack overflow risks, and redundant computations. Your analysis will:

- Examine base cases, recursive calls, and computational patterns
- Classify recursion type (linear, tree, or mutual recursion)
- Calculate stack depth for typical inputs and flag overflow risks
- Identify overlapping subproblems and redundant calculations
- Compare space and time complexity before and after each optimization
- Provide concrete code transformations with complexi

Detect Inefficient Recursion

Analyzes recursive functions for performance bottlenecks and generates tail-call optimization, iterative transformations, memoization, and dynamic programming solutions. Runs on ChatGPT, Claude, and Cursor to produce optimized code with complexity comparisons.

40
## Role
You are a DevOps engineer specializing in automated code quality enforcement. Your task is to implement a pre-commit hook system using Husky and lint-staged that catches issues before they reach version control.

## Task
Design and configure a pre-commit hook system that:

1. **Runs targeted checks** only on staged files for speed
2. **Auto-fixes** formatting issues automatically
3. **Blocks commits** when critical issues are detected (failing tests, lint errors)
4. **Provides clear error messages** that tell developers exactly what failed and how to fix it
5. **Integrates seamlessly** with the existing development workflow

## Context
{{project-context}}

## Requirements
- Configure Husky to manage Git hooks
- Use lint-staged to run checks only on staged files
- Map file types to appropriate quality checks (linting, testing, formatting)
- Design error handling that is actionable

Pre-Commit Hook System Implementation Prompt

Generates a complete pre-commit hook system using Husky and lint-staged that runs targeted quality checks on staged files, auto-fixes formatting issues, and blocks commits when critical problems are detected. Runs on ChatGPT, Claude, and Cursor.

40

Design Role-Based Access Controls

Generates a complete RBAC implementation with role hierarchies, permission matrices, and SQL scripts for database systems. Runs on ChatGPT, Claude, and other text models to produce security-compliant access control documentation and code.

40

Quick-View Product Card UI Design Prompt

Generates mobile-first quick-view product card systems optimized for e-commerce conversion, with sub-300ms load targets and friction-free checkout flows. Runs on ChatGPT, Claude, Gemini, and Grok.

40
## Role
You are an expert data scientist and software engineer specializing in goal tracking systems, data analysis, and visualization.

## Task
Design a comprehensive system architecture and implementation plan for a goal achievement tracking platform. The system must enable users to input goals, monitor progress, and generate actionable insights through visualizations and reports.

## Context
Project scope: {{system-name}}
Target audience: {{target-users}}
Core objective: {{primary-goal}}

## Output
Deliver a complete system design covering:

**1. System Requirements**
- Core features: goal creation, progress tracking, milestone management, task breakdown
- User-facing capabilities and technical infrastructure needs
- Focus on usability, robustness, and insight generation

**2. Data Model**
- Database schema including tables for users, goals, milestones, tasks, and progress entries
- E

Goal Tracking System Architecture Prompt

Generates a complete system design and implementation plan for a goal achievement tracking platform, covering data models, analytics, integrations, and security. Runs on ChatGPT, Claude, and Gemini.

40
## Role

You are an expert algorithm educator who makes complex computer science concepts accessible through clear explanations, relatable metaphors, and structured pedagogy.

## Task

Explain the {{algorithm}} by:

1. Starting with the core concept in plain language
2. Illustrating the logic with an everyday metaphor (recipes, assembly instructions, navigation)
3. Breaking down each step of the algorithm's process
4. Demonstrating how those steps translate into code
5. Highlighting the pattern and purpose behind the approach

Build intuitive understanding before technical implementation.

## Context

{{learner-profile}}

## Output

Structure your explanation with these sections:

- **Concept Overview** – plain-language summary of what the algorithm does and why it matters
- **Real-World Metaphor** – tangible analogy that maps to the algorithm's logic
- **Step-by-Step Breakdown** – numbe

Algorithm Explainer Prompt for Beginners and Students

Generates clear, beginner-friendly explanations of any algorithm using plain language, real-world metaphors, step-by-step breakdowns, and annotated code examples. Runs on ChatGPT, Claude, Gemini, and Grok.

40

ERD to Database Schema Converter

Converts Entity-Relationship Diagrams into production-ready DDL statements with preserved constraints, cardinality rules, and business logic. Generates executable SQL schema code for ChatGPT, Claude, or Cursor.

40

HMAC Authentication System Generator

Generates production-ready HMAC authentication code implementing RFC 2104 specifications for secure API signing. Delivers complete working examples for ChatGPT, Claude, and Cursor with canonical request strings, signature computation, and header formatting.

40

ML Testing Scenario Generator for AI Systems

Generates structured test scenarios across unit, integration, and end-to-end levels for machine learning systems. Runs on ChatGPT, Claude, Gemini, and Grok to identify data drift, pipeline failures, and performance degradation before production.

39
## Role
You are a code quality auditor specializing in variable naming inconsistencies that create phantom bugs—subtle misspellings, case variations, and naming conflicts that cause unintentional variable duplication.

## Task
Systematically analyze the provided code to identify and correct variable name spelling variations. Find clusters of similar-looking names that should reference the same entity but don't, due to:
- Case convention mismatches (camelCase vs snake_case)
- Singular/plural inconsistencies
- Abbreviations vs full words
- Subtle typos

For each inconsistency:
- Explain how the variation creates separate variables unintentionally
- Assess the scope and impact of the naming conflict
- Recommend which convention to standardize throughout
- Provide exact corrections with line numbers

## Context
Language: {{programming-language}}

Code to analyze:
{{code}}

Preferred naming c

Variable Naming Inconsistency Analyzer

Identifies subtle variable naming conflicts - case mismatches, typos, singular/plural errors - that create unintended duplicate variables and phantom bugs. Runs on ChatGPT, Claude, Gemini, and Grok.

39

What are AI prompts for Coding?

AI prompts for Coding are engineered instructions that already work. These are not one-line questions. Each one fixes the role, the context, the task and the output format before you type a word, so you get a usable result on the first run instead of the fourth.

They cover the work Coding actually get asked for: research and briefs, copy and content, analysis and reporting, planning, outreach and the admin that eats the day. Open a card to see the full prompt and the output it returns.

The deepest areas here: App Development (111 prompts), Frontend & UI (86 prompts), Agentic Workflows (56 prompts), Documentation (50 prompts), APIs & Integrations (43 prompts).

Popular on this page right now: "Recommend Codebase Naming Conventions", "Analyze Code Smells", "Refactor Complex Functions Using Single Responsibility".

631 on this page, every one scoped to Coding. Free to read, free to copy.

Why these prompts work for Coding

A weak prompt costs you the hour you were trying to save: you rewrite it three times, get something generic, then finish the job by hand. An engineered prompt front-loads that thinking once.

In Coding that means first drafts you can send, analysis you can act on, and the repetitive work handed off, so the time goes into judgement instead of typing.

Every prompt here was written for a real job and tested against the models people actually use. Nothing scraped from a thread.

How to use these prompts

Open a prompt, copy it, and replace the [bracketed] variables with your own product, audience or topic. The structure around them stays as is. That structure is the part doing the work.

Paste it into ChatGPT, Claude, Gemini, Grok or the model you already use. If the output drifts, tighten the context line instead of rewriting the whole prompt.

No account needed to copy one. No setup, no extension, nothing to install.

Which AI tool works best for Coding prompts?

Text prompts here run well in ChatGPT, Claude, Gemini and Grok; image prompts target Midjourney and Nano Banana. Each card lists the models it was tested with.

Are these AI prompts free to use?

A big part of the library is free: open a prompt, copy it, use it. Premium packs and the Complete AI Bundle unlock the full collection with lifetime updates.

How do I adapt these prompts to my use case?

Start with the [variables]: niche, audience, constraints. If the result still misses, add one example of the output you want. A single good example beats three extra instructions.

For a prompt built from scratch, the Start Now card above opens the custom prompt generator.

Related resources

Get smarter on AI every week

One email a week with the best new prompts, tools, and model updates. Unsubscribe anytime.

Join 100,000+ subscribers. One email a week, real prompts, tools, and model updates. Unsubscribe anytime.

Frequently asked questions

What are vibe code prompts?

Vibe coding means describing the result you want and letting the model write and run the code, in a tool like Cursor, Claude Code or Lovable. Vibe code prompts in this library describe the app in plain words, the stack, what done looks like and what the agent must not touch. The ones that work give the model a way to check its own output, such as a test to pass or a page to open.