Summary
The docs-readme plugin generates and maintains project READMEs by analyzing the codebase, extracting metadata from manifests, and following a consistent structure. This is valuable because writing a good README from scratch is tedious and Claude's default behavior is to generate either too much or too little without a consistent format.
Original Intent
Plugin to maintain a project README file — what purpose it serves, what it needs to communicate, as well as keeping it up-to-date.
Commands
/readme:generate
Purpose: Generate a comprehensive README from project analysis.
Behavior:
-
Analyze the project:
- Read manifest files (
package.json, pyproject.toml, Cargo.toml, go.mod)
- Extract: name, description, version, license, author, repository URL
- Detect tech stack from dependencies and config files
- Find entry points and main exports
- Identify scripts/commands from package.json, Makefile, etc.
- Check for existing docs/, examples/, CONTRIBUTING.md, CHANGELOG.md
-
Detect badge candidates:
| Badge |
Condition |
Source |
| npm version |
package.json exists |
shields.io |
| PyPI version |
pyproject.toml with [project] |
shields.io |
| License |
License file or manifest field |
shields.io |
| CI status |
.github/workflows/ exists |
GitHub Actions |
| Coverage |
Coverage config detected |
Codecov/Coveralls |
| TypeScript |
tsconfig.json exists |
shields.io |
-
Generate README with this structure:
# <Project Name>
<badges>
<One-paragraph description from manifest or inferred from code>
## Features
- <Feature 1 — inferred from main exports/routes/commands>
- <Feature 2>
## Installation
<Package manager command based on project type>
## Quick Start
<Minimal working example based on main entry point>
## Usage
<More detailed usage with code examples>
## API Reference
<If library: document main exports>
<If CLI: document commands and flags>
<If web app: skip or link to docs/>
## Configuration
<Environment variables, config files>
## Development
<How to set up for development, run tests, etc.>
## Contributing
<Link to CONTRIBUTING.md if exists, otherwise brief guide>
## License
<License name + link>
-
Ask user before writing:
- Show generated README preview
- Allow editing each section
- Confirm before writing/overwriting
Edge cases:
- README already exists → offer to regenerate specific sections or fully replace
- Monorepo → generate root README linking to package READMEs
- No manifest files → ask user for project description
- Private/internal project → skip badges, focus on setup instructions
/readme:update (new)
Purpose: Update specific sections of an existing README without regenerating the whole thing.
Behavior:
- Read existing README.md
- Parse into sections (by
## headings)
- Ask user which sections to update:
- For each selected section:
- Regenerate from current project state
- Show diff between old and new
- Apply if user approves
- Preserve all user-written content in non-selected sections
- Output: summary of updated sections
Edge cases:
- Non-standard README structure → best-effort section matching by heading text
- README uses different heading levels → normalize to
## for main sections
- HTML content in README → preserve as-is
Hooks
None — this plugin operates through commands only.
File Manifest
| File |
Est. Lines |
Purpose |
commands/generate.md |
100-120 |
Generate README from scratch |
commands/update.md |
80-100 |
Update specific sections |
README.md |
120-150 |
Full plugin documentation |
.claude-plugin/plugin.json |
15-20 |
Plugin manifest |
README Outline
- Overview — What docs-readme does: structured README generation and maintenance
- Quick Start — Installation +
/readme:generate
- Commands — Table with both commands
- README Template — Full reference of the generated structure with explanations
- Badge Support — Table of auto-detected badges
- Section Reference — What each README section should contain
- Customization — How user-written sections are preserved during updates
Prerequisites
- No external tools required
Quality Checklist
Summary
The
docs-readmeplugin generates and maintains project READMEs by analyzing the codebase, extracting metadata from manifests, and following a consistent structure. This is valuable because writing a good README from scratch is tedious and Claude's default behavior is to generate either too much or too little without a consistent format.Original Intent
Commands
/readme:generatePurpose: Generate a comprehensive README from project analysis.
Behavior:
Analyze the project:
package.json,pyproject.toml,Cargo.toml,go.mod)Detect badge candidates:
package.jsonexistspyproject.tomlwith[project].github/workflows/existstsconfig.jsonexistsGenerate README with this structure:
Ask user before writing:
Edge cases:
/readme:update(new)Purpose: Update specific sections of an existing README without regenerating the whole thing.
Behavior:
##headings)Edge cases:
##for main sectionsHooks
None — this plugin operates through commands only.
File Manifest
commands/generate.mdcommands/update.mdREADME.md.claude-plugin/plugin.jsonREADME Outline
/readme:generatePrerequisites
Quality Checklist