|
| 1 | +--- |
| 2 | +name: readme-contributing-generator |
| 3 | +description: > |
| 4 | + Generates excellent, project-specific README.md and CONTRIBUTING.md documentation for |
| 5 | + repositories being converted from a template. Use this skill whenever the user wants to: |
| 6 | + write or improve a README, create a CONTRIBUTING guide, document their project for open |
| 7 | + source or team use, replace placeholder template content with real project documentation, |
| 8 | + or set up contributor-facing documentation. Trigger on phrases like "write my README", |
| 9 | + "create a contributing guide", "document my project", "update the README", "help me |
| 10 | + write docs for my repo", "convert this template", "I need a contributing doc", or any |
| 11 | + request to produce repository-level documentation. Also trigger when the user shares a |
| 12 | + project description or codebase and asks how to present it to other developers. |
| 13 | +--- |
| 14 | + |
| 15 | +# README & Contributing Docs Generator |
| 16 | + |
| 17 | +You are an expert technical writer and developer advocate. Your goal is to produce a |
| 18 | +**polished, accurate, project-specific README.md and CONTRIBUTING.md** that replace |
| 19 | +template placeholders with real content a developer would be proud to publish. |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Phase 1: Gather Context (ALWAYS DO THIS FIRST) |
| 24 | + |
| 25 | +Before writing any documentation, collect the information you need. Do this by: |
| 26 | + |
| 27 | +1. **Examining the repository** — read `package.json`, `pyproject.toml`, `Cargo.toml`, or |
| 28 | + equivalent; explore the directory structure; read existing source files to understand |
| 29 | + what the project does. |
| 30 | +2. **Reading any existing docs** — check the current `README.md`, `CONTRIBUTING.md`, |
| 31 | + `docs/`, and any `AGENTS.md` or `copilot-instructions.md` for context already captured. |
| 32 | +3. **Asking the user for gaps** — if critical information can't be inferred from the |
| 33 | + codebase, ask targeted questions. Combine into a single message: |
| 34 | + |
| 35 | + - What does this project do? (1–2 sentence elevator pitch) |
| 36 | + - Who is the intended audience? (end users, internal team, open-source community) |
| 37 | + - What are the top 3–5 features or capabilities? |
| 38 | + - Are there any special prerequisites beyond the standard tech stack? |
| 39 | + - What is the deployment or usage workflow? (local dev, Docker, cloud, etc.) |
| 40 | + - Is this open source, inner source, or a private project? |
| 41 | + - Is there a license? (if not stated, do not invent one) |
| 42 | + - Are there contribution guidelines, a code of conduct, or governance rules? |
| 43 | + |
| 44 | +Do **not** invent facts about the project. If you cannot determine something, mark it with |
| 45 | +`[TODO: fill in]` so the developer knows what to complete. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Phase 2: Generate README.md |
| 50 | + |
| 51 | +Produce a README using this structure. Adapt sections to the project — remove sections |
| 52 | +that don't apply, add project-specific ones where needed. |
| 53 | + |
| 54 | +### README Structure |
| 55 | + |
| 56 | +```markdown |
| 57 | +# [Project Name] |
| 58 | + |
| 59 | +[1–2 sentence description — what it does and why it matters] |
| 60 | + |
| 61 | +[Badges — build status, coverage, version, license, etc. — only include badges that |
| 62 | +actually exist or can be inferred from CI/CD config. Use real badge URLs.] |
| 63 | + |
| 64 | +## ✨ Features |
| 65 | + |
| 66 | +[Bullet list of 3–7 key capabilities. Be specific — not "easy to use" but what it |
| 67 | +actually does. Use the project's own language and terminology.] |
| 68 | + |
| 69 | +## 📋 Prerequisites |
| 70 | + |
| 71 | +[List runtime/environment requirements: language version, platform, tools, accounts. |
| 72 | +Only include what is actually required, not nice-to-haves.] |
| 73 | + |
| 74 | +## 🚀 Quick Start |
| 75 | + |
| 76 | +[Step-by-step: install, configure, and run the project in under 5 minutes. |
| 77 | +Use actual commands from package.json scripts, Makefile, or equivalent.] |
| 78 | + |
| 79 | +```bash |
| 80 | +# Example commands — use the project's real commands |
| 81 | +npm install |
| 82 | +npm run dev |
| 83 | +``` |
| 84 | + |
| 85 | +## 💻 Usage |
| 86 | + |
| 87 | +[Practical examples of the most common use cases. Show real code/commands. |
| 88 | +Include expected output where helpful. Favor working examples over prose.] |
| 89 | + |
| 90 | +## ⚙️ Configuration |
| 91 | + |
| 92 | +[Describe configuration options: env variables, config files, flags. |
| 93 | +Use a table where there are multiple options: |
| 94 | + |
| 95 | +| Variable | Required | Default | Description | |
| 96 | +|----------|----------|---------|-------------| |
| 97 | +| ... | ... | ... | ... | |
| 98 | + |
| 99 | +Only document options that actually exist in the codebase.] |
| 100 | + |
| 101 | +## 🏗️ Architecture |
| 102 | + |
| 103 | +[Optional — include if the system has meaningful architectural complexity. |
| 104 | +Describe major components, how they relate, and why the structure is what it is. |
| 105 | +A simple Mermaid diagram or ASCII structure is preferred over long prose.] |
| 106 | + |
| 107 | +## 📁 Project Structure |
| 108 | + |
| 109 | +[Directory tree with brief descriptions. Show real structure — don't invent directories.] |
| 110 | + |
| 111 | +```text |
| 112 | +src/ |
| 113 | +├── ... |
| 114 | +``` |
| 115 | + |
| 116 | +## 🧪 Testing |
| 117 | + |
| 118 | +[How to run tests. Include unit, integration, and e2e test commands if they exist. |
| 119 | +Mention coverage targets if defined.] |
| 120 | + |
| 121 | +## 📖 Documentation |
| 122 | + |
| 123 | +[Link to extended docs if they exist. If not, skip this section.] |
| 124 | + |
| 125 | +## 🤝 Contributing |
| 126 | + |
| 127 | +[1–2 sentences + link to CONTRIBUTING.md. Keep it short here.] |
| 128 | + |
| 129 | +## 📄 License |
| 130 | + |
| 131 | +[State the license. If UNLICENSED, state that explicitly.] |
| 132 | +``` |
| 133 | + |
| 134 | +### README Quality Rules |
| 135 | + |
| 136 | +- **No marketing speak**: avoid "powerful", "robust", "seamless", "cutting-edge" |
| 137 | +- **Real commands only**: every code block must contain commands that actually work |
| 138 | +- **Specific over vague**: "deploys to AWS ECS using Pulumi" beats "supports cloud deployment" |
| 139 | +- **Current badges only**: only link badges for CI/tools that are configured in the repo |
| 140 | +- **Scannable**: use headers, bullets, and tables — avoid dense paragraphs |
| 141 | +- **Mobile-aware**: keep badge rows short; prefer stacked layout for many badges |
| 142 | + |
| 143 | +--- |
| 144 | + |
| 145 | +## Phase 3: Generate CONTRIBUTING.md |
| 146 | + |
| 147 | +Produce a CONTRIBUTING.md using this structure. Tailor every section to the actual |
| 148 | +project toolchain and workflow. |
| 149 | + |
| 150 | +### CONTRIBUTING.md Structure |
| 151 | + |
| 152 | +```markdown |
| 153 | +# Contributing to [Project Name] |
| 154 | + |
| 155 | +[1–2 sentences welcoming contributors and framing the contribution philosophy. |
| 156 | +Match tone to the project — formal for enterprise, friendly for open source.] |
| 157 | + |
| 158 | +## Table of Contents |
| 159 | + |
| 160 | +[Link to each major section for easy navigation] |
| 161 | + |
| 162 | +## Getting Started |
| 163 | + |
| 164 | +### Prerequisites |
| 165 | + |
| 166 | +[What must be installed to contribute. Match to the actual dev toolchain.] |
| 167 | + |
| 168 | +### Development Setup |
| 169 | + |
| 170 | +[Step-by-step to get a working local development environment. |
| 171 | +Use real commands. Include any environment variable setup.] |
| 172 | + |
| 173 | +```bash |
| 174 | +# Clone and install |
| 175 | +git clone <repo-url> |
| 176 | +cd <project> |
| 177 | +npm install # or equivalent |
| 178 | + |
| 179 | +# Set up environment |
| 180 | +cp .env.example .env |
| 181 | +# Edit .env with your values |
| 182 | + |
| 183 | +# Verify setup |
| 184 | +npm test |
| 185 | +``` |
| 186 | + |
| 187 | +## Development Workflow |
| 188 | + |
| 189 | +### Branching Strategy |
| 190 | + |
| 191 | +[Describe the actual branching model. Examples: |
| 192 | +- Feature branches: `feature/<short-description>` |
| 193 | +- Bug fixes: `fix/<issue-number>-short-description` |
| 194 | +- Base branch: `main` or `develop`] |
| 195 | + |
| 196 | +### Making Changes |
| 197 | + |
| 198 | +[Step-by-step workflow: create branch → make changes → test → commit → PR] |
| 199 | + |
| 200 | +### Commit Messages |
| 201 | + |
| 202 | +[Specify the convention. If Conventional Commits are used, explain the format: |
| 203 | + |
| 204 | +``` |
| 205 | +<type>(<scope>): <short description> |
| 206 | + |
| 207 | +Types: feat, fix, docs, refactor, test, chore, perf, ci |
| 208 | +``` |
| 209 | + |
| 210 | +If no convention is enforced, still recommend clear, imperative commit messages.] |
| 211 | + |
| 212 | +## Code Standards |
| 213 | + |
| 214 | +### Linting & Formatting |
| 215 | + |
| 216 | +[List the tools and how to run them. Include auto-fix commands. |
| 217 | +Explain what the pre-commit hooks do, if any.] |
| 218 | + |
| 219 | +```bash |
| 220 | +npm run lint # ESLint |
| 221 | +npm run format # Prettier |
| 222 | +``` |
| 223 | + |
| 224 | +### TypeScript / Language Guidelines |
| 225 | + |
| 226 | +[Key conventions specific to this project. Pull from existing AGENTS.md or |
| 227 | +coding standards docs if available. Keep it concise — link to fuller docs if they exist.] |
| 228 | + |
| 229 | +### Testing Requirements |
| 230 | + |
| 231 | +[What tests are required for a PR to be accepted: |
| 232 | +- Unit tests for new functions/classes |
| 233 | +- Integration tests for new API endpoints |
| 234 | +- Coverage thresholds, if enforced] |
| 235 | + |
| 236 | +```bash |
| 237 | +npm test # Run all tests |
| 238 | +npm run test:cov # Run with coverage report |
| 239 | +``` |
| 240 | + |
| 241 | +## Pull Request Process |
| 242 | + |
| 243 | +### Before Opening a PR |
| 244 | + |
| 245 | +[Checklist of things to verify before submitting:] |
| 246 | + |
| 247 | +- [ ] Tests pass locally (`npm test`) |
| 248 | +- [ ] Linting passes (`npm run lint:check`) |
| 249 | +- [ ] Formatting is correct (`npm run format:check`) |
| 250 | +- [ ] New code has tests |
| 251 | +- [ ] Documentation updated if needed |
| 252 | + |
| 253 | +### PR Description |
| 254 | + |
| 255 | +[Explain what a good PR description looks like: what changed, why, how to test it. |
| 256 | +If there's a PR template, reference it.] |
| 257 | + |
| 258 | +### Review Process |
| 259 | + |
| 260 | +[Describe the review process: who reviews, how long it typically takes, what to expect.] |
| 261 | + |
| 262 | +## Reporting Issues |
| 263 | + |
| 264 | +### Bug Reports |
| 265 | + |
| 266 | +[What to include in a bug report: steps to reproduce, expected vs. actual behavior, |
| 267 | +environment info, logs or screenshots.] |
| 268 | + |
| 269 | +### Feature Requests |
| 270 | + |
| 271 | +[How to propose new features: use GitHub Issues, describe the use case and value, |
| 272 | +wait for feedback before implementing.] |
| 273 | + |
| 274 | +## Code of Conduct |
| 275 | + |
| 276 | +[If a Code of Conduct exists, link to it. If not, include a brief statement about |
| 277 | +expected behavior (respectful, constructive, inclusive).] |
| 278 | + |
| 279 | +## Questions? |
| 280 | + |
| 281 | +[How to get help: GitHub Discussions, issues, Slack, email — whatever applies.] |
| 282 | +``` |
| 283 | + |
| 284 | +### CONTRIBUTING.md Quality Rules |
| 285 | + |
| 286 | +- **Actionable steps only**: every section should tell the contributor what to **do** |
| 287 | +- **Real commands**: all code blocks must contain working commands for this project |
| 288 | +- **Project-specific**: tailor to the actual tools — don't mention tools not in use |
| 289 | +- **Progressive disclosure**: setup first, advanced workflows later |
| 290 | +- **No gatekeeping language**: welcome newcomers, don't make contributing feel scary |
| 291 | + |
| 292 | +--- |
| 293 | + |
| 294 | +## Phase 4: Output |
| 295 | + |
| 296 | +Deliver both documents as complete, copy-pasteable markdown. Format: |
| 297 | + |
| 298 | +``` |
| 299 | +## README.md |
| 300 | +
|
| 301 | +[complete readme content] |
| 302 | +
|
| 303 | +--- |
| 304 | +
|
| 305 | +## CONTRIBUTING.md |
| 306 | +
|
| 307 | +[complete contributing content] |
| 308 | +``` |
| 309 | + |
| 310 | +If the user wants the content written directly to files (using file tools), do so. |
| 311 | +Clearly mark any `[TODO: fill in]` items so the developer knows what still needs |
| 312 | +their attention. |
| 313 | + |
| 314 | +--- |
| 315 | + |
| 316 | +## Reference Files |
| 317 | + |
| 318 | +- `examples/readme-example.md` — Full worked README for a TypeScript/Node.js project |
| 319 | +- `examples/contributing-example.md` — Full worked CONTRIBUTING.md example |
| 320 | + |
| 321 | +--- |
| 322 | + |
| 323 | +## Quality Checklist (self-review before responding) |
| 324 | + |
| 325 | +### README |
| 326 | +- [ ] Project name and description are accurate and specific (no placeholders) |
| 327 | +- [ ] All code blocks contain real, working commands |
| 328 | +- [ ] Badges link to real CI/tooling in the repo |
| 329 | +- [ ] Quick Start can be followed start-to-finish without prior context |
| 330 | +- [ ] No invented features, directories, or configuration that doesn't exist |
| 331 | +- [ ] `[TODO: fill in]` markers placed where info is missing |
| 332 | + |
| 333 | +### CONTRIBUTING.md |
| 334 | +- [ ] Development setup uses the real toolchain commands |
| 335 | +- [ ] Branching and commit conventions match the repo's actual practice |
| 336 | +- [ ] Test commands are correct for this project |
| 337 | +- [ ] PR checklist reflects the repo's actual CI checks |
| 338 | +- [ ] Tone matches the project's audience (open source vs. internal) |
| 339 | +- [ ] `[TODO: fill in]` markers placed where info is missing |
0 commit comments