A curated collection of high-leverage prompts for development, architecture, writing, and security workflows.
Ask the AI to refactor a messy React component into a clean, modern structure using hooks and best practices.
Please review the following React component and refactor it according to these rules: 1. Extract complex logic into custom hooks if necessary. 2. Use modern functional component syntax (no class components). 3. Ensure strong TypeScript typing for all props and state. 4. Improve performance by wrapping expensive calculations in useMemo or useCallback. 5. Provide a brief explanation of the changes you made and why. [INSERT COMPONENT CODE HERE]
Generate Jest/React Testing Library tests for a given component or function.
I need comprehensive unit tests for the following [Component/Function]. Please use Jest and [React Testing Library / Supertest]. Requirements: 1. Test the happy path and primary use cases. 2. Test edge cases and potential error states. 3. Mock any external API calls or side-effects. 4. Ensure meaningful assertions (don't just assert true toBe true). [INSERT CODE HERE]
Get architectural feedback on a proposed system design.
Act as a Staff-level Software Architect. I am designing a new system for [PURPOSE OF SYSTEM]. Here is my current proposed architecture: [INSERT ARCHITECTURE DESCRIPTION/DIAGRAM] Please review this design and provide feedback on: 1. Potential bottlenecks and scalability issues. 2. Single points of failure. 3. Security considerations. 4. Alternative technologies or patterns that might better suit this use case. Be highly critical but constructive.
Design a normalized database schema for a specific application feature.
I am building a feature for [APPLICATION CONTEXT]. The core entities and relationships are: [DESCRIBE ENTITIES AND RELATIONSHIPS] Please design a normalized relational database schema (PostgreSQL) for this feature. Include: 1. CREATE TABLE statements with appropriate data types. 2. Primary and Foreign Key constraints. 3. Necessary indexes for read performance. 4. A brief explanation of the normalization choices.
Use AI to explain a complex topic using three different levels of abstraction.
Please explain the concept of [INSERT TOPIC] using the "Explain 3 Ways" format: 1. Explain it simply: Use an analogy that a 10-year-old would understand. 2. Explain it technically: Provide the formal definition and mechanisms for an advanced practitioner. 3. Explain the "Why": Explain why this concept is important in the grand scheme of things and its practical implications.
Expand a bulleted outline into a full article draft maintaining a specific tone.
I have an outline for a blog post about [TOPIC]. I want you to expand this outline into a full draft (approx 1500 words). Tone Guidelines: - Authoritative but accessible (like a senior mentor). - Avoid generic AI buzzwords (e.g., "delve", "tapestry", "moreover"). - Keep sentences punchy and paragraphs short. Here is the outline: [INSERT OUTLINE]
Analyze a snippet of code for potential OWASP vulnerabilities.
Act as a Senior Application Security Engineer. Review the following code snippet for potential security vulnerabilities (e.g., OWASP Top 10 like SQLi, XSS, Broken Access Control). If you find a vulnerability: 1. Identify the specific line(s) of code. 2. Explain the attack vector and potential impact. 3. Provide a secure remediation snippet. [INSERT CODE HERE]