Skip to main content
General

community-health

Scaffold the GitHub Community Standards files (CODE_OF_CONDUCT, SECURITY, ISSUE_TEMPLATE, pull_request_template) using $COMMUNITY_HEALTH_CONTACT or git config user.email as the contact. Use when bootstrapping a new repo or backfilling community-health coverage.

community-health

Community Health

GitHub’s Community Standards checklist expects every public repo to ship a minimum set of community-health files. This skill provides the canonical templates and the placement rules. All templates live in assets/ and mirror the target repo layout.

Files and Placement

Copy each asset to the target repo path shown below. Sources are relative to this skill’s assets/ directory.

Asset sourceTarget pathPurpose
CODE_OF_CONDUCT.mdCODE_OF_CONDUCT.mdContributor Covenant 2.1; populates community profile.
SECURITY.mdSECURITY.mdPrivate vulnerability reporting; populates the Security tab.
github/pull_request_template.md.github/pull_request_template.mdSingle PR template used for every PR.
github/ISSUE_TEMPLATE/bug_report.yml.github/ISSUE_TEMPLATE/bug_report.ymlStructured bug report form.
github/ISSUE_TEMPLATE/feature_request.yml.github/ISSUE_TEMPLATE/feature_request.ymlStructured feature request form.
github/ISSUE_TEMPLATE/config.yml.github/ISSUE_TEMPLATE/config.ymlDisables blank issues; adds Security + Discussions contact links.

LICENSE and CONTRIBUTING.md also show on the community profile but are owned by scaffold-project and the language-specific scaffold skills, not here.

Template Placeholders

Templates contain {PLACEHOLDER} tokens that must be replaced when copied into a target repo.

PlaceholderSourceExample
{OWNER}GitHub owner (user or org) from the remote URL or gh repo view --json ownerurmzd
{REPO}Repo name on GitHub (without owner)sr, teasr, saige
{CURRENT_MAJOR}Current major version from the project manifest (Cargo.toml, pyproject.toml, package.json, etc.). Use 0 for pre-1.0 projects and adjust the supported-versions table accordingly.6, 1, 0
{CHECK_COMMAND}The quality-gate command from the project’s task runnerjust check, npm run ci, cargo test --workspace, go test ./...

Always replace every placeholder. Leaving {OWNER}, {REPO}, or {CURRENT_MAJOR} unrendered in a shipped file is a bug.

Contact

All community-health templates reference $COMMUNITY_HEALTH_CONTACT (falling back to git config user.email) as the private contact. Set the env var before scaffolding.

Usage

New repo (invoked by scaffold-project / repo-init)

  1. Copy assets/CODE_OF_CONDUCT.md to the repo root (no edits needed).
  2. Copy assets/SECURITY.md, substituting {OWNER}, {REPO}, and {CURRENT_MAJOR}. For pre-1.0 projects, rewrite the table to 0.x Yes / < 0.x No.
  3. Copy assets/github/pull_request_template.md to .github/pull_request_template.md, substituting {CHECK_COMMAND}. Append language-specific verification checks if the scaffold skill defines them (e.g. cargo clippy -- -D warnings).
  4. Copy the three assets/github/ISSUE_TEMPLATE/* files to .github/ISSUE_TEMPLATE/, substituting {OWNER} and {REPO} in config.yml.

Backfill an existing repo

  1. Run the check-project skill to identify which community-health files are missing.
  2. Copy only the missing files from assets/.
  3. Do not overwrite an existing SECURITY.md that already has a project-specific Scope or Supply Chain section. Merge instead.

Audit

Use check-project to verify the six files exist at the expected paths, placeholders are fully rendered, and the PR-template {CHECK_COMMAND} matches the project’s actual quality-gate command.

Rules

  • No auto-overwrite. If a target file already exists and has been customized (e.g. a SECURITY.md with a project-specific Scope section), diff-merge rather than overwrite.
  • Email comes from one source. Resolve from $COMMUNITY_HEALTH_CONTACT, falling back to git config user.email. Do not silently substitute a different value mid-scaffold.
  • Placeholders are mandatory. A shipped template with {OWNER}, {REPO}, or {CURRENT_MAJOR} unrendered is a FAIL in check-project.
  • One PR template. Use the single .github/pull_request_template.md file. Do not add per-branch or per-type templates unless the project explicitly needs them.
  • Issue forms over markdown. Use the .yml issue-form schema, not legacy .md issue templates.