writingOpenai

README Generation Prompt (ChatGPT)

A good README is the most important documentation a project has. This prompt generates all standard sections including the often-forgotten configuration section (listing all env vars) and contributing guide, which reduces the bus factor and speeds up onboarding. The quick start section is critical — new users decide within 5 minutes whether to invest further. This variant is formatted for ChatGPT: Optimised for GPT-4o and GPT-4 Turbo. Uses markdown formatting and system/user message separation.

Prompt Template
## System
You are an expert AI assistant. Respond using clear markdown formatting.

## User
You are a senior developer who writes clear, welcoming README files.

Generate a comprehensive README for the following project:

Project name: {{project_name}}
Project type: {{project_type}}
One-line description: {{description}}
Target users: {{target_users}}
Tech stack: {{tech_stack}}

README must include these sections:
1. **Project name and badges** — build status, npm version, license badges
2. **Description** — what it does, why it exists, key features (3-5 bullets)
3. **Demo or screenshot** — placeholder if no image available
4. **Prerequisites** — exact versions required
5. **Installation** — step-by-step commands
6. **Quick start** — the minimum code to get something working in <5 minutes
7. **Configuration** — all environment variables with descriptions and defaults
8. **API reference** — summary of public API (if applicable)
9. **Contributing** — how to set up locally for development and submit PRs
10. **License**

Style: {{style}}

Variables

{{project_name}}The name of the project
{{project_type}}e.g., "npm library", "CLI tool", "REST API", "web application"
{{description}}A one-sentence description of what the project does
{{target_users}}Who will use this, e.g., "Node.js developers", "data engineers", "end users"
{{tech_stack}}Main technologies, e.g., "Node.js, TypeScript, PostgreSQL, Docker"
{{style}}README style: "friendly and welcoming", "terse and professional", or "minimal"

Example

Input
project_name: fast-cache
project_type: npm library
description: A tiny, type-safe in-memory cache with TTL and LRU eviction for Node.js
target_users: Node.js and TypeScript developers
tech_stack: TypeScript, Node.js
style: friendly and welcoming
Output
# fast-cache

![npm version](https://img.shields.io/npm/v/fast-cache) ![build](https://img.shields.io/github/actions/workflow/status/org/fast-cache/ci.yml)

A tiny, type-safe in-memory cache with TTL and LRU eviction for Node.js.

## Quick start
```typescript
import { Cache } from 'fast-cache';
const cache = new Cache({ maxSize: 100, ttl: 60_000 });
cache.set('key', { value: 42 });
console.log(cache.get('key')); // { value: 42 }
```

## Installation
```bash
npm install fast-cache
```

Related Tools

FAQ

How do I generate a README from existing code?
Paste the main entry point file, package.json (with dependencies), and existing documentation in the tech_stack and description fields. The AI will infer the features and API from the code.
Should the README be in the root or a docs folder?
Always put README.md in the project root — GitHub and npm display it automatically. Put detailed documentation in a /docs folder or a documentation site like Docusaurus or VitePress.
How do I keep the README updated as the project evolves?
Add README updates as a PR checklist item. When a feature ships, use this prompt with "update existing README section: [section]" to regenerate only the changed section rather than the whole document.

Related Prompts