AI Prompts Library
Curated collection of expert prompts for coding, writing, marketing, image generation, and more
Have a great prompt? Submit it to the library →
Popular Tags:
Claude Code Task Brief - Feature Implementation
You are working in the codebase at [PATH]. Your task is to implement [FEATURE]. Follow this protocol: 1. First, READ the relevant files to understand the existing patterns (controllers, models, views). 2. Plan the change in 3-5 bullets. Don't implement yet. 3. Once I confirm the plan, implement step by step. 4. After implementation, run [TEST COMMAND] and report results. 5. Do NOT modify files outside the listed scope without asking. Scope: only files in [DIRECTORY]. Constraints: keep the existing coding style. Don't add new dependencies. Deliverable: working feature + brief PR description. Start by reading and reporting back what you found. Don't change anything yet.
Feature work with Claude Code or any agentic coding tool
Bug Hunt Investigation Prompt
There's a bug in [PROJECT/COMPONENT]. The symptom is: [DESCRIBE SYMPTOM]. Do not fix it yet. First, INVESTIGATE: 1. Read the relevant files. List file paths and line numbers you suspect. 2. Form 3 hypotheses about the root cause, ranked by likelihood. 3. For each hypothesis, describe how you'd verify it (a test, a log, a manual check). 4. Recommend the cheapest verification path to start with. Report back with the investigation summary. I'll tell you which hypothesis to verify first. Then we fix.
Production bugs, mysterious failures, intermittent issues
Refactor Plan Generator (Multi-File)
I want to refactor [DESCRIPTION OF REFACTOR - e.g., extract auth logic into its own service]. Before touching any code, produce a refactor plan: 1. List the files that will be modified, created, or deleted. 2. Show the new architecture in a one-paragraph summary. 3. Identify the riskiest steps and how to mitigate them. 4. Propose a safe ordering: which step lands first, second, etc., so the codebase stays green at every step. 5. List tests to add or update. No code yet. Plan only. I'll review and then we execute one step at a time.
Mid-size to large refactors, technical debt cleanup
Test Coverage Generator
For the file at [PATH], generate a comprehensive test suite.
Framework: [JEST / PYTEST / RSPEC / etc.].
Coverage targets:
- Happy path for every public function
- Edge cases: empty inputs, null, max values, unicode, very large inputs
- Error paths: invalid input, exceptions, timeouts
- Integration with [DEPENDENCY] (mock if needed)
For each test, include a one-line comment explaining WHY this test exists (what regression it would catch).
Use descriptive `test("...")` names - not generic ones.
After writing, run the suite and confirm all pass. Report any code changes needed for testability. Adding test coverage, pre-deployment safety nets
Migration Generator (Database Schema)
Generate a database migration for [DATABASE - Postgres / MySQL / SQLite]. Goal: [DESCRIBE - add column, rename table, add index, etc.]. Framework: [Prisma / Knex / Rails / Alembic / raw SQL]. Requirements: 1. The migration must be safe to run on a table with millions of rows in production. No table-level locks if avoidable. 2. Include both UP and DOWN migrations. 3. Defaults handled correctly - if adding a NOT NULL column, propose a backfill strategy. 4. Add appropriate indexes. 5. Name the migration descriptively with a timestamp prefix. Return the migration file content and a one-paragraph runbook explaining how to apply it safely in production.
Schema changes, production database operations
API Endpoint Generator with OpenAPI
Generate a REST API endpoint with the following spec: Method: [GET / POST / PUT / DELETE] Path: [/api/...] Purpose: [WHAT IT DOES] Auth: [JWT / API key / public] Framework: [Express / FastAPI / Rails / Laravel] Deliverables: 1. Route handler with input validation 2. OpenAPI/Swagger spec for this endpoint 3. TypeScript / Pydantic types for request and response 4. Two unit tests (happy path + invalid input) 5. cURL example for manual testing Follow the existing project conventions for error handling, logging, and response shape.
API development, microservice authoring
Code Performance Profiler
Profile this code for performance issues: [PASTE CODE] 1. Identify the top 3 performance bottlenecks. For each, explain WHY it's slow (Big-O, IO blocking, repeated allocations, etc.). 2. Propose a specific optimization for each. 3. Estimate the speedup (rough order of magnitude). 4. Identify the lowest-hanging fruit - the optimization with best ROI (largest speedup per line of code change). 5. Provide the optimized code only for the top recommendation. Don't refactor everything at once. If the code is already efficient, say so honestly.
Performance bugs, scaling problems, hot path optimization
Incident Postmortem Drafter
Draft an incident postmortem for the following: Incident: [BRIEF DESCRIPTION] Date/Time: [WHEN] Duration: [HOW LONG] Impact: [WHO/WHAT WAS AFFECTED] Detection: [HOW DID YOU FIND OUT] Resolution: [WHAT FIXED IT] Root cause: [WHAT BROKE] Write a blameless postmortem covering: 1. Summary (3 sentences) 2. Timeline (UTC, key events) 3. Root cause analysis (5 whys, with concrete causal chain - not generic phrases like "human error") 4. What went well during response 5. What went poorly 6. Action items (specific, owned, dated) Maintain a blameless tone - focus on systems and processes, not individuals.
Production incidents, retrospectives, SRE practices
Article Outline (SEO + AEO Optimized)
Generate a comprehensive article outline for the topic: "[TOPIC]". Target keyword: [PRIMARY KEYWORD] Secondary keywords: [LIST 2-3] Target audience: [READER PERSONA] Word count: [WORD COUNT] Intent: [INFORMATIONAL / COMMERCIAL / TRANSACTIONAL] Produce: 1. SEO-optimized H1 2. Meta description (under 160 chars, includes primary keyword) 3. H2/H3 structure with keyword distribution 4. Featured-snippet-targeted Q&A section (for AEO - answer engine optimization) 5. Recommended internal links (anchor + URL placeholder) 6. Recommended external authoritative sources to cite 7. Schema.org type to use (Article / FAQPage / HowTo) The outline should be detailed enough that a writer can produce the article in one sitting.
Blog content, content calendar, content briefs
JSON-LD Schema Generator
Generate the appropriate JSON-LD structured data for the following page: Page type: [Article / Product / FAQPage / HowTo / Recipe / LocalBusiness / Event / Organization] Page URL: [URL] Key details: [LIST RELEVANT FIELDS] Return a single JSON-LD block ready to drop into a `<script type="application/ld+json">` tag. Use the latest schema.org vocabulary. Include all recommended fields, not just required ones. Validate that the JSON is syntactically correct and that all enums use the official spec values.
SEO implementation, rich snippets, Google site verification
Internal Link Suggester
Below is a draft article. Suggest internal links to add. For each suggestion, provide: 1. The exact phrase in the article to link from (3-7 words, naturally fitting anchor text) 2. The URL/page to link to (assume my site has pages at the URLs I'll provide) 3. Why this link helps SEO (topical authority, user journey, etc.) My site has these key pages: [LIST URLS WITH ONE-LINE DESCRIPTIONS] Draft article: [PASTE ARTICLE] Return 5-8 strong link recommendations. Skip weak ones - quality over quantity.
SEO content optimization, topical authority building
Title Tag and Meta Description Optimizer
Rewrite the title tag and meta description for this page: Page URL: [URL] Current title: [CURRENT] Current meta description: [CURRENT] Primary target keyword: [KEYWORD] User intent: [INFORMATIONAL / TRANSACTIONAL] Page content summary: [3 SENTENCES] Produce 5 alternatives for each. Constraints: - Title: 50-60 chars, primary keyword in first 30 chars - Meta description: 140-160 chars, includes value prop and CTA verb - Both must accurately represent the page (no clickbait) - Each variant has a different angle (benefit, urgency, social proof, etc.) Rank the variants 1-5 by predicted CTR.
Improving CTR from search results, title experimentation
No Prompts Found
Try adjusting your filters or search query.
Want Custom Prompts?
Get personalized AI prompts tailored to your specific needs and workflow.
Contact Us