Repo Ready
Turn any repository into a well-maintained, community-ready project by
scaffolding (or auditing) all the standard files GitHub expects. The hard part
isn't writing a LICENSE file; it's knowing which 15+ files matter, how GitHub
uses each one, and making choices that fit the project's stack, audience, and
governance model. This skill owns all of that.
Two modes
Init mode (bare repo-ready or repo-ready init)
Start from scratch. Interview the user to understand the project, then
scaffold every file in one pass.
Update mode (repo-ready update)
Scan an existing repo, compare against the full checklist, report what's
missing or outdated, and offer to create each missing file interactively.
Both modes use the same interview/guidance engine and the same file catalog.
The difference is scope: init creates everything; update creates only what's
missing.
The file catalog
Every file this skill knows about, grouped by category. The generator
(scripts/generate.mjs) produces each one from templates plus user answers.
Tier 1: Essential (every repo should have these)
| File |
Purpose |
GitHub behavior |
.gitignore |
Exclude build artifacts, deps, OS files |
New-repo UI offers language picker |
.gitattributes |
Line endings, binary handling, linguist |
Powers language stats, diff behavior |
LICENSE |
Legal permissions for use/modification |
Sidebar badge, license detection, search filter |
README.md |
Project introduction and docs |
Rendered on repo homepage |
Tier 2: Community health (open source and team projects)
| File |
Purpose |
GitHub behavior |
CONTRIBUTING.md |
How to contribute |
Banner on new issues/PRs |
CODE_OF_CONDUCT.md |
Community standards |
Community profile checklist, tab in repo |
SECURITY.md |
Vulnerability disclosure policy |
Security tab, community profile checklist |
.github/ISSUE_TEMPLATE/bug_report.yml |
Structured bug reports |
Issue template chooser |
.github/ISSUE_TEMPLATE/feature_request.yml |
Structured feature requests |
Issue template chooser |
.github/ISSUE_TEMPLATE/config.yml |
Template chooser config |
Controls blank issues, external links |
.github/PULL_REQUEST_TEMPLATE.md |
PR body template |
Auto-fills PR description |
Tier 3: Automation and governance
| File |
Purpose |
GitHub behavior |
.github/dependabot.yml |
Automated dependency updates |
Dependabot opens PRs on schedule |
.github/workflows/ci.yml |
CI pipeline (build + test) |
Actions tab, PR status checks |
.github/CODEOWNERS |
Auto-assign PR reviewers by path |
Review requests, branch protection |
.github/FUNDING.yml |
Sponsor button |
Heart icon on repo page |
CHANGELOG.md |
Version history |
Human-readable release notes |
Tier 4: Editor and tooling (stack-dependent)
| File |
Purpose |
When to include |
.editorconfig |
Cross-editor formatting |
Always (universal) |
.markdownlint.json |
Markdown style consistency |
Repos with significant Markdown |
.prettierrc |
Code formatter config |
JS/TS projects |
.eslintrc / eslint.config.js |
Linting config |
JS/TS projects |
Tier 5: Repo metadata (GitHub API settings)
These aren't files; they're repository settings managed via gh CLI / GitHub
API. The skill audits and updates them as part of both init and update modes.
| Setting |
Purpose |
How to check |
How to set |
| Description |
One-line "About" text on repo page |
gh repo view --json description |
gh repo edit --description "..." |
| Topics |
Searchable tags (shown as badges) |
gh repo view --json repositoryTopics |
gh api -X PUT repos/{owner}/{repo}/topics -f "names[]=..." |
| Website |
Homepage URL in repo sidebar |
gh repo view --json homepageUrl |
gh repo edit --homepage "..." |
| Social preview |
OpenGraph image for link sharing |
GitHub web UI only |
Cannot be set via API (inform user) |
Tier 6: Supplementary (situational)
| File |
Purpose |
When to include |
SUPPORT.md |
Where to get help |
Projects with forums/Discord/SO presence |
CITATION.cff |
Academic citation metadata |
Research/academic software |
.github/DISCUSSION_TEMPLATE/ |
Structured discussion forms |
Repos using GitHub Discussions |
Interview protocol
Never scaffold on a guess. Every file involves choices (which license? what
stack for .gitignore? who are the codeowners?). Interview the user to make
informed decisions.
Interview flow
Ask one question at a time using ask_user. Skip any question the user already
answered in their prompt. Confirm inferred answers in one line before
scaffolding.
Phase 1: Project context (always detect, then ask)
Stack detection (auto): Scan the repo for lockfiles, manifests, and
source files. Detect: package.json/pnpm-lock.yaml/yarn.lock (Node.js),
requirements.txt/pyproject.toml/Pipfile (Python), go.mod (Go),
Cargo.toml (Rust), *.csproj/*.sln (.NET), pom.xml/build.gradle
(Java), Gemfile (Ruby), Dockerfile, terraform/ (IaC). Report what you
found: "Detected: Node.js (pnpm), TypeScript, Docker."
Repo visibility (auto-detect, NEVER guess): Run
gh api repos/{owner}/{repo} --jq '.private' to determine if the repo is
public or private. This is authoritative. Do NOT infer visibility from the
repo name, description, or any other heuristic. If gh is unavailable or
the command fails, ask the user explicitly. Report what you found:
"Repo visibility: private" or "Repo visibility: public".
Project type: Is this a library/package, a CLI tool, a web app, an API
service, a monorepo, or something else? (Affects README structure,
CONTRIBUTING guidance, CI workflow.)
Audience: Based on the detected visibility, set the default:
- Private repo -> default to "internal/personal". Ask: "This is a
private repo. Should I include community files (CODE_OF_CONDUCT,
CONTRIBUTING, issue templates) anyway, or skip them?"
- Public repo -> default to "open source". Ask: "This is a public repo.
Should I include full community health files (CODE_OF_CONDUCT,
CONTRIBUTING, SECURITY, issue templates, FUNDING)?"
Never tell the user a repo is public when it's private, or vice versa.
The gh api result is the source of truth.
Phase 2: License (ask if no LICENSE exists)
License selection: Guide the user through license choice:
- "I want maximum freedom for users" -> MIT or ISC
- "I want patent protection too" -> Apache 2.0
- "I want derivatives to stay open" -> GPL-3.0 or AGPL-3.0
- "I want file-level copyleft" -> MPL 2.0
- "Public domain" -> Unlicense or CC0-1.0
- "Match my ecosystem" -> detect and suggest (npm defaults to ISC, Rust
community uses MIT/Apache dual)
Present choices with the ask_user tool. Include a "(Recommended)" label
on the option that best fits the detected context.
Copyright holder: Who holds copyright? Default to the git user name
(git config user.name) or the GitHub org if detected from the remote.
Phase 3: Community files (ask if audience includes external contributors)
Code of Conduct: Use Contributor Covenant v2.1? (Recommended for all
open source.) Ask for the enforcement contact email.
Security contact: Email or URL for vulnerability reports.
Funding: Does the project accept sponsorship? Which platforms?
(GitHub Sponsors, Ko-fi, Patreon, Open Collective, custom URL.)
CODEOWNERS: Who should review PRs? Map paths to GitHub usernames/teams.
Default: * @<repo-owner>.
Phase 4: Automation (ask for all projects)
Dependabot: Enable automated dependency updates? Which ecosystems?
(Auto-detect from stack.) What schedule? Default: weekly.
CI workflow: Generate a starter CI workflow? (Auto-detect framework
and test runner from stack.)
Phase 5: Repo metadata (GitHub settings)
Auto-detect current values via gh repo view --json description,repositoryTopics,homepageUrl.
For each setting, show the current value and ask if the user wants to update it.
Description: The one-line "About" text shown on the repo page. If empty
or generic, suggest a description based on the detected stack and project
type. Show the current value (or "empty") and ask: "Update description to:
'...'?" Present the suggestion as the first choice.
Topics: Searchable tags shown as badges on the repo page. Auto-suggest
topics based on detected stack (e.g., node, typescript, python,
go, rust, docker, cli, library, api). Show current topics
and suggest additions. Use gh api -X PUT repos/{owner}/{repo}/topics
to set them (this replaces all topics, so merge existing + new).
Website/Homepage: The URL shown in the repo sidebar. If the repo has a
GitHub Pages site, suggest that URL. If it has a docs site or project
website, suggest that. If empty, ask: "Does this project have a website
or docs URL?"
Social preview: Cannot be set via API. If the repo lacks a social
preview image, inform the user: "Consider adding a social preview image
via Settings > Social preview for better link sharing on social media."
Phase 6: Confirm and scaffold
Summary: Show a table of all files to be created AND all repo settings
to be updated, each with a one-line description. Ask: "Create all of
these?" with options to deselect individual items.
The summary should clearly separate:
- Files to create (committed to the repo)
- Repo settings to update (applied via GitHub API, not committed)
Stack detection
The generator auto-detects the project stack by scanning for these markers:
| Marker file(s) |
Stack |
.gitignore template |
CI template |
package.json |
Node.js |
node |
node.js.yml |
pnpm-lock.yaml |
Node.js (pnpm) |
node |
node.js.yml (pnpm variant) |
yarn.lock |
Node.js (yarn) |
node |
node.js.yml (yarn variant) |
bun.lockb, bun.lock |
Node.js (bun) |
node |
node.js.yml |
tsconfig.json |
TypeScript |
node |
adds tsc build step |
requirements.txt, pyproject.toml, setup.py, setup.cfg, Pipfile |
Python |
python |
python-package.yml |
go.mod |
Go |
go |
go.yml |
Cargo.toml |
Rust |
rust |
rust.yml |
*.csproj, *.fsproj, *.sln |
.NET |
dotnetcore |
dotnet.yml |
pom.xml |
Java (Maven) |
java |
java-gradle.yml |
build.gradle, build.gradle.kts |
Java/Kotlin (Gradle) |
java |
java-gradle.yml |
Gemfile |
Ruby |
ruby |
ruby.yml |
Dockerfile, docker-compose.y*ml, compose.y*ml |
Docker |
docker added |
adds docker build |
*.tf |
Terraform |
terraform |
terraform validate |
Chart.yaml |
Helm |
none |
none |
composer.json |
PHP |
composer |
php.yml |
Package.swift |
Swift |
swift |
swift.yml |
pubspec.yaml |
Dart/Flutter |
flutter |
flutter test |
Multiple stacks combine: a repo with package.json + Dockerfile +
terraform/ gets all three in .gitignore and appropriate CI steps.
The gitignore.io API
For .gitignore generation, the skill uses the Toptal gitignore.io API:
GET https://www.toptal.com/developers/gitignore/api/{templates}
Where {templates} is a comma-separated list like node,macos,windows,visualstudiocode.
The generator always includes OS templates (macos,windows,linux) and editor
templates (visualstudiocode) alongside the detected stack templates.
If the API is unreachable, fetchGitignore() in scripts/generate.mjs falls
back to a bundled minimal template covering dependencies, build output, env
files, and OS noise.
The GitHub Licenses API
For LICENSE generation, use the GitHub API:
GET https://api.github.com/licenses/{spdx-id}
This returns the full license text with [year] and [fullname] placeholders
to fill in. Supported SPDX IDs: mit, apache-2.0, gpl-3.0, gpl-2.0,
lgpl-3.0, agpl-3.0, bsd-2-clause, bsd-3-clause, isc, mpl-2.0,
unlicense, cc0-1.0.
File generation details
.gitattributes
Always include these universal rules:
# Auto-detect text files and normalize line endings
* text=auto
# Force LF for shell scripts (even on Windows)
*.sh text eol=lf
*.bash text eol=lf
# Force CRLF for Windows-specific files
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sln text eol=crlf
# Binary files: never diff, never line-end convert
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.svg text
*.pdf binary
*.zip binary
*.tar.gz binary
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
# Linguist overrides (customize per project)
*.min.js linguist-generated
*.min.css linguist-generated
Add stack-specific rules based on detection (e.g., *.lock linguist-generated
for Node.js, go.sum linguist-generated for Go).
Issue templates (YAML forms, not Markdown)
Use the modern YAML issue form format (.yml) with structured fields, not the
legacy Markdown format. YAML forms provide dropdown menus, required field
validation, and checkboxes.
CI workflow
Generate based on detected stack. Use the latest stable action versions:
actions/checkout@v7
actions/setup-node@v7
actions/setup-python@v7
actions/setup-go@v7
actions/setup-dotnet@v6
CONTRIBUTING.md
Tailor to the detected stack:
- Include the correct install command (
npm install, pip install -e .,
go mod download, cargo build, dotnet restore)
- Include the correct test command
- Include branch naming convention (default:
feat/, fix/, docs/)
- Include commit convention (Conventional Commits)
CODE_OF_CONDUCT.md
Use Contributor Covenant v2.1 text verbatim. Only customize the enforcement
contact.
Update mode behavior
When running in update mode (repo-ready update):
Scan: Check for every file in the catalog. For each file:
- Present: Mark as existing (green checkmark)
- Missing: Mark as missing (red X)
- Outdated: Check for known issues (e.g., old action versions in CI,
legacy
.eslintrc format, Markdown issue templates instead of YAML forms)
Audit repo metadata: Check description, topics, and homepage via
gh repo view --json description,repositoryTopics,homepageUrl. Flag
empty or missing values.
Report: Show a summary table with status for every file AND repo
metadata settings.
Suggest: For each missing or outdated file, describe what it does and
why the repo should have it. Group by tier (essential, community, automation,
tooling). For empty repo metadata, suggest values.
Interview: For each file the user wants to add, run the relevant
interview questions (same as init mode, but only for the gaps).
Generate: Create only the selected files.
Apply repo metadata: For each approved metadata change, apply via gh
CLI (requires ask_user approval for each change).
Delta awareness: If a file exists but is incomplete (e.g., .gitignore
exists but is missing patterns for the detected stack), offer to append the
missing patterns rather than overwriting. Show a diff preview before
applying.
The workflow you follow
Init mode
- Detect stack (auto-scan)
- Detect repo visibility (auto, via
gh api)
- Interview (phases 1 through 6)
- Generate all selected files via
scripts/generate.mjs
- Apply approved repo metadata changes via
gh CLI
- Show summary of created files and applied settings
- Offer to commit:
git add -A && git commit -m "chore: scaffold repo health files"
Update mode
- Detect stack (auto-scan)
- Detect repo visibility (auto, via
gh api)
- Scan existing files against catalog
- Audit repo metadata (description, topics, homepage)
- Report gaps with tier labels
- Interview for missing files and metadata only
- Generate selected files
- Apply approved repo metadata changes via
gh CLI
- Show diff for any file being appended to (not overwritten)
- Offer to commit
The generator
node scripts/generate.mjs <mode> [options]
| Option |
Purpose |
--mode init|update |
Init (scaffold all) or update (fill gaps) |
--stack <stacks> |
Override auto-detected stacks (comma-separated) |
--license <spdx-id> |
License to use (e.g., mit, apache-2.0) |
--owner <name> |
Copyright holder name |
--year <year> |
Copyright year (default: current year) |
--coc-contact <email> |
Code of Conduct enforcement contact |
--security-contact <email> |
Security vulnerability report contact |
--funding <platform:username> |
Funding config (repeatable) |
--codeowners <pattern:owner> |
CODEOWNERS entries (repeatable) |
--no-dependabot |
Skip dependabot.yml |
--no-ci |
Skip CI workflow |
--no-editorconfig |
Skip .editorconfig |
--dir <path> |
Output directory (default: current directory) |
--dry-run |
Show what would be created without writing |
Safety rules
- Never overwrite existing files without explicit user approval via
ask_user. Show a diff preview first.
- Never commit without user approval.
- Never push without user approval.
- Append mode: When a file exists and the generator would add content,
show the additions and ask before modifying.
- License accuracy: Use exact license text from the GitHub API or
canonical sources. Never paraphrase legal text.
Exit criteria
- Init mode: All selected files created, summary shown, commit offered.
- Update mode: Gap report shown, selected missing files created, diffs
shown for modifications, commit offered.
1---2name: repo-ready3description: Scaffold and maintain the standard community health files every GitHub repository needs: .gitignore, .gitattributes, LICENSE, README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, FUNDING.yml, CODEOWNERS, issue/PR templates, dependabot.yml, .editorconfig, and CI workflows. Two modes: **init** (interview the user, detect the stack, scaffold everything from scratch) and **update** (scan an existing repo, identify gaps against best practices, and suggest additions file by file). Use when the user says "repo ready", "repo init", "repo health", "community health", "add gitignore", "add license", "repo files", "repo setup", or asks about missing repo files. Do NOT use for project code scaffolding, GitHub Pages setup (use create-gh-pages-site), or CI pipeline design beyond the starter workflow.4---56# Repo Ready78Turn any repository into a well-maintained, community-ready project by9scaffolding (or auditing) all the standard files GitHub expects. The hard part10isn't writing a LICENSE file; it's knowing which 15+ files matter, how GitHub11uses each one, and making choices that fit the project's stack, audience, and12governance model. This skill owns all of that.1314## Two modes1516### Init mode (bare `repo-ready` or `repo-ready init`)1718Start from scratch. Interview the user to understand the project, then19scaffold every file in one pass.2021### Update mode (`repo-ready update`)2223Scan an existing repo, compare against the full checklist, report what's24missing or outdated, and offer to create each missing file interactively.2526Both modes use the same interview/guidance engine and the same file catalog.27The difference is scope: init creates everything; update creates only what's28missing.2930## The file catalog3132Every file this skill knows about, grouped by category. The generator33(`scripts/generate.mjs`) produces each one from templates plus user answers.3435### Tier 1: Essential (every repo should have these)3637| File | Purpose | GitHub behavior |38|------|---------|-----------------|39| `.gitignore` | Exclude build artifacts, deps, OS files | New-repo UI offers language picker |40| `.gitattributes` | Line endings, binary handling, linguist | Powers language stats, diff behavior |41| `LICENSE` | Legal permissions for use/modification | Sidebar badge, license detection, search filter |42| `README.md` | Project introduction and docs | Rendered on repo homepage |4344### Tier 2: Community health (open source and team projects)4546| File | Purpose | GitHub behavior |47|------|---------|-----------------|48| `CONTRIBUTING.md` | How to contribute | Banner on new issues/PRs |49| `CODE_OF_CONDUCT.md` | Community standards | Community profile checklist, tab in repo |50| `SECURITY.md` | Vulnerability disclosure policy | Security tab, community profile checklist |51| `.github/ISSUE_TEMPLATE/bug_report.yml` | Structured bug reports | Issue template chooser |52| `.github/ISSUE_TEMPLATE/feature_request.yml` | Structured feature requests | Issue template chooser |53| `.github/ISSUE_TEMPLATE/config.yml` | Template chooser config | Controls blank issues, external links |54| `.github/PULL_REQUEST_TEMPLATE.md` | PR body template | Auto-fills PR description |5556### Tier 3: Automation and governance5758| File | Purpose | GitHub behavior |59|------|---------|-----------------|60| `.github/dependabot.yml` | Automated dependency updates | Dependabot opens PRs on schedule |61| `.github/workflows/ci.yml` | CI pipeline (build + test) | Actions tab, PR status checks |62| `.github/CODEOWNERS` | Auto-assign PR reviewers by path | Review requests, branch protection |63| `.github/FUNDING.yml` | Sponsor button | Heart icon on repo page |64| `CHANGELOG.md` | Version history | Human-readable release notes |6566### Tier 4: Editor and tooling (stack-dependent)6768| File | Purpose | When to include |69|------|---------|-----------------|70| `.editorconfig` | Cross-editor formatting | Always (universal) |71| `.markdownlint.json` | Markdown style consistency | Repos with significant Markdown |72| `.prettierrc` | Code formatter config | JS/TS projects |73| `.eslintrc` / `eslint.config.js` | Linting config | JS/TS projects |7475### Tier 5: Repo metadata (GitHub API settings)7677These aren't files; they're repository settings managed via `gh` CLI / GitHub78API. The skill audits and updates them as part of both init and update modes.7980| Setting | Purpose | How to check | How to set |81|---------|---------|--------------|------------|82| Description | One-line "About" text on repo page | `gh repo view --json description` | `gh repo edit --description "..."` |83| Topics | Searchable tags (shown as badges) | `gh repo view --json repositoryTopics` | `gh api -X PUT repos/{owner}/{repo}/topics -f "names[]=..."` |84| Website | Homepage URL in repo sidebar | `gh repo view --json homepageUrl` | `gh repo edit --homepage "..."` |85| Social preview | OpenGraph image for link sharing | GitHub web UI only | Cannot be set via API (inform user) |8687### Tier 6: Supplementary (situational)8889| File | Purpose | When to include |90|------|---------|-----------------|91| `SUPPORT.md` | Where to get help | Projects with forums/Discord/SO presence |92| `CITATION.cff` | Academic citation metadata | Research/academic software |93| `.github/DISCUSSION_TEMPLATE/` | Structured discussion forms | Repos using GitHub Discussions |9495## Interview protocol9697**Never scaffold on a guess.** Every file involves choices (which license? what98stack for .gitignore? who are the codeowners?). Interview the user to make99informed decisions.100101### Interview flow102103Ask one question at a time using `ask_user`. Skip any question the user already104answered in their prompt. Confirm inferred answers in one line before105scaffolding.106107#### Phase 1: Project context (always detect, then ask)1081091. **Stack detection** (auto): Scan the repo for lockfiles, manifests, and110 source files. Detect: `package.json`/`pnpm-lock.yaml`/`yarn.lock` (Node.js),111 `requirements.txt`/`pyproject.toml`/`Pipfile` (Python), `go.mod` (Go),112 `Cargo.toml` (Rust), `*.csproj`/`*.sln` (.NET), `pom.xml`/`build.gradle`113 (Java), `Gemfile` (Ruby), `Dockerfile`, `terraform/` (IaC). Report what you114 found: "Detected: Node.js (pnpm), TypeScript, Docker."1151162. **Repo visibility** (auto-detect, NEVER guess): Run117 `gh api repos/{owner}/{repo} --jq '.private'` to determine if the repo is118 public or private. This is authoritative. Do NOT infer visibility from the119 repo name, description, or any other heuristic. If `gh` is unavailable or120 the command fails, ask the user explicitly. Report what you found:121 "Repo visibility: private" or "Repo visibility: public".1221233. **Project type**: Is this a library/package, a CLI tool, a web app, an API124 service, a monorepo, or something else? (Affects README structure,125 CONTRIBUTING guidance, CI workflow.)1261274. **Audience**: Based on the detected visibility, set the default:128 - **Private repo** -> default to "internal/personal". Ask: "This is a129 private repo. Should I include community files (CODE_OF_CONDUCT,130 CONTRIBUTING, issue templates) anyway, or skip them?"131 - **Public repo** -> default to "open source". Ask: "This is a public repo.132 Should I include full community health files (CODE_OF_CONDUCT,133 CONTRIBUTING, SECURITY, issue templates, FUNDING)?"134 135 Never tell the user a repo is public when it's private, or vice versa.136 The `gh api` result is the source of truth.137138#### Phase 2: License (ask if no LICENSE exists)1391405. **License selection**: Guide the user through license choice:141 - "I want maximum freedom for users" -> MIT or ISC142 - "I want patent protection too" -> Apache 2.0143 - "I want derivatives to stay open" -> GPL-3.0 or AGPL-3.0144 - "I want file-level copyleft" -> MPL 2.0145 - "Public domain" -> Unlicense or CC0-1.0146 - "Match my ecosystem" -> detect and suggest (npm defaults to ISC, Rust147 community uses MIT/Apache dual)148149 Present choices with the `ask_user` tool. Include a "(Recommended)" label150 on the option that best fits the detected context.1511526. **Copyright holder**: Who holds copyright? Default to the git user name153 (`git config user.name`) or the GitHub org if detected from the remote.154155#### Phase 3: Community files (ask if audience includes external contributors)1561577. **Code of Conduct**: Use Contributor Covenant v2.1? (Recommended for all158 open source.) Ask for the enforcement contact email.1591608. **Security contact**: Email or URL for vulnerability reports.1611629. **Funding**: Does the project accept sponsorship? Which platforms?163 (GitHub Sponsors, Ko-fi, Patreon, Open Collective, custom URL.)16416510. **CODEOWNERS**: Who should review PRs? Map paths to GitHub usernames/teams.166 Default: `* @<repo-owner>`.167168#### Phase 4: Automation (ask for all projects)16917011. **Dependabot**: Enable automated dependency updates? Which ecosystems?171 (Auto-detect from stack.) What schedule? Default: weekly.17217312. **CI workflow**: Generate a starter CI workflow? (Auto-detect framework174 and test runner from stack.)175176#### Phase 5: Repo metadata (GitHub settings)177178Auto-detect current values via `gh repo view --json description,repositoryTopics,homepageUrl`.179For each setting, show the current value and ask if the user wants to update it.18018113. **Description**: The one-line "About" text shown on the repo page. If empty182 or generic, suggest a description based on the detected stack and project183 type. Show the current value (or "empty") and ask: "Update description to:184 '...'?" Present the suggestion as the first choice.18518614. **Topics**: Searchable tags shown as badges on the repo page. Auto-suggest187 topics based on detected stack (e.g., `node`, `typescript`, `python`,188 `go`, `rust`, `docker`, `cli`, `library`, `api`). Show current topics189 and suggest additions. Use `gh api -X PUT repos/{owner}/{repo}/topics`190 to set them (this replaces all topics, so merge existing + new).19119215. **Website/Homepage**: The URL shown in the repo sidebar. If the repo has a193 GitHub Pages site, suggest that URL. If it has a docs site or project194 website, suggest that. If empty, ask: "Does this project have a website195 or docs URL?"19619716. **Social preview**: Cannot be set via API. If the repo lacks a social198 preview image, inform the user: "Consider adding a social preview image199 via Settings > Social preview for better link sharing on social media."200201#### Phase 6: Confirm and scaffold20220317. **Summary**: Show a table of all files to be created AND all repo settings204 to be updated, each with a one-line description. Ask: "Create all of205 these?" with options to deselect individual items.206207 The summary should clearly separate:208 - **Files to create** (committed to the repo)209 - **Repo settings to update** (applied via GitHub API, not committed)210211## Stack detection212213The generator auto-detects the project stack by scanning for these markers:214215| Marker file(s) | Stack | .gitignore template | CI template |216|-----------------|-------|---------------------|-------------|217| `package.json` | Node.js | `node` | `node.js.yml` |218| `pnpm-lock.yaml` | Node.js (pnpm) | `node` | `node.js.yml` (pnpm variant) |219| `yarn.lock` | Node.js (yarn) | `node` | `node.js.yml` (yarn variant) |220| `bun.lockb`, `bun.lock` | Node.js (bun) | `node` | `node.js.yml` |221| `tsconfig.json` | TypeScript | `node` | adds tsc build step |222| `requirements.txt`, `pyproject.toml`, `setup.py`, `setup.cfg`, `Pipfile` | Python | `python` | `python-package.yml` |223| `go.mod` | Go | `go` | `go.yml` |224| `Cargo.toml` | Rust | `rust` | `rust.yml` |225| `*.csproj`, `*.fsproj`, `*.sln` | .NET | `dotnetcore` | `dotnet.yml` |226| `pom.xml` | Java (Maven) | `java` | `java-gradle.yml` |227| `build.gradle`, `build.gradle.kts` | Java/Kotlin (Gradle) | `java` | `java-gradle.yml` |228| `Gemfile` | Ruby | `ruby` | `ruby.yml` |229| `Dockerfile`, `docker-compose.y*ml`, `compose.y*ml` | Docker | `docker` added | adds docker build |230| `*.tf` | Terraform | `terraform` | terraform validate |231| `Chart.yaml` | Helm | none | none |232| `composer.json` | PHP | `composer` | `php.yml` |233| `Package.swift` | Swift | `swift` | `swift.yml` |234| `pubspec.yaml` | Dart/Flutter | `flutter` | flutter test |235236Multiple stacks combine: a repo with `package.json` + `Dockerfile` +237`terraform/` gets all three in `.gitignore` and appropriate CI steps.238239## The gitignore.io API240241For `.gitignore` generation, the skill uses the Toptal gitignore.io API:242243```text244GET https://www.toptal.com/developers/gitignore/api/{templates}245```246247Where `{templates}` is a comma-separated list like `node,macos,windows,visualstudiocode`.248249The generator always includes OS templates (`macos,windows,linux`) and editor250templates (`visualstudiocode`) alongside the detected stack templates.251252If the API is unreachable, `fetchGitignore()` in `scripts/generate.mjs` falls253back to a bundled minimal template covering dependencies, build output, env254files, and OS noise.255256## The GitHub Licenses API257258For `LICENSE` generation, use the GitHub API:259260```text261GET https://api.github.com/licenses/{spdx-id}262```263264This returns the full license text with `[year]` and `[fullname]` placeholders265to fill in. Supported SPDX IDs: `mit`, `apache-2.0`, `gpl-3.0`, `gpl-2.0`,266`lgpl-3.0`, `agpl-3.0`, `bsd-2-clause`, `bsd-3-clause`, `isc`, `mpl-2.0`,267`unlicense`, `cc0-1.0`.268269## File generation details270271### .gitattributes272273Always include these universal rules:274275```gitattributes276# Auto-detect text files and normalize line endings277* text=auto278279# Force LF for shell scripts (even on Windows)280*.sh text eol=lf281*.bash text eol=lf282283# Force CRLF for Windows-specific files284*.bat text eol=crlf285*.cmd text eol=crlf286*.ps1 text eol=crlf287*.sln text eol=crlf288289# Binary files: never diff, never line-end convert290*.png binary291*.jpg binary292*.jpeg binary293*.gif binary294*.ico binary295*.webp binary296*.svg text297*.pdf binary298*.zip binary299*.tar.gz binary300*.woff binary301*.woff2 binary302*.ttf binary303*.eot binary304305# Linguist overrides (customize per project)306*.min.js linguist-generated307*.min.css linguist-generated308```309310Add stack-specific rules based on detection (e.g., `*.lock linguist-generated`311for Node.js, `go.sum linguist-generated` for Go).312313### Issue templates (YAML forms, not Markdown)314315Use the modern YAML issue form format (`.yml`) with structured fields, not the316legacy Markdown format. YAML forms provide dropdown menus, required field317validation, and checkboxes.318319### CI workflow320321Generate based on detected stack. Use the latest stable action versions:322- `actions/checkout@v7`323- `actions/setup-node@v7`324- `actions/setup-python@v7`325- `actions/setup-go@v7`326- `actions/setup-dotnet@v6`327328### CONTRIBUTING.md329330Tailor to the detected stack:331- Include the correct install command (`npm install`, `pip install -e .`,332 `go mod download`, `cargo build`, `dotnet restore`)333- Include the correct test command334- Include branch naming convention (default: `feat/`, `fix/`, `docs/`)335- Include commit convention (Conventional Commits)336337### CODE_OF_CONDUCT.md338339Use Contributor Covenant v2.1 text verbatim. Only customize the enforcement340contact.341342## Update mode behavior343344When running in update mode (`repo-ready update`):3453461. **Scan**: Check for every file in the catalog. For each file:347 - **Present**: Mark as existing (green checkmark)348 - **Missing**: Mark as missing (red X)349 - **Outdated**: Check for known issues (e.g., old action versions in CI,350 legacy `.eslintrc` format, Markdown issue templates instead of YAML forms)3513522. **Audit repo metadata**: Check description, topics, and homepage via353 `gh repo view --json description,repositoryTopics,homepageUrl`. Flag354 empty or missing values.3553563. **Report**: Show a summary table with status for every file AND repo357 metadata settings.3583594. **Suggest**: For each missing or outdated file, describe what it does and360 why the repo should have it. Group by tier (essential, community, automation,361 tooling). For empty repo metadata, suggest values.3623635. **Interview**: For each file the user wants to add, run the relevant364 interview questions (same as init mode, but only for the gaps).3653666. **Generate**: Create only the selected files.3673687. **Apply repo metadata**: For each approved metadata change, apply via `gh`369 CLI (requires `ask_user` approval for each change).3703718. **Delta awareness**: If a file exists but is incomplete (e.g., `.gitignore`372 exists but is missing patterns for the detected stack), offer to append the373 missing patterns rather than overwriting. Show a diff preview before374 applying.375376## The workflow you follow377378### Init mode3793801. Detect stack (auto-scan)3812. Detect repo visibility (auto, via `gh api`)3823. Interview (phases 1 through 6)3834. Generate all selected files via `scripts/generate.mjs`3845. Apply approved repo metadata changes via `gh` CLI3856. Show summary of created files and applied settings3867. Offer to commit: `git add -A && git commit -m "chore: scaffold repo health files"`387388### Update mode3893901. Detect stack (auto-scan)3912. Detect repo visibility (auto, via `gh api`)3923. Scan existing files against catalog3934. Audit repo metadata (description, topics, homepage)3945. Report gaps with tier labels3956. Interview for missing files and metadata only3967. Generate selected files3978. Apply approved repo metadata changes via `gh` CLI3989. Show diff for any file being appended to (not overwritten)39910. Offer to commit400401## The generator402403```sh404node scripts/generate.mjs <mode> [options]405```406407| Option | Purpose |408|--------|---------|409| `--mode init\|update` | Init (scaffold all) or update (fill gaps) |410| `--stack <stacks>` | Override auto-detected stacks (comma-separated) |411| `--license <spdx-id>` | License to use (e.g., `mit`, `apache-2.0`) |412| `--owner <name>` | Copyright holder name |413| `--year <year>` | Copyright year (default: current year) |414| `--coc-contact <email>` | Code of Conduct enforcement contact |415| `--security-contact <email>` | Security vulnerability report contact |416| `--funding <platform:username>` | Funding config (repeatable) |417| `--codeowners <pattern:owner>` | CODEOWNERS entries (repeatable) |418| `--no-dependabot` | Skip dependabot.yml |419| `--no-ci` | Skip CI workflow |420| `--no-editorconfig` | Skip .editorconfig |421| `--dir <path>` | Output directory (default: current directory) |422| `--dry-run` | Show what would be created without writing |423424## Safety rules4254261. **Never overwrite existing files** without explicit user approval via427 `ask_user`. Show a diff preview first.4282. **Never commit** without user approval.4293. **Never push** without user approval.4304. **Append mode**: When a file exists and the generator would add content,431 show the additions and ask before modifying.4325. **License accuracy**: Use exact license text from the GitHub API or433 canonical sources. Never paraphrase legal text.434435## Exit criteria436437- **Init mode**: All selected files created, summary shown, commit offered.438- **Update mode**: Gap report shown, selected missing files created, diffs439 shown for modifications, commit offered.