# Prompt Templates for Founders

> Ready-to-use prompt templates for common founder tasks with AI.
> Replace [brackets] with your specific details.

---

## 1. Explain Code

```
Explain what this code does in plain English. I'm a non-technical founder
who needs to understand the business logic, not every syntax detail.

Focus on:
- What does this code accomplish?
- What data does it use/produce?
- Are there any business rules encoded here?

[paste code]
```

## 2. Debug an Error

```
I'm getting this error:

[paste error message]

In this file: [filename]

Context: I was trying to [what you were doing].
My tech stack is [stack].

Please explain what's wrong in simple terms and show me exactly how to fix it.
```

## 3. Build a Feature

```
I need to build [feature description].

Context:
- My app is built with [tech stack]
- The feature should [describe expected behavior]
- Users will [describe user flow]

Requirements:
1. [requirement 1]
2. [requirement 2]
3. [requirement 3]

Please build this step by step, explaining key decisions as you go.
```

## 4. Review & Improve Code

```
Review this code for:
- Bugs or logic errors
- Security vulnerabilities
- Performance issues
- Readability improvements

Be specific — show me the problematic lines and the improved version.

[paste code]
```

## 5. Write Tests

```
Write tests for [component/function name] in [file path].

Cover these scenarios:
- Happy path: [describe normal usage]
- Edge case: [describe edge case]
- Error case: [describe error scenario]

Use [testing framework, e.g., Vitest/Jest/Playwright] and match existing test patterns in the project.
```

## 6. Database Schema Design

```
I need a database schema for [feature].

My app is [description].
Users need to [key user actions].

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

Design the tables, columns, types, and relationships. Explain your reasoning for key decisions.
```

## 7. API Endpoint Design

```
Design a REST API endpoint for [purpose].

It should:
- Accept: [input data]
- Return: [output data]
- Handle these errors: [error scenarios]

Include the route, method, request/response types, and basic implementation.
```

## 8. Refactor Messy Code

```
This code works but it's messy and hard to maintain. Refactor it to be:
- More readable
- Better organized
- Easier to extend later

Keep the exact same behavior. Don't add features. Just clean it up.

[paste code]
```

## Tips for Better Prompts

1. **Be specific** — "Make it better" vs "Reduce the API response time by caching the user query results"
2. **Give context** — Always mention your tech stack and what you're building
3. **Show examples** — Share existing code patterns so AI matches your style
4. **Set constraints** — Tell the AI what NOT to do (e.g., "Don't add new dependencies")
5. **Iterate** — Start simple, then refine. Don't try to get everything in one prompt

---
*Nerdsmith Founder Track — Module 0: Claude Code Bootcamp*
