13 prompts
Coding
Debug and Review My Code
You are a senior software engineer conducting a code review. Review this code: [paste your code]. Provide: 1) All bugs and errors with line references, 2) Edge cases that would break this, 3) Performance or readability inefficiencies, 4) Any security vulnerabilities, 5) A corrected and refactored version of the code. For each change explain the reasoning in plain language.
Architect a New Feature
I need to build [feature description] into an existing [type of application]. Current tech stack: [list technologies]. Constraints: [describe any limitations]. Walk me through: 1) The recommended technical approach with alternatives considered, 2) The data model changes required, 3) The API endpoints or functions needed, 4) Potential failure points and how to handle them, 5) A rough estimate of complexity and implementation order.
Architectural Concept Render
Architectural concept render, [building type], [design style: brutalist, biophilic, or parametric], dramatic evening lighting, high detail materials, photorealistic architectural visualization, professional render --ar 16:9 --style raw --v 7
Debug and Fix My Code
Debug this code: [paste code]. Language: [specify]. Provide: 1) A clear identification of every bug with the line reference and explanation of what is wrong, 2) The root cause of each issue, 3) The corrected version of the code, 4) A brief explanation of each fix so I understand what changed and why, 5) Any additional issues you notice that are not bugs but could cause problems.
Optimize for Performance
Optimize this code for performance: [paste code]. Identify: the biggest performance bottlenecks, any unnecessary computation or redundant operations, memory usage issues, and algorithmic improvements. For each optimization provide the improved code, the expected performance impact, and any trade-offs such as readability vs speed. Show before and after comparison.
System Architecture Design
Design a system architecture for [application description]. Requirements: [list functional requirements]. Scale: [expected user count and data volume]. Budget tier: [startup, mid-size, or enterprise]. Provide: a component diagram described in text, technology choices for each component with reasoning, database design approach, API structure overview, how you would handle authentication, and the top three architectural risks with mitigation strategies.
Senior Engineer Code Review
Conduct a thorough code review of the following as if you are a senior engineer at a high-quality engineering organization: [paste code]. Evaluate: correctness and edge cases, performance and scalability, security considerations, code readability and naming, test coverage needs, and adherence to the relevant best practices for [language or framework]. Be specific and constructive. Provide line-level comments where relevant.
Security Vulnerability Audit
Perform a security audit on this code: [paste code]. Check systematically for: SQL injection or NoSQL injection vulnerabilities, cross-site scripting possibilities, authentication and authorization weaknesses, sensitive data exposure in logs or responses, insecure dependencies, and any other OWASP Top 10 issues. For each vulnerability found: describe the risk, show the specific vulnerable code, and provide a fixed version with explanation.
Write Technical Documentation
Write technical documentation for: [describe the code, API, or feature]. Target audience: [junior developer, senior developer, or external API consumer]. Include: an overview of what this does and why it exists, installation or setup steps if applicable, all parameters or inputs with types and descriptions, return values or outputs, example usage with real code samples, common errors and how to handle them, and any important limitations or caveats.
Refactor This Code
Refactor this code to improve quality without changing functionality: [paste code]. Goals: improve readability through better naming and structure, reduce complexity and nesting, eliminate code duplication, apply relevant design patterns if appropriate, and improve testability. Show the refactored version and provide a summary of the changes made and the reasoning behind each significant decision.
Write Unit Tests
Write comprehensive unit tests for this function or module: [paste code]. Testing framework: [specify, e.g. Jest, Pytest]. Cover: the happy path with expected inputs and outputs, all edge cases you can identify, error and exception handling, boundary conditions, and any state that needs to be mocked. Each test should have a clear descriptive name. Include a brief comment explaining why each test case matters.
Design a REST API
Design a REST API for [application or feature description]. Provide: a list of all endpoints with their HTTP method, URL structure, request body, and response schema, the authentication approach, error response formats and status codes, pagination strategy for list endpoints, rate limiting approach, and any versioning strategy. Follow REST conventions and explain any deviations.
Write and Optimize SQL Queries
Help me with this SQL problem: [describe what you need or paste your current query]. Database: [MySQL, PostgreSQL, etc.]. Table structure: [describe or paste schema]. Either write the query from scratch or optimize the existing one. Provide: the working query, an explanation of the logic, any indexes that would improve performance, and alternative approaches if relevant. If the query is complex, break down each clause.