Sub topic 2
What a README is for and who reads it
This chapter assumes you can browse a GitHub repository, commit a change to a file, and edit plain text. You also need to know what install and usage steps are for a software project. It covers the purpose of a README and its readers. Later chapters cover the syntax.
What a README does
A README is a text file at the top of a project that explains what the project is and how to use it. GitHub shows it below the file list on the repository's front page. For most visitors it is the only documentation they read before deciding what to do next.
A good README answers four questions in order:
- What is this project?
- Why would I use it?
- How do I install and run it?
- Where do I go for help or to contribute?
Who reads it
Different readers arrive with different goals. Write for all of them, but put the material for the largest group first.
| Reader | What they want | Where they stop reading |
|---|---|---|
| Evaluator | To decide if the project solves their problem | After the description and a short example |
| New user | To install it and get a first result | After the usage section |
| Contributor | To build, test, and submit changes | After the contributing section |
| Maintainer | To remember how things work | Anywhere, often months later |
Evaluators are the largest group and give up fastest. If the first screen does not say what the project does, they leave.
What belongs in it, and what does not
Keep the README short enough to scan. It should hold what every reader needs and link to the rest.
- Include a one-sentence description, install steps, a minimal working example, and a link to the license.
- Link out for long API references, design notes, and change history. Put them in other files or a docs folder.
- Do not describe internal details that change often. Out-of-date instructions are worse than missing ones, because readers trust them.
A common mistake is to write the README for yourself. You know the project, so you skip the context a stranger needs. Test this by asking someone who has never seen the project to follow your install steps and note where they get stuck.
A quick check
A README also serves tools. GitHub uses it as the repository's landing page, and package registries often reuse it as the package page. Plain, self-contained content works in both places, so avoid relying on context that exists only in your repository.
Exercise
A visitor lands on your repository and has about ten seconds. Which two parts of the README matter most for them, and why?
Show answer
The title with its one-sentence description, and a short usage example. Together they let an evaluator decide whether the project fits their need. Install details and contributing notes matter only after that decision.