| name | writing-readme |
| description | Generate or update README.md files across three scopes — repo (with project-type detection), account (GitHub user profile), and org (organization profile). Use when creating, updating, or aligning a README to org conventions. |
| compatibility | Designed for Claude Code |
| metadata | {"argument-hint":"<scope> [target]","allowed-tools":"Read, Grep, Glob, Edit, Write, Bash, WebFetch, Agent"} |
Write README
Scope: $ARGUMENTS
Generate or update a README.md following scope-specific best practices.
Phase 1: Detect Scope
Parse $ARGUMENTS to determine scope:
repo (default) — README.md for a code repository in the current directory
repo <owner/repo> — README.md for a specific remote repository
account <username> — profile README for a GitHub user (<username>/<username>/README.md)
org <orgname> — organization profile README (.github/profile/README.md)
If no scope is given, default to repo for the current working directory.
Phase 2: Gather Context
For repo
- Read existing README.md (if any)
- Detect project type:
action.yml / action.yaml exists → GitHub Action
pyproject.toml / setup.py → Python library
package.json → Node.js/TypeScript
Cargo.toml → Rust
go.mod → Go
- Read project manifest for name, version, description, license
- Scan source tree:
src/, lib/, main entry points
- Read LICENSE file
- Check for existing docs: CONTRIBUTING.md, AGENTS.md, docs/
For account
gh api users/<username> — bio, company, location, blog
gh repo list <username> --limit 30 --json name,description,stargazerCount,primaryLanguage — repos sorted by stars
- Read existing
<username>/<username>/README.md if it exists
- Identify top 3-5 repos by stars or recent activity
For org
gh api orgs/<orgname> — description, blog, location
gh repo list <orgname> --limit 50 --json name,description,isPrivate,stargazerCount,primaryLanguage — public repos
- Read existing
.github/profile/README.md or .github/readme.md
- Group repos by domain/purpose
- Identify pinned repos if any
Phase 3: Apply Template
See references/readme-templates.md for the four template snippets and per-scope conventions (GitHub Action, Library/Application, Account, Organization). Repo READMEs follow the qte77 doc-structure canon: value-first order Hero → Badges → What → How → Why → Refs → License → tail; badges License → Version → CI (static blue / native status, Version linked to CHANGELOG.md).
Pick the template matching the scope detected in Phase 1 and the project type detected in Phase 2.
Phase 4: Generate
- Draft the README applying the appropriate template
- Verify all links resolve
- Present the draft to the user for review
- Write the file after user approval
Rules
- Never add content the project doesn't have
- Keep descriptions factual — pull from existing docs, manifests, and code
- Don't add emojis unless the user requests them
- Prefer brevity — every sentence should earn its place
- For org READMEs: omit private repos unless the user explicitly asks
- License file is always
LICENSE (never LICENSE.md)
- Repo READMEs derive from the qte77 doc-structure canon — never invent a divergent structure