agentleFS
leroyguillaumeleroyguillaume/skills/readme-conventions/SKILL.md

readme-conventions

Skill7 starsChanged 4 days agoMITView on GitHub

README.md: what goes in it and how it is structured. TRIGGER when: creating or editing any `README.md`; adding a `LICENSE` or a logo; scaffolding a project; a change alters install, config, run or deploy steps; user asks what belongs in the README. SKIP when: editing `CONTRIBUTING.md` (`contributing-conventions`), `ARCHITECTURE.md` rationale (`architecture-conventions`), or non-README docs under `docs/` (`documentation-conventions`).

  • Pipes a download into a shell
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every README has these blocks, in this order — The need section only in the root README of a CLI, the License section only when the project …

    line 24
  2. Very specific:

    Not here: architecture diagrams, design trade-offs, tech-stack justification, benchmarks.

    line 70
  3. Distinctive:

    Write it from the user's seat, in the present tense:

    line 108
  4. Distinctive:

    Never put a real secret value in that table — placeholders only.

    line 159
  5. Very specific:

    Never omit --version, since that makes the command install whatever is newest the day someone reads it.

    line 172
  6. Distinctive:

    Every command must actually work as written, from a fresh clone, in that order.

    line 177
  7. Distinctive:

    "Linux" is not one distro: When you must use a system package manager, either pick the one the project's own CI/container base image uses …

    line 216
  8. Distinctive:

    Never invent a package name: Verify the package exists under that name on that platform, or link upstream's install page instead.

    line 220
  9. Distinctive:

    Do not restate the workflow in the README.

    line 235
  10. Very specific:

    Ask once per project: Never re-open the licence question on a repo where the user has already settled it, and never treat a missing LICENSE …

    line 270

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

README conventions

A README.md answers exactly one question: "I just landed here — what is this and how do I run it?" Anything that doesn't serve that question belongs somewhere else (ARCHITECTURE.md for the why, CONTRIBUTING.md for the how do I help, docs/ for depth).

In English, like every document (documentation-conventions).

Mandatory structure

Every README has these blocks, in this order — The need section only in the root README of a CLI, the License section only when the project has a licence (see below). Nothing else is required; add a section only when it earns its place.

# <project-name>

<One or two sentences: what this is and what it does.>

## Description

<A few short paragraphs — see below.>

## The need

<CLI projects only — see below.>

## Getting started

### Prerequisites
### Installation
### Configuration
### Usage

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md).

## License

<SPDX name> — see [LICENSE](LICENSE).

1. Description

Three to ten lines. A reader must be able to decide, from this block alone, whether the project is what they're looking for.

  • What it is — the one-liner, in plain words. A Kubernetes operator that rotates database credentials, not A cloud-native solution leveraging….
  • What problem it solves — the itch it scratches, one sentence.
  • What it is not, when there's an obvious confusion to head off ("it does not manage the databases themselves").
  • Key features as a short bullet list, only if it genuinely clarifies scope.

Not here: architecture diagrams, design trade-offs, tech-stack justification, benchmarks. Those go in ARCHITECTURE.md (see architecture-conventions), linked from the end of the description. (And when one is drawn there, it is Mermaid — see diagram-conventions.)

See [ARCHITECTURE.md](ARCHITECTURE.md) for the design and the reasoning behind it.

Badges (CI status, licence, version, OpenSSF Scorecard and Best Practices) go on a single line under the title, or not at all. A wall of badges is decoration, not documentation.

A project with a logo shows it in the README, at the very top, above the # <project-name> heading. Point at the file in the repo with a relative path, give it alt text, and bound its width — Markdown image syntax cannot, so use an <img> tag:

<p align="center">
  <img src="logo.svg" alt="<project-name> logo" width="200">
</p>

The logo sits above the title, never in place of it: the # heading stays, so the page keeps a text title and its anchor. The file is an SVG; a raster logo is redrawn first, per logo-conventions. No logo in the repo → no image; never invent or hotlink one.

2. The need — CLI projects

The root README of a project whose deliverable is a command-line tool has a ## The need section, between Description and Getting started. A CLI competes with a shell one-liner, a script in somebody's dotfiles, or doing the thing by hand: the reader has to recognise their own situation before the install steps are worth their time.

Write it from the user's seat, in the present tense:

  • The situation — who runs into this, doing what: rotating a credential across a dozen clusters, bumping a chart version in every app of a GitOps repository.
  • What it takes without the tool — the manual steps, the throwaway script, the console clicks, and what goes wrong with them: slow, error-prone, not repeatable, not reviewable.
  • What the CLI changes — the same task as one command, and what that buys (dry run, idempotence, runs in CI). One invocation can make the point; the full usage stays in Getting started.

A few short paragraphs or a short list. It expands the Description's one-sentence "what problem it solves" without repeating it. Not here: a feature catalogue, the design or why it is built that way (ARCHITECTURE.md), or an origin story — "we got tired of…" is history, and the section describes the need as it stands (documentation-conventions).

Root README only, and only for a CLI: a sub-README, a library, a service or a chart makes do with the Description's sentence.

3. Getting started

The core of the file. A newcomer must be able to copy-paste their way from zero to a running project without leaving this section.

With a documentation site (starlight-conventions), the site is the home of every fact: Getting started stops at the first working run, and the configuration table and full usage live on the site, linked from here.

  • One command per fenced block, tagged with its language, so each is copy-pasteable on its own — no $ prompt, no interleaved output.
  • Prerequisites first, with versions when they matter: Python ≥ 3.13, uv, Docker ≥ 25, kubectl + a cluster. State only what's actually required to follow the steps below.
  • Every install command covers macOS and Linux — see below.
  • Installation — clone + install, or the package-manager one-liner. Derive the clone URL from git config --get remote.origin.url (see project-metadata-conventions), never invent it. A downloaded release artifact is followed by the command that verifies its attestation (release-supply-chain-conventions).
  • Configuration — a table of environment variables, with defaults and whether they're required:

    | Variable | Required | Default | Description |
    | --- | --- | --- | --- |
    | `DATABASE_URL` | yes | — | PostgreSQL connection string |
    | `BIND_ADDR` | no | `0.0.0.0:8080` | Address the HTTP server listens on |

    Never put a real secret value in that table — placeholders only.

  • Usage — the shortest path to the thing actually working, and a couple of the most common invocations after it. If the project is a library, show a minimal code example instead.
  • Deployment, when it applies — how to build the image / apply the chart / run the terraform, commands only. A published chart is installed from its registry with an explicit --version set to the latest stable chart release:

    helm install <release> oci://<registry>/charts/<chart> --version 1.4.0

    Never omit --version, since that makes the command install whatever is newest the day someone reads it. Never write a placeholder either. The number is kept in step by the release script (release-script-conventions), not by hand.

Every command must actually work as written, from a fresh clone, in that order. Run them if you can; a README that lies is worse than no README.

Install commands: macOS and Linux, always

Never ship a brew install line on its own. A macOS-only instruction is not a shorter README, it is a README that stops working for every contributor on Linux — and for CI, containers and dev boxes, which are Linux essentially always. The reader on the wrong platform is left translating package names, which is exactly the twenty minutes the section exists to save.

So every install step gives both, each in its own fenced block under a bold label naming the platform:

**macOS**

```sh
brew install jq shellcheck
```

**Linux**

```sh
sudo apt install -y jq shellcheck
```

Both of those genuinely exist under that name on both platforms, which is the bar — see the third rule below.

Three rules on top of that:

  • Prefer a single distro-neutral command when the tool ships one, and give it once instead of a per-platform pair — uv tool install <x>, cargo install <x>, pipx install <x>, go install, the project's own curl … | sh installer, or a versioned release tarball. Those work on both platforms and pin a version, which a distro package rarely does. Reach for brew/apt only when there is no such option.
  • "Linux" is not one distro. When you must use a system package manager, either pick the one the project's own CI/container base image uses and say so, or give the tool's upstream installation URL rather than guessing at three package managers. A wrong dnf line is worse than a link.
  • Never invent a package name. Verify the package exists under that name on that platform, or link upstream's install page instead. brew install jsonnet and apt install jsonnet do not always install the same implementation — say which one is required (go-jsonnet) when it matters.

The same applies to anything else that is platform-shaped: a shell profile path, a config directory (~/Library/… vs ~/.config/…), a service manager invocation. If the instruction differs between the two, both spellings are given or neither is.

4. Contributing and licence

Two short sections at the bottom, each a link, not a copy:

  • Contributing — one line pointing at CONTRIBUTING.md. Do not restate the workflow in the README; one home per fact.
  • License — the SPDX identifier or full name, then a link to the LICENSE file. Never paste the licence text into the README. Omit the section entirely on a deliberately unlicensed project (an internal or proprietary repo): a ## License heading with nothing real under it is worse than no heading. See below.

Links

Relative inside the repo, an https:// URL outside it. Check anchors (README.md#getting-started) still resolve after a heading moves.

CONTRIBUTING.md and LICENSE must exist

A dangling link is worse than a missing section. If the README links them, the files exist.

  • CONTRIBUTING.md missing → propose it and wait for a yes; once approved it is its own change, per contributing-conventions. Until it exists, leave the README's Contributing section out.
  • LICENSE missing → ask which licence, then write it. Picking a licence is the user's call and nobody else's: never choose one unilaterally, never drop in an MIT file "as a sensible default". Ask for the copyright holder in the same question — the committer is not necessarily the owner (see project-metadata-conventions) — then write the full official text with that holder and the year. Until the user answers, leave the README's licence section out rather than pointing at a file that doesn't exist.
  • "No licence" is a legitimate answer, and the common one on an internal repository. A private repo on a company forge is proprietary by default; adding a LICENSE to one is a legal statement nobody asked for. When the user says the project is internal or proprietary, the correct outcome is a README with no License section, no LICENSE file, and no license field in the manifest — not a placeholder, not an "All rights reserved" file invented for the occasion. Record the answer and stop raising it.
  • Ask once per project. Never re-open the licence question on a repo where the user has already settled it, and never treat a missing LICENSE as a finding on a repo that is deliberately unlicensed.
  • Mirror the licence in the project manifest when there is one (license in pyproject.toml / Cargo.toml / package.json, Chart.yaml annotations) so the two never disagree.

Sub-READMEs

A README.md in a subdirectory (a chart, a module, a sub-package) follows the same shape, scoped to that component: what it is, how to use it, and a link back to the root README. No need, contributing or licence sections — those live once, at the root. Generated content belongs in these files, and is never hand-edited where the generator writes: terraform-docs fills the block between its marker comments, while helm-docs regenerates the whole README.md from README.md.gotmpl — edit the template, never the output.

Keeping it honest

  • Update the README in the same change as the code it describes. A new environment variable, a renamed command, a changed default — same change.
  • Length is a smell. Past the size documentation-conventions sets, the why has usually crept in: move it to ARCHITECTURE.md (see architecture-conventions) and link.
  • Never duplicate a section across README.md, ARCHITECTURE.md and CONTRIBUTING.md. One home per fact, links from the others.
  • Running the tests belongs in CONTRIBUTING.md, not here — a user runs the project, a contributor runs its test suite. Same for linting and every other dev-loop command (see contributing-conventions).
  • The test for anything ambiguous: if deleting it would not stop someone from installing, running or deploying the project, it does not belong in the README. The need section is the one exception: it is what tells a reader whether the CLI is worth installing at all.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.