Skip to main content
JG is here with you โœจ
โ†Back to AI Lab
Prompt Engineering

AI Prompts Library

A curated collection of high-leverage prompts for development, architecture, writing, and security workflows.

Coding

React Component Refactoring

Ask the AI to refactor a messy React component into a clean, modern structure using hooks and best practices.

ReactClean CodeRefactoring
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]
Coding

Write Comprehensive Unit Tests

Generate Jest/React Testing Library tests for a given component or function.

TestingJestTDD
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]
Architecture

System Architecture Review

Get architectural feedback on a proposed system design.

System DesignFeedbackScaling
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.
Architecture

Database Schema Design

Design a normalized database schema for a specific application feature.

DatabaseSQLSchema
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.
Writing

The "Explain 3 Ways" Technique

Use AI to explain a complex topic using three different levels of abstraction.

LearningWritingTeaching
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.
Writing

Flesh Out an Article Outline

Expand a bulleted outline into a full article draft maintaining a specific tone.

BloggingContent Creation
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]
Security

Security Vulnerability Analysis

Analyze a snippet of code for potential OWASP vulnerabilities.

SecurityOWASPCode Review
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]
Open to AI-Focused Roles

AI Sales โ€ข AI Strategy โ€ข AI Success โ€ข Creative Tech โ€ข Toronto / Remote

Let's connect โ†’
Terms of ServiceLicense AgreementPrivacy Policy
Copyright ยฉ 2026 JMFG. All rights reserved.