All prompts
36,334 results
3. Documentation Review
Review these function comments for clarity and completeness: /* * * Processes user data and updates the database * @param {Object} userData - The user data to…
2. Comparative Analysis
Which implementation is better for handling user authentication? Approach 1: [code snippet 1] Approach 2: [code snippet 2] Consider: - Security - Maintainabili…
Performance Review
Analyze this React component for performance optimization opportunities : const UserList = ( { users } ) => { const [ filteredUsers , setFilteredUsers ] = useS…
Security Review
Review this Node . js authentication middleware for security vulnerabilities : const auth = async ( req , res , next ) => { try { const token = req . header (…
Basic Code Review
Please review this Python function that calculates factorial : def factorial ( n ) : if n < 0 : return None if n == 0 : return 1 return n * factorial ( n - 1 )…
3. Legacy Code Modernization
Help modernize this jQuery code to React : $ ( '#userForm' ) . submit ( function ( e ) { e . preventDefault ( ) ; var userData = { name : $ ( '#userName' ) . v…
2. Complex Refactoring
Help plan refactoring this monolithic class : class OrderProcessor { constructor ( ) { this . db = new Database ( ) ; this . payment = new PaymentGateway ( ) ;…
Performance Optimization
Optimize this React component : const Dashboard = ( ) => { const [ data , setData ] = useState ( [ ] ) ; const [ filters , setFilters ] = useState ( { } ) ; us…
Design Pattern Implementation
Help refactor this code to use the Observer pattern : class UserService { updateUser ( userId , data ) { // Update user db . users . update ( userId , data ) ;…
Basic Code Cleanup
Help refactor this JavaScript function : function processData ( data ) { var result = [ ] ; for ( var i = 0 ; i < data . length ; i ++ ) { if ( data [ i ] . ac…
3. Migration Planning
Help design a migration strategy: Current: Monolithic .NET application Target: Microservices architecture Consider: 1. Phased approach 2. Data migration 3. Fea…
2. Trade-off Analysis
Analyze these approaches for data storage: Option 1: MongoDB - Document-based storage - Horizontal scaling - Schema flexibility Option 2: PostgreSQL - ACID com…
Cloud Architecture Planning
Help design a cloud-native architecture for a video streaming service: Requirements: - Global content delivery - User authentication - Content management - Ana…
System Integration Design
Design an integration architecture for connecting these systems: 1. CRM System (REST API) 2. ERP System (SOAP API) 3. Payment Gateway (GraphQL) 4. Legacy Datab…
Basic Architecture Review
Help me design a microservices architecture for an e-commerce platform: Requirements: - User authentication - Product catalog - Shopping cart - Order processin…
Multi-language Examples
Provide code examples for these API calls in JavaScript, Python, and Go: 1. Authenticate and get token 2. Make GET request with query parameters 3. Make POST r…
Versioning and Migration
Create a migration guide from API v1 to v2: Breaking changes: - [Change 1] - [Change 2] Timeline: - v1 support until: [date] - Recommended migration start: [da…
Interactive Documentation
Create Swagger/OpenAPI specification format for: - API base URL: [url] - Authentication: [type] - Main endpoints: [list] Include: 1. Complete OpenAPI 3.0 spec…
Prompt Strategy to Avoid Issues
When creating API documentation, avoid: 1. Using placeholder values in examples (use real, working examples) 2. Assuming prior knowledge (explain every concept…
SDK Documentation Prompt Template
Create Python SDK documentation: Installation: pip install api-client Authentication: Bearer token Operations to document: 1. client.users.get(id) - Fetch user…
SDK Documentation Prompt Template
Create SDK documentation for [Language]: SDK features: - Installation via [package manager] - Authentication setup - [Main resource 1] operations - [Main resou…
Error Documentation Framework
Use this prompt for comprehensive error documentation: ```markdown Create error documentation for our REST API: Common errors to cover: - 400 Bad Request (miss…
Error Documentation Framework
** Error Code ** : [CODE] ** HTTP Status ** : [Status] ** Message ** : "User-friendly error message" ** Causes ** : - [Cause 1] - [Cause 2] ** Solutions ** : 1…
Authentication Documentation Template
Document OAuth 2.0 authentication for our API: Supported grant types: 1. Authorization Code (user-facing apps) 2. Client Credentials (server-to-server) Endpoin…
Authentication Documentation Template
** Method ** : [OAuth 2.0 / API Key / JWT / Custom] ** Setup Steps ** : 1. Create [account/app/token] at [where] 2. Retrieve [credential name] 3. Store securel…
Essential Endpoint Details
Document this API endpoint in detail: Endpoint: GET /api/v1/users/{id} Purpose: Retrieve a specific user's profile Path parameters: - id (string, required): Th…
Organization Patterns That Work
Create API documentation structure for [your API name]: Follow this format for each section: - Section title (H2) - Brief description (1 sentence) - Key concep…
Key Information to Gather
I need to document a [REST/GraphQL/gRPC] API with the following details: - Base URL: [your base URL] - Authentication: [Bearer tokens/API keys/OAuth 2.0] - Mai…
Testing and Verification
Help create test cases for: [Algorithm description] Include: 1. Edge cases 2. Performance tests 3. Correctness verification 4. Input validation
Dynamic Programming
Help develop a dynamic programming solution for: [Problem description] Provide: 1. State definition 2. Recurrence relation 3. Base cases 4. Optimization approa…
Graph Algorithms
Help design a graph algorithm for: [Graph problem description] Include: 1. Graph representation 2. Traversal strategy 3. Optimization goals 4. Edge cases handl…
Search Algorithms
Design a search algorithm for: [Search problem description] Specify: 1. Search space characteristics 2. Search criteria 3. Performance requirements 4. Expected…
Sorting Algorithms
Help me implement a [sorting algorithm name]: - Input array type and size - Stability requirements - Space constraints - Performance expectations
Optimization Techniques
Help optimize this algorithm: [Current implementation] Focus on: 1. Time complexity improvements 2. Space complexity reductions 3. Code readability and maintai…
Implementation Guidance
Guide me in implementing: [Algorithm description] Please provide: 1. Pseudocode outline 2. Key functions and their purposes 3. Data structure implementations 4…
Solution Strategy
Help me design an algorithm for: [Problem description] Consider: 1. Time and space complexity requirements 2. Potential approaches (brute force, divide & conqu…
Problem Analysis
Analyze this algorithmic problem: [Describe your problem] Please provide: 1. Problem breakdown and key components 2. Input/output specifications 3. Constraints…
Expert Role Prompting
Act as a senior DevOps engineer with 10+ years of Kubernetes experience. Review this deployment configuration for: - Security best practices (least privilege,…
Chain of Thought Reasoning
Analyze this [problem/code/architecture] using chain of thought: 1. Initial assessment: What are the key components and relationships? 2. Identify issues: What…
4. Include Examples
Generate API documentation similar to this structure: [example documentation] Avoid generic descriptions. Include: - Request/response examples - Error codes an…
3. Request Specific Output Formats
Provide the solution as: 1. Code implementation with inline comments 2. Unit tests covering edge cases 3. Usage examples 4. Performance considerations 5. Secur…
1. Be Specific and Contextual
❌ Vague: "Create a login function" ✓ Specific: "Create a secure login function in TypeScript using bcrypt for password hashing, JWT for session management, and…
Quality Assurance
Debug this issue: Error: [exact error message] Context: - Expected behavior: [what should happen] - Current behavior: [what actually happens] - Environment: [O…
System Design & Architecture
Design a [system type] that handles [scale/requirements]: Requirements: - Functional: [list key features] - Non-functional: [performance, security, scalability…
3. Balance Specificity with Flexibility
"Provide enough detail to guide the AI, but leave room for it to generate creative and unexpected solutions."
2. Use System Messages Effectively
"Set your system message to define the AI's role and behavior, then use your user message for the specific task."
1. Start Simple, Iterate Gradually
"Begin with a basic prompt that clearly states your goal. Test it, then add constraints, context, or formatting requirements one at a time."
2. Prompt Templates
"Here's a template I've found effective for [task]: [Template structure] You can customize it by changing [variables]."
3. Few-Shot Learning
"Here are some examples of [task]: Example 1: [input] → [output] Example 2: [input] → [output] Example 3: [input] → [output] Now, for this new case: [new input…
2. Chain-of-Thought Prompting
"Let's approach this step by step: 1. First, let's [initial step] 2. Then, we'll [next step] 3. Finally, we'll [conclusion]"
1. Role Prompting
"Act as a [specific role] with [specific expertise]. Your task is to [specific task]."
3. Problem Solving
"Help me solve this problem: Problem: [Detailed description] Context: [Relevant background information] Constraints: [Limitations or requirements] Goal: [Desir…
2. Code Generation
"Generate code for [functionality]: Language: [Programming language] Framework: [If applicable] Requirements: - [Specific requirement 1] - [Specific requiremen…
1. Content Creation
"Create a blog post about [topic]: Role: Professional content writer with expertise in [field] Audience: [Specific audience description] Tone: [Formal, convers…
3. Weak Structure
"Help me optimize this database query: 1. First, analyze the current query performance: [Query and execution plan] 2. Identify the specific bottlenecks: - Tabl…
2. Poor Context
❌ "How do I fix this bug?" ✅ "I'm encountering a 'TypeError: Cannot read property 'map' of undefined' in my React component when fetching data from an API. The…
1. Overcomplexity
❌ "Write a comprehensive guide to all programming languages, frameworks, and tools, with examples for each, focusing on web development, mobile development, de…
3. Performance Tuning
❌ "Write a comprehensive guide to all aspects of web development including HTML, CSS, JavaScript, frameworks, backend, databases, deployment, security, and bes…
2. Quality Control
"Generate a list of 5 potential blog topics about artificial intelligence. For each topic: 1. Ensure it's specific and focused (not too broad) 2. Verify it's c…
1. Iterative Refinement
Initial prompt: "Write about climate change" Refined prompt: "Write a 300-word article about the impact of climate change on coastal communities, focusing on r…