README Generator — ClearDocs Style
You are generating or updating a README.md for the current project using the ClearDocs template structure.
Pre-flight Check
Check if the project has been onboarded by looking for project memory files in Claude's auto memory directory (.claude/projects/.../memory/MEMORY.md). If memory files exist, use them as a primary source for the "About" and "Architecture" sections. If no memory files exist, inform the user:
"This project hasn't been onboarded yet. I'll do my best from the source files, but consider running /onboard first for richer output."
Arguments
$ARGUMENTS may contain any combination of:
| Flag |
Effect |
owner/repo |
GitHub owner/repo string for shields.io URLs (e.g., montymi/mistral-vibe) |
--update |
Only update existing sections, don't overwrite custom content |
--minimal |
Generate minimal README: name, description, install, usage only |
--internal |
Omit Contributing, Contact, License, and badges (for internal/private projects) |
--library |
Add API Reference and Changelog sections |
--no-badges |
Skip shields.io badge bar |
If empty, auto-detect everything and generate the full template.
Step 1: Auto-detect Project Metadata
Gather as much as possible automatically:
- GitHub owner/repo — parse from
$ARGUMENTS, or run git remote get-url origin and extract from the URL
- Project name — from
package.json name, pyproject.toml [project] name, Cargo.toml [package] name, go.mod module path, or the repository directory name
- Description — from
package.json description, pyproject.toml [project] description, or onboard memory
- License — read
LICENSE or LICENSE.md file, or check package.json / pyproject.toml
- Tech stack — detect from:
package.json / package-lock.json / yarn.lock / pnpm-lock.yaml → Node.js ecosystem
pyproject.toml / setup.py / setup.cfg / requirements.txt / Pipfile → Python ecosystem
Cargo.toml → Rust
go.mod → Go
Gemfile → Ruby
pom.xml / build.gradle → Java
- Key dependencies (React, Vue, Django, FastAPI, etc.) from dependency files
- Author — from git config,
package.json, or pyproject.toml. Default to "Michael Montanaro" if undetectable
- Installation method — detect from
Makefile, Dockerfile, lockfiles, setup.py, etc.
- CI provider — detect from
.github/workflows/, Jenkinsfile, .circleci/, .gitlab-ci.yml
- Screenshots/demos — check for images in
docs/, assets/, screenshots/, images/ directories
- Environment variables — check for
.env.example file
- Contributing guide — check for
CONTRIBUTING.md file
- Activity — run
git log --oneline -10 to gauge recent development
Step 2: Read Existing README (if present)
If a README.md already exists:
- Read its full contents
- Identify any custom sections or content not part of the ClearDocs template
- Preserve custom content by integrating it into the appropriate ClearDocs section
- Note what needs updating vs. what should be left alone
Step 3: Determine Sections
Use the section selection table below to decide which sections to include. The goal is to avoid empty/placeholder sections — only include what has real content.
Section Selection Rules
| Section |
Include when |
Omit when |
| Badges |
Default |
--no-badges or --internal or --minimal |
| Header |
Always |
Never |
| TOC |
4+ sections generated |
Fewer than 4 sections, or --minimal |
| About |
Always |
Never |
| Built With |
Dependency files detected |
No dependency files, or --minimal |
| Getting Started |
Always |
--minimal (merge into Usage) |
| Usage |
Always |
Never |
| Structure |
5+ source files |
Fewer than 5 source files, or --minimal |
| API Reference |
--library flag |
Not a library project |
| Changelog |
--library flag |
Not a library project |
| Environment Variables |
.env.example exists |
No .env.example, or --minimal |
| Tasks |
Open TODOs exist |
No TODOs detected, or --minimal |
| Contributing |
LICENSE file exists |
No LICENSE, --internal, or --minimal |
| License |
LICENSE file exists |
No LICENSE file — never generate a placeholder |
| Contact |
Default |
--internal or --minimal |
| Acknowledgments |
Default |
--internal or --minimal |
The TOC must dynamically list only the sections actually included — never reference an omitted section.
Step 4: Generate README.md
If --minimal flag is present:
Use this lightweight template:
# PROJECT_NAME
PROJECT_DESCRIPTION
## Install
[Installation commands]
## Usage
[CLI examples or code snippets]
[One-line license note if LICENSE file exists, e.g., "MIT License"]
Full template (default):
Write the README using this structure. Use OWNER, REPO, PROJECT_NAME, etc. as detected above. All shields.io badge URLs must use reference-style links defined at the bottom of the file.
<!-- Shields bar -->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
<!-- Project header -->
<div align="center">
<h1>PROJECT_NAME</h1>
<p>PROJECT_DESCRIPTION</p>
<a href="https://github.com/OWNER/REPO"><strong>Explore the docs</strong></a>
·
<a href="https://github.com/OWNER/REPO/issues/new?labels=bug">Report Bug</a>
·
<a href="https://github.com/OWNER/REPO/issues/new?labels=enhancement">Request Feature</a>
</div>
<!-- Table of Contents — only list sections that are actually generated -->
<details>
<summary>Table of Contents</summary>
<ol>
<li><a href="#about-the-project">About The Project</a></li>
<!-- dynamically include only generated sections -->
</ol>
</details>
---
## About The Project
[Description from onboard memory, pyproject.toml, or user prompt. 2-4 paragraphs covering what the project does, why it exists, and who it's for.]
## Built With
[Shields.io badges for each major technology detected. Use flat-style badges.]
Example:
[![Python][python-shield]][python-url]
[![React][react-shield]][react-url]
## Getting Started
### Prerequisites
[List runtime requirements detected from the project]
### Installation
[Step-by-step install commands detected from Makefile, lockfiles, setup.py, etc.]
## Usage
[CLI examples, API usage, or code snippets. Pull from onboard memory if available, otherwise provide placeholder with TODO.]
## Structure
[Directory tree or architecture overview. If onboard memory exists, use its architecture summary. Otherwise, generate a high-level tree.]
## Environment Variables
[Generated from `.env.example` — list each variable with its purpose. Only include if `.env.example` exists.]
## API Reference
[Only included with `--library` flag. Document public API with function signatures and brief descriptions.]
## Changelog
[Only included with `--library` flag. Link to CHANGELOG.md if it exists, or provide a starter template.]
## Tasks
- [ ] [Open TODOs from issues or code — placeholder if none detected]
## Contributing
[If CONTRIBUTING.md exists, reference it: "See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines."]
[Otherwise, use the standard boilerplate:]
Contributions make the open source community an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)
3. Commit your Changes (`git commit -m 'Add amazing feature'`)
4. Push to the Branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
Distributed under the [DETECTED_LICENSE] License. See `LICENSE` for more information.
## Contact
AUTHOR_NAME — AUTHOR_LINK
Project Link: [https://github.com/OWNER/REPO](https://github.com/OWNER/REPO)
## Acknowledgments
- []
---
<!-- Reference-style links -->
[contributors-shield]: https://img.shields.io/github/contributors/OWNER/REPO.svg?style=flat
[contributors-url]: https://github.com/OWNER/REPO/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/OWNER/REPO.svg?style=flat
[forks-url]: https://github.com/OWNER/REPO/network/members
[stars-shield]: https://img.shields.io/github/stars/OWNER/REPO.svg?style=flat
[stars-url]: https://github.com/OWNER/REPO/stargazers
[issues-shield]: https://img.shields.io/github/issues/OWNER/REPO.svg?style=flat
[issues-url]: https://github.com/OWNER/REPO/issues
[license-shield]: https://img.shields.io/github/license/OWNER/REPO.svg?style=flat
[license-url]: https://github.com/OWNER/REPO/blob/main/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-blue.svg?style=flat&logo=linkedin
[linkedin-url]: https://linkedin.com/in/LINKEDIN_USERNAME
Smart Content Rules
- CI badges: If
.github/workflows/ exists, add a CI status badge. If Jenkinsfile or .circleci/ exists, note the CI provider in Built With.
- Screenshots: If images are found in
docs/, assets/, screenshots/, or images/, include a Screenshots section or embed them in About.
- CONTRIBUTING.md: If it exists, reference it with a link instead of including boilerplate.
- Environment variables: If
.env.example exists, generate an Environment Variables section documenting each variable.
Badge References for Common Tech
Add these to the reference-style links footer as needed:
[python-shield]: https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white
[python-url]: https://python.org
[javascript-shield]: https://img.shields.io/badge/JavaScript-F7DF1E?style=flat&logo=javascript&logoColor=black
[javascript-url]: https://developer.mozilla.org/en-US/docs/Web/JavaScript
[typescript-shield]: https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white
[typescript-url]: https://typescriptlang.org
[react-shield]: https://img.shields.io/badge/React-61DAFB?style=flat&logo=react&logoColor=black
[react-url]: https://react.dev
[next-shield]: https://img.shields.io/badge/Next.js-000000?style=flat&logo=next.js&logoColor=white
[next-url]: https://nextjs.org
[vue-shield]: https://img.shields.io/badge/Vue.js-4FC08D?style=flat&logo=vue.js&logoColor=white
[vue-url]: https://vuejs.org
[rust-shield]: https://img.shields.io/badge/Rust-000000?style=flat&logo=rust&logoColor=white
[rust-url]: https://rust-lang.org
[go-shield]: https://img.shields.io/badge/Go-00ADD8?style=flat&logo=go&logoColor=white
[go-url]: https://go.dev
[django-shield]: https://img.shields.io/badge/Django-092E20?style=flat&logo=django&logoColor=white
[django-url]: https://djangoproject.com
[fastapi-shield]: https://img.shields.io/badge/FastAPI-009688?style=flat&logo=fastapi&logoColor=white
[fastapi-url]: https://fastapi.tiangolo.com
[node-shield]: https://img.shields.io/badge/Node.js-339933?style=flat&logo=node.js&logoColor=white
[node-url]: https://nodejs.org
[docker-shield]: https://img.shields.io/badge/Docker-2496ED?style=flat&logo=docker&logoColor=white
[docker-url]: https://docker.com
Formatting Rules
- Replace ALL placeholder values (
OWNER, REPO, PROJECT_NAME, etc.) with detected values
- If a value can't be detected, use a sensible placeholder wrapped in
<!-- TODO: ... --> comments
- All shields.io URLs go in the reference-style links footer — never inline
- Use HTML sparingly (only for centering the header and the collapsible TOC)
- Keep the markdown clean and readable in source form
- Ensure all anchor links in the TOC match the actual heading IDs
- Never generate placeholder content for License if no LICENSE file exists — omit the section entirely
1---2name: readme3description: Create or update a README.md following ClearDocs styling principles4---56# README Generator — ClearDocs Style78You are generating or updating a `README.md` for the current project using the ClearDocs template structure.910## Pre-flight Check1112**Check if the project has been onboarded** by looking for project memory files in Claude's auto memory directory (`.claude/projects/.../memory/MEMORY.md`). If memory files exist, use them as a primary source for the "About" and "Architecture" sections. If no memory files exist, inform the user:1314> "This project hasn't been onboarded yet. I'll do my best from the source files, but consider running `/onboard` first for richer output."1516## Arguments1718`$ARGUMENTS` may contain any combination of:1920| Flag | Effect |21|------|--------|22| `owner/repo` | GitHub owner/repo string for shields.io URLs (e.g., `montymi/mistral-vibe`) |23| `--update` | Only update existing sections, don't overwrite custom content |24| `--minimal` | Generate minimal README: name, description, install, usage only |25| `--internal` | Omit Contributing, Contact, License, and badges (for internal/private projects) |26| `--library` | Add API Reference and Changelog sections |27| `--no-badges` | Skip shields.io badge bar |2829If empty, auto-detect everything and generate the full template.3031## Step 1: Auto-detect Project Metadata3233Gather as much as possible automatically:34351. **GitHub owner/repo** — parse from `$ARGUMENTS`, or run `git remote get-url origin` and extract from the URL362. **Project name** — from `package.json` `name`, `pyproject.toml` `[project] name`, `Cargo.toml` `[package] name`, `go.mod` module path, or the repository directory name373. **Description** — from `package.json` `description`, `pyproject.toml` `[project] description`, or onboard memory384. **License** — read `LICENSE` or `LICENSE.md` file, or check `package.json` / `pyproject.toml`395. **Tech stack** — detect from:40 - `package.json` / `package-lock.json` / `yarn.lock` / `pnpm-lock.yaml` → Node.js ecosystem41 - `pyproject.toml` / `setup.py` / `setup.cfg` / `requirements.txt` / `Pipfile` → Python ecosystem42 - `Cargo.toml` → Rust43 - `go.mod` → Go44 - `Gemfile` → Ruby45 - `pom.xml` / `build.gradle` → Java46 - Key dependencies (React, Vue, Django, FastAPI, etc.) from dependency files476. **Author** — from git config, `package.json`, or `pyproject.toml`. Default to "Michael Montanaro" if undetectable487. **Installation method** — detect from `Makefile`, `Dockerfile`, lockfiles, `setup.py`, etc.498. **CI provider** — detect from `.github/workflows/`, `Jenkinsfile`, `.circleci/`, `.gitlab-ci.yml`509. **Screenshots/demos** — check for images in `docs/`, `assets/`, `screenshots/`, `images/` directories5110. **Environment variables** — check for `.env.example` file5211. **Contributing guide** — check for `CONTRIBUTING.md` file5312. **Activity** — run `git log --oneline -10` to gauge recent development5455## Step 2: Read Existing README (if present)5657If a `README.md` already exists:581. Read its full contents592. Identify any custom sections or content not part of the ClearDocs template603. Preserve custom content by integrating it into the appropriate ClearDocs section614. Note what needs updating vs. what should be left alone6263## Step 3: Determine Sections6465Use the section selection table below to decide which sections to include. The goal is to avoid empty/placeholder sections — only include what has real content.6667### Section Selection Rules6869| Section | Include when | Omit when |70|---------|-------------|-----------|71| **Badges** | Default | `--no-badges` or `--internal` or `--minimal` |72| **Header** | Always | Never |73| **TOC** | 4+ sections generated | Fewer than 4 sections, or `--minimal` |74| **About** | Always | Never |75| **Built With** | Dependency files detected | No dependency files, or `--minimal` |76| **Getting Started** | Always | `--minimal` (merge into Usage) |77| **Usage** | Always | Never |78| **Structure** | 5+ source files | Fewer than 5 source files, or `--minimal` |79| **API Reference** | `--library` flag | Not a library project |80| **Changelog** | `--library` flag | Not a library project |81| **Environment Variables** | `.env.example` exists | No `.env.example`, or `--minimal` |82| **Tasks** | Open TODOs exist | No TODOs detected, or `--minimal` |83| **Contributing** | LICENSE file exists | No LICENSE, `--internal`, or `--minimal` |84| **License** | LICENSE file exists | **No LICENSE file — never generate a placeholder** |85| **Contact** | Default | `--internal` or `--minimal` |86| **Acknowledgments** | Default | `--internal` or `--minimal` |8788The **TOC must dynamically list only the sections actually included** — never reference an omitted section.8990## Step 4: Generate README.md9192### If `--minimal` flag is present:9394Use this lightweight template:9596```markdown97# PROJECT_NAME9899PROJECT_DESCRIPTION100101## Install102103[Installation commands]104105## Usage106107[CLI examples or code snippets]108109[One-line license note if LICENSE file exists, e.g., "MIT License"]110```111112### Full template (default):113114Write the README using this structure. Use `OWNER`, `REPO`, `PROJECT_NAME`, etc. as detected above. All shields.io badge URLs must use **reference-style links** defined at the bottom of the file.115116```markdown117<!-- Shields bar -->118[![Contributors][contributors-shield]][contributors-url]119[![Forks][forks-shield]][forks-url]120[![Stargazers][stars-shield]][stars-url]121[![Issues][issues-shield]][issues-url]122[![License][license-shield]][license-url]123[![LinkedIn][linkedin-shield]][linkedin-url]124125<!-- Project header -->126<div align="center">127 <h1>PROJECT_NAME</h1>128 <p>PROJECT_DESCRIPTION</p>129 <a href="https://github.com/OWNER/REPO"><strong>Explore the docs</strong></a>130 ·131 <a href="https://github.com/OWNER/REPO/issues/new?labels=bug">Report Bug</a>132 ·133 <a href="https://github.com/OWNER/REPO/issues/new?labels=enhancement">Request Feature</a>134</div>135136<!-- Table of Contents — only list sections that are actually generated -->137<details>138 <summary>Table of Contents</summary>139 <ol>140 <li><a href="#about-the-project">About The Project</a></li>141 <!-- dynamically include only generated sections -->142 </ol>143</details>144145---146147## About The Project148149[Description from onboard memory, pyproject.toml, or user prompt. 2-4 paragraphs covering what the project does, why it exists, and who it's for.]150151## Built With152153[Shields.io badges for each major technology detected. Use flat-style badges.]154155Example:156[![Python][python-shield]][python-url]157[![React][react-shield]][react-url]158159## Getting Started160161### Prerequisites162163[List runtime requirements detected from the project]164165### Installation166167[Step-by-step install commands detected from Makefile, lockfiles, setup.py, etc.]168169## Usage170171[CLI examples, API usage, or code snippets. Pull from onboard memory if available, otherwise provide placeholder with TODO.]172173## Structure174175[Directory tree or architecture overview. If onboard memory exists, use its architecture summary. Otherwise, generate a high-level tree.]176177## Environment Variables178179[Generated from `.env.example` — list each variable with its purpose. Only include if `.env.example` exists.]180181## API Reference182183[Only included with `--library` flag. Document public API with function signatures and brief descriptions.]184185## Changelog186187[Only included with `--library` flag. Link to CHANGELOG.md if it exists, or provide a starter template.]188189## Tasks190191- [ ] [Open TODOs from issues or code — placeholder if none detected]192193## Contributing194195[If CONTRIBUTING.md exists, reference it: "See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines."]196[Otherwise, use the standard boilerplate:]197198Contributions make the open source community an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.1992001. Fork the Project2012. Create your Feature Branch (`git checkout -b feature/amazing-feature`)2023. Commit your Changes (`git commit -m 'Add amazing feature'`)2034. Push to the Branch (`git push origin feature/amazing-feature`)2045. Open a Pull Request205206## License207208Distributed under the [DETECTED_LICENSE] License. See `LICENSE` for more information.209210## Contact211212AUTHOR_NAME — AUTHOR_LINK213214Project Link: [https://github.com/OWNER/REPO](https://github.com/OWNER/REPO)215216## Acknowledgments217218- []219220---221222<!-- Reference-style links -->223[contributors-shield]: https://img.shields.io/github/contributors/OWNER/REPO.svg?style=flat224[contributors-url]: https://github.com/OWNER/REPO/graphs/contributors225[forks-shield]: https://img.shields.io/github/forks/OWNER/REPO.svg?style=flat226[forks-url]: https://github.com/OWNER/REPO/network/members227[stars-shield]: https://img.shields.io/github/stars/OWNER/REPO.svg?style=flat228[stars-url]: https://github.com/OWNER/REPO/stargazers229[issues-shield]: https://img.shields.io/github/issues/OWNER/REPO.svg?style=flat230[issues-url]: https://github.com/OWNER/REPO/issues231[license-shield]: https://img.shields.io/github/license/OWNER/REPO.svg?style=flat232[license-url]: https://github.com/OWNER/REPO/blob/main/LICENSE233[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-blue.svg?style=flat&logo=linkedin234[linkedin-url]: https://linkedin.com/in/LINKEDIN_USERNAME235```236237### Smart Content Rules238239- **CI badges**: If `.github/workflows/` exists, add a CI status badge. If `Jenkinsfile` or `.circleci/` exists, note the CI provider in Built With.240- **Screenshots**: If images are found in `docs/`, `assets/`, `screenshots/`, or `images/`, include a Screenshots section or embed them in About.241- **CONTRIBUTING.md**: If it exists, reference it with a link instead of including boilerplate.242- **Environment variables**: If `.env.example` exists, generate an Environment Variables section documenting each variable.243244### Badge References for Common Tech245246Add these to the reference-style links footer as needed:247248```249[python-shield]: https://img.shields.io/badge/Python-3776AB?style=flat&logo=python&logoColor=white250[python-url]: https://python.org251[javascript-shield]: https://img.shields.io/badge/JavaScript-F7DF1E?style=flat&logo=javascript&logoColor=black252[javascript-url]: https://developer.mozilla.org/en-US/docs/Web/JavaScript253[typescript-shield]: https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white254[typescript-url]: https://typescriptlang.org255[react-shield]: https://img.shields.io/badge/React-61DAFB?style=flat&logo=react&logoColor=black256[react-url]: https://react.dev257[next-shield]: https://img.shields.io/badge/Next.js-000000?style=flat&logo=next.js&logoColor=white258[next-url]: https://nextjs.org259[vue-shield]: https://img.shields.io/badge/Vue.js-4FC08D?style=flat&logo=vue.js&logoColor=white260[vue-url]: https://vuejs.org261[rust-shield]: https://img.shields.io/badge/Rust-000000?style=flat&logo=rust&logoColor=white262[rust-url]: https://rust-lang.org263[go-shield]: https://img.shields.io/badge/Go-00ADD8?style=flat&logo=go&logoColor=white264[go-url]: https://go.dev265[django-shield]: https://img.shields.io/badge/Django-092E20?style=flat&logo=django&logoColor=white266[django-url]: https://djangoproject.com267[fastapi-shield]: https://img.shields.io/badge/FastAPI-009688?style=flat&logo=fastapi&logoColor=white268[fastapi-url]: https://fastapi.tiangolo.com269[node-shield]: https://img.shields.io/badge/Node.js-339933?style=flat&logo=node.js&logoColor=white270[node-url]: https://nodejs.org271[docker-shield]: https://img.shields.io/badge/Docker-2496ED?style=flat&logo=docker&logoColor=white272[docker-url]: https://docker.com273```274275## Formatting Rules276277- Replace ALL placeholder values (`OWNER`, `REPO`, `PROJECT_NAME`, etc.) with detected values278- If a value can't be detected, use a sensible placeholder wrapped in `<!-- TODO: ... -->` comments279- All shields.io URLs go in the reference-style links footer — never inline280- Use HTML sparingly (only for centering the header and the collapsible TOC)281- Keep the markdown clean and readable in source form282- Ensure all anchor links in the TOC match the actual heading IDs283- **Never generate placeholder content for License if no LICENSE file exists** — omit the section entirely