Generate a README.md From Your Codebase
For when AI writes a README full of emoji, badges and feature lists that looks finished but invents a command or skips a setup step. Paste your package.json (or other manifest), entry point and folder tree. It writes a lean README.md built only from what you supplied, scales the sections to your project type, marks unknowns as TODO and ends with a list of commands to verify from a clean clone.

You are a senior developer who writes READMEs other developers actually read. I want a README.md for my project, written only from the files I paste below. Here is what goes wrong when I ask AI for one: it sprinkles emoji in every heading and bullet, adds badges and "blazing fast" feature lists, documents every corner of the repo, buries workaround notes in the install section, and confidently invents commands, flags or env vars that do not exist. It looks finished but reads like a first draft nobody edited. I want the opposite. HARD RULES: 1. GROUNDED ONLY. Every command, script, env var, flag, file path and dependency must appear in what I pasted. If you cannot point to where it came from, do not write it. Put a [TODO: ...] marker in the README instead and list it under TODO below. 2. NO SLOP. No emoji anywhere. No badges unless I ask. No marketing adjectives (powerful, seamless, blazing fast, robust). No "Welcome to" intro. No status-update lines like "all modules are built"; describe what a newcomer can do with it. 3. SCALE TO THE PROJECT. A small tool or script gets 4 to 6 sections. Only add Architecture, Configuration, Contributing, Roadmap or Acknowledgements if my files or answers give you real content for them. Internal tools skip Contributing. Anything long goes in a "See docs/..." link, not the README. 4. ONE-SENTENCE OPENER. Directly under the title: what it does and who it is for, in one plain sentence. 5. SETUP A STRANGER CAN FOLLOW. Start from git clone and cd, then prerequisites with versions (runtime, package manager), then install, then run. If a step needs something hidden (an API key, a running database, clipboard or network access), say so at that step. 6. RIGHT INFORMATION IN THE RIGHT PLACE. Known issues and workarounds go in a Troubleshooting section, not inside the install steps. 7. PLAIN MARKDOWN. One H1, H2 for sections, fenced code blocks with a language tag for every command, short paragraphs. BEFORE WRITING, ask me these in one short batch and STOP: 1. What type of project is this: open-source library or CLI, portfolio project, internal or team tool, or something else? 2. Who reads this README first (users installing it, recruiters, teammates, contributors)? 3. Is there a live demo, screenshot or GIF I should link near the top? (Leave blank if not.) 4. Anything my files will not show: required env vars or keys, external services, OS limits, known issues. 5. For a portfolio project only: which parts did you personally build or decide? 6. License, if any. Then reply using exactly these sections: README.MD: the complete file in one markdown code block. VERIFY: every command in the README, in order, as a checklist I run from a fresh clone in a clean environment before I commit. Next to each, the file it came from (for example package.json scripts.dev). TODO: every [TODO] marker you left, one per line, with the question I need to answer to fill it. CUT: sections or details you deliberately left out, one line each, with the reason, so I can add them back if I disagree. Plain text outside the code block, no intro, no pep talk. Here are my files (paste what you have): Manifest (package.json, pyproject.toml, Cargo.toml, go.mod, etc.): [PASTE] Entry point file(s): [PASTE] Folder tree (for example the output of tree -L 2 or ls -R, minus node_modules): [PASTE] Existing README, .env.example, Dockerfile or Makefile, if any: [PASTE OR "none"] Start with the questions.
How to use this chat prompt
Paste it directly into a new chat, replace anything in [BRACKETS] with your context, and send. Re-use it whenever the task comes up, or save it as a text-expander snippet.
Example output
Small Node CLI that saves clipboard text to Markdown notes: package.json, src/index.js and folder tree pasted, open-source, no demo, MIT.
# 🚀 Clipnote: the blazing fast note-taking tool for developers!
Features: 📋 clipboard capture, ⚡ lightning speed, 🔒 secure, 🌍 cross-platform.
Installation: npm install -g clipnote, then run clipnote --sync to back up your notes to the cloud.
README.MD: # clipnote. A command-line tool that saves whatever is on your clipboard as a dated Markdown note.
## Requirements: Node 18+ (package.json engines), npm. Reads your system clipboard when it runs.
## Install: git clone, cd clipnote, npm install, npm link.
## Usage: clipnote saves to ./notes; clipnote --dir ~/journal changes the folder (src/index.js).
## Troubleshooting: [TODO: Linux clipboard dependency?] ## License: MIT.
VERIFY: npm install (package.json), npm link (bin.clipnote), clipnote --dir (src/index.js line 12).
TODO: Does Linux need xclip or xsel installed? CUT: Roadmap, no content in your files.
FAQ
Frequently asked questions
What should I put in a README?
For most projects: a title, one sentence on what it does and who it is for, requirements with versions, install and run steps starting from git clone, a usage example, and the license. Add configuration, troubleshooting or contributing only when you have real content for them. A small project rarely needs more than 4 to 6 sections, and longer material reads better in a docs folder linked from the README.
Can AI generate a README from my code or package.json?
Yes, if you give it the actual files. Paste your manifest (package.json, pyproject.toml and so on), the entry point and a folder tree, and the model can pull real scripts, dependencies and versions instead of guessing. The common failure is invented commands or flags that look plausible, so this prompt only writes what it can trace to your files and marks the rest as TODO. Instructions aimed at coding agents rather than humans belong in a separate file, which the AGENTS.md generator writes.
How do I stop an AI README from inventing commands?
Ground it and then check it. The prompt forbids any command, env var or flag that is not in what you pasted, and ends with a VERIFY checklist naming the file each command came from. Run that list from a fresh clone in a clean environment before you commit. Treat the output as a strong first draft, not a finished document.
Is a README for a portfolio project different from an open-source one?
Yes. A reviewer looking at a portfolio project usually wants a working demo link and a screenshot near the top, one sentence on what it does, the tech stack and what you personally built. An open-source project needs clearer install steps, a license and, if you want outside help, contributing notes. An internal tool can skip contributing entirely. The prompt asks which type you have and sizes the sections to match.
How long should a README be?
As short as it can be while a stranger can still install and run the project. Badges, long feature lists and architecture essays tend to make readers skim past the part they need. If the README keeps growing, move the detail into docs and link to it. Before committing, paste the file into a Markdown previewer to check the headings and code blocks render cleanly.
Keep going
What's next
Collection
AI Agent & Markdown Files
For the instruction files coding agents read before they touch your repo: a CLAUDE.md that Claude Code actually follows, an AGENTS.md that works across Codex, Cursor and Claude, project rules files, and the build, test and style notes you keep repeating in every chat.
Tool
Markdown Live Preview
Paste markdown or drop a .md file and see it rendered instantly. Nothing leaves your browser.
Prompt
Write an AGENTS.md That Works Across Codex, Cursor and Claude
For when your repo has a CLAUDE.md, a .cursorrules and an AGENTS.md that all say slightly different things, and the agents follow whichever one is out of date. Paste your commands and existing rule files. It merges them into one short AGENTS.md with exact commands first, a clear definition of done and a reason for every rule, adds a CLAUDE.md that imports it, and lists the duplicates it removed and the paths to watch for drift.