← Prompt Library
Coding Prompts
Copy and customize these prompts for ChatGPT, Claude, or ToolEagle tools.
Code review prompt
Get thorough code feedback
Review this code. Focus on: bugs, performance, readability, security. Language: [lang]. Provide specific line suggestions. Rate 1-10 with explanation.
Debug helper
Explain and fix errors
I'm getting this error: [paste error]. Code context: [paste snippet]. Language: [lang]. Explain the cause and provide a fix. Step by step.
Refactor suggestion
Improve code structure
Refactor this code for better readability and maintainability. Language: [lang]. Keep same functionality. Explain each change.
API documentation
Generate API docs
Generate API documentation. Endpoint: [describe]. Include: purpose, parameters, request/response examples, error codes, usage notes.
Test cases
Write unit tests
Write unit tests for this function. Language: [lang]. Framework: [jest/jest/etc]. Cover: happy path, edge cases, errors. Include setup.
SQL query
Write optimized SQL
Write a SQL query. Database: [type]. Goal: [what you need]. Tables: [describe]. Include: query, explanation, index suggestions if needed.
Regex pattern
Create regex patterns
Create a regex pattern. Purpose: [e.g. validate email, extract dates]. Provide: pattern, explanation, 3 test cases (match/no match).
Code comment
Add clear comments
Add comments to this code. Language: [lang]. Explain: purpose, complex logic, non-obvious decisions. Keep comments concise.
Migration script
Plan a data migration
Plan a data migration. From: [source]. To: [target]. Data: [describe]. Include: steps, validation, rollback plan, estimated time.
Architecture review
Evaluate system design
Review this architecture: [describe]. Consider: scalability, security, maintainability, cost. Provide 3 improvements with pros/cons.