Prompt Library

Copy and use these prompts in your AI tools

Explain Code
Development
Explain this code step by step in an easy-to-understand way:

```
[paste code here]
```

Explain:
1. What the code does
2. How it works
3. Any design patterns used
explain
learn
code-review
Refactor Code
Development
Refactor this code to improve:
- Readability
- Performance
- Maintainability

```
[code]
```

Explain the changes you made and why.
refactor
clean-code
optimization
Design React Component
Design
Design a React component for [component description] using:
- TypeScript
- Tailwind CSS
- Performance best practices

Requirements:
- [requirement 1]
- [requirement 2]
react
component
ui
System Architecture Review
Design
Review this architecture and provide:
1. Strengths
2. Weaknesses
3. Potential risks
4. Improvement suggestions

Architecture:
[architecture description]
architecture
review
system-design
Generate Unit Tests
Testing
Write comprehensive unit tests for this function using Jest:

```
[function]
```

Test:
- Normal cases
- Edge cases
- Error handling
- null/undefined values
jest
unit-test
tdd
Debug Analysis
Testing
Analyze this bug:

Message: [error message]
Stack trace: [stack trace]

Causing code:
```
[code]
```

Provide:
1. Root cause
2. Solution
3. Prevention strategy
debug
bug-fix
troubleshoot
Write README
Writing
Write a professional README.md for [project name]:

Description: [brief description]
Technologies: [tech list]

Include:
- Project description
- Installation
- Usage
- Examples
- Contributing
- License
readme
documentation
markdown
API Documentation
Writing
Document this API endpoint:

Method: [GET/POST/PUT/DELETE]
Path: [path]
Description: [what it does]

Include:
- Parameters
- Request body
- Response
- Examples
- Error codes
api
documentation
rest
Design AI Agent
Agents
Design an AI agent to automate [task]:

Requirements:
- [requirement 1]
- [requirement 2]

Define:
1. Required tools
2. Execution steps
3. Success criteria
4. Error handling
agent
automation
ai
LangChain Agent Code
Agents
Write Python code for a LangChain agent that does [task]:

Available tools:
- [tool 1]
- [tool 2]

Requirements:
- Use OpenAI
- Error handling
- Step logging
langchain
python
agent