Crafting repo readmes
Skill carefreelife98/carefree-skills/skills/crafting-repo-readmes
Use when asked to write, rewrite, or improve a README.md for a git repository given a URL or local path, or to systematically analyze and document a codebase for external readers. Also applies when a repo's README is stale, thin, auto-generated boilerplate, or missing entirely.From its SKILL.md
npx -y skills add carefreelife98/carefree-skills --skill crafting-repo-readmesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.5 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it
Crafting Repo READMEs
Overview
Given a git URL or local path, gather real facts about the repository before writing a single line of README, draft it, then stop and get approval before writing anything to disk. Skipping either the analysis or the approval gate is the failure mode this skill exists to prevent — a fluent-sounding README built from assumptions, or a correct README applied without review, are both failures.
When to use
- User gives a git URL or local repo path and asks for a README (new, rewritten, or "improved")
- User asks to "document this codebase" or "make this repo presentable" for external readers
- An existing README is stale, thin, or clearly doesn't match what the code actually does
Workflow
-
Resolve input. Accept either a git URL or an existing local path.
- Local path → analyze in place, no clone. If it's a git checkout, run
git status --shortandgit fetch --dry-run(read-only) and note anything relevant (uncommitted changes, behindorigin) in your own context — never auto-pull, never discard local state. - GitHub URL →
gh repo clone <owner>/<repo> <scratch-dir> -- --depth 1(directory comes before--, git flags after —gh repo clone --helpconfirms the order). Prefer this over plaingit clonefor GitHub URLs specifically: it uses your existingghauth and works for public and private repos alike, whereas a plain HTTPSgit clonefails on private repos without a credential helper already configured. - Non-GitHub git URL →
git clone --depth 1 <url> <scratch-dir>(private-repo access here depends on the user's own SSH keys/credential helper). - Clone/auth failure → report the actual error (permission denied / not found / not authenticated) and stop. Suggest
gh auth loginor checking SSH access. Do not retry with a workaround, do not guess a different URL, do not fall back to writing a README from the name alone. - Do not search the filesystem for a pre-existing local clone matching a URL — if the user has one, they'll give you the path directly.
- Local path → analyze in place, no clone. If it's a git checkout, run
-
Gather facts before drafting anything. Work through
references/repo-analysis.md: manifests, directory structure, entry points, tests, CI, license, env vars, largest files, security-posture presence, community health files. This step runs even when the repo already has an extensive README — the draft's structure comes from what's actually in the code, not from what's already written about it. Keep these facts in a running scratch note and re-read it while drafting each section in step 6, rather than drafting sections independently from memory. -
Enrich from GitHub metadata when applicable.
gh repo view --json description,stargazerCount,licenseInfo,repositoryTopics,latestRelease,homepageUrletc. — surfaces things the file tree alone won't show (stars, topics, latest release). -
Classify the project. Use the signal table in
references/repo-analysis.mdto determine project type (library / CLI / service / web app / monorepo / IaC / other) and primary stack. This determines which README sections actually apply — a library needs an API section, a CLI needs a command reference, a web app needs a demo/screenshot slot. -
Treat any existing README as a source, not a template. Read it for tone, project history, or naming conventions the code alone won't reveal (for example: some projects use lowercase
readme.mdby convention — preserve that if so). Build the new structure from steps 2-4, not by lightly editing the old one section-by-section. -
Draft using the structure and template in
references/readme-best-practices.md. English by default unless told otherwise. Reference your fact-gathering notes for each section rather than re-deriving or guessing. -
Verify the draft before showing it. Work through the self-verification checklist in
references/readme-best-practices.md: every internal link/heading actually resolves in the repo, every external URL/badge is live, every code example runs without error (and matches its documented output where that's feasible to check). Then run the completeness gate — does the draft clearly answer GitHub's five core questions (what it does, why it's useful, how to get started, where to get help, who maintains it)? Fix anything that fails before moving on. -
STOP. Show the full, verified draft in the conversation. Do not write it to any file yet. Wait for the user to approve or request changes. If the repo is public-facing OSS, also mention (informationally, not as a to-do you'll auto-execute) which of GitHub's standard community health files are missing — see the Companion artifacts section in
references/readme-best-practices.md. Skip this note for personal/internal repos where it isn't relevant. -
On approval, write the README to the target path with Write/Edit. Do not commit or push without a separate, explicit confirmation — that's a distinct action from drafting a file. Do not create any companion artifact (CONTRIBUTING.md, issue templates, etc.) unless the user explicitly asks for it.
Red flags — stop and go back to step 7 or 8
- About to call Write/Edit on a README and haven't shown the content in the conversation first
- "The existing README already covers this, I'll just polish it in place" — it's a source, not a starting structure
- "I can tell what this is from the name/description" — verify against the actual manifest and source instead of assuming
- "I'll write the file and show them after, saves a round trip" — writing before approval is the single most common way this skill fails; the analysis being correct doesn't make skipping the approval step safe
- "The links are probably fine, I copied the section titles correctly" — check they actually resolve, don't assume
- "The commit messages suggest this was probably done because..." — if a commit/PR doesn't explicitly state a rationale, don't infer one; leave it out rather than guessing at motivation
- About to auto-create a CONTRIBUTING.md/issue template/etc. because it seemed helpful — mention the gap, don't fill it without being asked
Quick reference
| Step | Tool/command |
|---|---|
| Clone (GitHub) | gh repo clone <owner>/<repo> <dir> -- --depth 1 |
| Clone (other host) | git clone --depth 1 <url> <dir> |
| Local checkout status | git status --short, git fetch --dry-run |
| Fact-gathering | references/repo-analysis.md, scripts/gather-facts.sh <dir> |
| GitHub metadata | gh repo view --json ... |
| README structure | references/readme-best-practices.md |
| Verify before showing | Self-verification checklist in references/readme-best-practices.md |
Common mistakes
- Writing install/usage commands that "look right" instead of copying them from the actual manifest scripts or verified source
- Reproducing dynamic content from an existing README (sponsor logos, point-in-time star counts) instead of using badges that stay accurate automatically
- Fabricating links to files that don't exist (CONTRIBUTING.md, CODE_OF_CONDUCT.md) — check first, only link what's real
- Including a mermaid architecture diagram for a single-file script — reserve it for genuinely multi-component projects
What ships with it: 3 files
26.6 KB alongside SKILL.md, 1 of them executable
references/
- readme-best-practices.md17.5 KB
- repo-analysis.md6.3 KB
scripts/
- gather-facts.shruns2.8 KB
Gives 0 of the 12 instructions most docs writing skills give in ~1.6k tokens
Counted across 1,637 of the 3,044 authors here whose files we hold, read 2026-08-07
- Announce the skill at startin 54 of 1637, across 26 files
- Convert legacy doc files before editingin 45 of 1637, across 7 files
- Predict questions readers might askin 42 of 1637, across 4 files
- Generate clarifying questions for initial contextin 42 of 1637, across 3 files
- Create document scaffold with placeholder textin 42 of 1637, across 3 files
- Brainstorm content options for each sectionin 42 of 1637, across 3 files
- Test the document with a fresh context-less instancein 42 of 1637, across 3 files
- Include exact file paths in every taskin 42 of 1637, across 15 files
- Ask interview questions one at a timein 42 of 1637, across 27 files
- Apply surgical edits during refinementin 41 of 1637, across 2 files
- Offer structured workflow or freeformin 40 of 1637, across 1 file
- Ask for document meta-contextin 40 of 1637, across 2 files
Said here and by no other author read
- Gather repository facts before drafting
- Clone with depth one
- Run read-only git checks for local paths
- Read existing README as a source not a template
- Write README only after approval
- Copy install commands from actual manifest
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.