Expert in creating comprehensive, well-structured README files with proper formatting, sections, badges, and documentation best practices.
README Template
# Project Name
[](https://github.com/owner/repo/actions)
[](https://www.npmjs.com/package/package-name)
[](https://opensource.org/licenses/MIT)
[](https://codecov.io/gh/owner/repo)
> Brief, compelling description of what the project does and why it's useful.
## Features
- ✅ Feature one with brief explanation
- ✅ Feature two with brief explanation
- ✅ Feature three with brief explanation
- 🚧 Upcoming feature (in development)
Quick Start
```bash
Installnpm install package-name
Runnpx package-name init ```
Installation
Prerequisites
- Node.js 18+
- npm 9+ or yarn 1.22+
npm
```bash npm install package-name ```
yarn
```bash yarn add package-name ```
pnpm
```bash pnpm add package-name ```
Usage
Basic Example
```javascript import { Client } from 'package-name';
const client = new Client({ apiKey: process.env.API_KEY });
const result = await client.doSomething({ input: 'Hello, World!' });
console.log(result); ```
Advanced Configuration
```javascript const client = new Client({ apiKey: process.env.API_KEY, timeout: 30000, retries: 3, debug: process.env.NODE_ENV === 'development' }); ```
API Reference
Client(options)
Creates a new client instance.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string |
Yes | - | Your API key |
timeout |
number |
No | 10000 |
Request timeout in ms |
retries |
number |
No | 0 |
Number of retry attempts |
client.doSomething(params)
Performs the main operation.
Parameters:
input(string, required): The input to processoptions(object, optional): Additional options
Returns: Promise<Result>
Example:
```javascript const result = await client.doSomething({ input: 'test', options: { format: 'json' } }); ```
Configuration
Create a config.json file in your project root:
```json { "apiKey": "${API_KEY}", "environment": "production", "features": { "caching": true, "logging": false } } ```
Environment Variables
| Variable | Description | Required |
|---|---|---|
API_KEY |
Your API key | Yes |
DEBUG |
Enable debug mode | No |
LOG_LEVEL |
Logging level (info, warn, error) | No |
Examples
See the examples directory for more detailed examples:
Troubleshooting
Common Issues
"Authentication failed" error
Ensure your API key is valid and has the required permissions.
```bash
Verify your API keycurl -H "Authorization: Bearer $API_KEY" https://api.example.com/verify ```
"Module not found" error
Make sure you have installed all dependencies:
```bash rm -rf node_modules package-lock.json npm install ```
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development
```bash
Clone the repogit clone https://github.com/owner/repo.git cd repo
Install dependenciesnpm install
Run testsnpm test
Run in development modenpm run dev ```
Changelog
See CHANGELOG.md for a list of changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Library Name - For providing X functionality
- Person Name - For their contributions
Made with ❤️ by Your Name
## Badge Reference
```yaml
badges:
build_status:
github_actions: "[](URL)"
travis: "[](URL)"
circleci: "[](URL)"
package_version:
npm: "[](URL)"
pypi: "[](URL)"
gem: "[](URL)"
coverage:
codecov: "[](URL)"
coveralls: "[](URL)"
license:
mit: "[](https://opensource.org/licenses/MIT)"
apache: "[](https://opensource.org/licenses/Apache-2.0)"
gpl: "[](https://www.gnu.org/licenses/gpl-3.0)"
downloads:
npm: "[](URL)"
pypi: "[](URL)"
quality:
codacy: "[](URL)"
code_climate: "[](URL)"
social:
stars: "[](URL)"
forks: "[](URL)"
watchers: "[](URL)"
Section Guidelines
essential_sections:
title_and_badges:
purpose: "Immediate project identification"
elements:
- "Project name (H1)"
- "Key status badges"
- "One-line description"
features:
purpose: "Highlight key capabilities"
format: "Bullet list with checkmarks"
length: "5-8 items maximum"
quick_start:
purpose: "Fastest path to running code"
requirements:
- "Copy-pasteable commands"
- "Under 5 steps"
- "Working example"
installation:
purpose: "Complete setup instructions"
include:
- "Prerequisites with versions"
- "Multiple package managers"
- "Platform-specific notes"
usage:
purpose: "Demonstrate core functionality"
include:
- "Basic example"
- "Advanced configuration"
- "Real-world use case"
api_reference:
purpose: "Complete function documentation"
format:
- "Function signature"
- "Parameter table"
- "Return type"
- "Code example"
optional_sections:
- "Architecture diagram"
- "Benchmarks/Performance"
- "FAQ"
- "Roadmap"
- "Security policy"
- "Code of conduct"
Writing Guidelines
tone:
- "Clear and concise"
- "Action-oriented"
- "Beginner-friendly"
- "Scannable"
structure:
headings: "Use H2 for main sections, H3 for subsections"
lists: "Prefer bullet points over paragraphs"
code: "Always include language identifier"
tables: "Use for structured data (parameters, options)"
code_blocks:
requirements:
- "Always specify language"
- "Include necessary imports"
- "Show expected output when helpful"
- "Use realistic values, not 'foo/bar'"
example:
good: |
```javascript
import { Client } from 'my-package';
const client = new Client({ apiKey: process.env.API_KEY });
const result = await client.search('nodejs tutorials');
console.log(result.items);
```
bad: |
```
const x = new X();
x.foo();
```
anti_patterns:
- "Wall of text without headings"
- "Missing installation instructions"
- "Outdated badges or broken links"
- "Code examples that don't work"
- "Assuming reader knowledge"
- "Missing license information"
Project Type Templates
templates:
library:
sections:
- "Title + Badges"
- "Features"
- "Installation"
- "Quick Start"
- "API Reference"
- "Examples"
- "Contributing"
- "License"
cli_tool:
sections:
- "Title + Badges"
- "Features"
- "Installation"
- "Usage (with commands)"
- "Configuration"
- "Examples"
- "Contributing"
- "License"
api_service:
sections:
- "Title + Badges"
- "Features"
- "Getting Started"
- "Authentication"
- "API Reference"
- "Rate Limits"
- "Error Handling"
- "SDKs"
- "Support"
framework:
sections:
- "Title + Badges"
- "Why This Framework"
- "Features"
- "Quick Start"
- "Documentation"
- "Examples"
- "Ecosystem"
- "Migration Guide"
- "Contributing"
- "License"
Visual Elements
diagrams:
architecture: |
```
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Client │────▶│ Server │────▶│ Database │
└─────────────┘ └─────────────┘ └─────────────┘
```
flow: |
```
Input ──▶ Validate ──▶ Process ──▶ Output
│
▼
Error
```
tables:
comparison: |
| Feature | This Project | Alternative A | Alternative B |
|---------|--------------|---------------|---------------|
| Speed | ⚡ Fast | 🐢 Slow | 🚀 Fastest |
| Size | 📦 Small | 📦 Medium | 📦 Large |
features: |
| Feature | Free | Pro | Enterprise |
|---------|:----:|:---:|:----------:|
| Basic | ✅ | ✅ | ✅ |
| Advanced| ❌ | ✅ | ✅ |
| Support | ❌ | ❌ | ✅ |
Checklist
validation_checklist:
structure:
- "[ ] Title and description present"
- "[ ] Badges are current and working"
- "[ ] Installation instructions complete"
- "[ ] Quick start works on fresh clone"
- "[ ] API documentation accurate"
- "[ ] License file present"
quality:
- "[ ] No broken links"
- "[ ] Code examples tested and working"
- "[ ] Screenshots/GIFs current"
- "[ ] No typos or grammar issues"
- "[ ] Consistent formatting"
accessibility:
- "[ ] Alt text for images"
- "[ ] Proper heading hierarchy"
- "[ ] Code blocks have language specified"
- "[ ] Tables have headers"
Best practices
- Start with Quick Start — users want results quickly
- Show, don't tell — code matters more than explanations
- Keep it current — update with every release
- Test everything — all examples must work
- Use badges wisely — only relevant, working ones
- Structure for scanning — headings, lists, tables