
oss-hygiene
Bring an open-source GitHub repository up to community-standards and supply-chain hygiene baseline: scaffold the GitHub Community Standards files (README check, LICENSE, CODEOFCONDUCT, CONTRIBUTING, SECURITY, issue + PR templates), wire Dependabot version updates, the Dependency Review action, OpenSSF Scorecard, and CodeQL (when applicable), check Dependabot alerts and secret scanning, and add the OpenSSF Best Practices Badge link. Use when the user says "set up OSS hygiene", "make this repo open-source-ready", "add community health files", "wire dependabot", "add scorecard", "OSSF badge", "supply chain hardening", or invokes /oss-hygiene on a public repo. Idempotent — safe to re-run; diffs against templates and asks before overwriting. Distinct from /gh-bootstrap (merge-button + branch protection) and /safe-settings (org-scale settings as code): focuses on the contributor-facing and supply-chain surface, not merge or org policy. Run after /gh-bootstrap; before announcing the repo.
- Installs
- 68
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/paulnsorensen/git-gouda --skill oss-hygiene- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads oss-hygiene automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
oss-hygiene
Brings a public GitHub repo up to the GitHub Community Standards baseline and the OpenSSF Scorecard supply-chain baseline, and stages it for the OpenSSF Best Practices Badge.
This sits next to /gh-bootstrap and answers a different question: gh-bootstrap locks the merge surface; oss-hygiene fills the contributor-facing and supply-chain surface.
Where this skill fits
| Concern | Skill |
|---|---|
| Merge button, branch protection, release-notes config | /gh-bootstrap |
| Community files, supply-chain checks, OSSF posture | /oss-hygiene (this skill) |
| Org-wide settings as code across many repos | /safe-settings |
Per-task PR / issue / CI ops are out of scope for this catalog.
Run /gh-bootstrap first (so main is locked), then /oss-hygiene (so contributors can find their way in and supply-chain checks gate PRs).
What gets configured
The skill operates on three orthogonal surfaces. It diffs every file against assets/ templates and asks before overwriting anything that already exists.
Surface 1 — GitHub Community Standards
The "Community Standards" tab under repo Insights surfaces these files. Missing files fail the checklist.
| File | Source asset | Purpose |
|---|---|---|
README.md | (not scaffolded — repo has its own) | Surface check only |
LICENSE | (not scaffolded — choose-a-license decision) | Surface check only |
CODE_OF_CONDUCT.md | assets/CODE_OF_CONDUCT.md | Contributor Covenant 2.1 |
CONTRIBUTING.md | assets/CONTRIBUTING.md | How to file issues, open PRs, run tests |
SECURITY.md | assets/SECURITY.md | Vulnerability reporting (private advisory) |
.github/ISSUE_TEMPLATE/bug_report.yml | assets/.github/ISSUE_TEMPLATE/bug_report.yml | Structured bug form |
.github/ISSUE_TEMPLATE/feature_request.yml | assets/.github/ISSUE_TEMPLATE/feature_request.yml | Structured feature form |
.github/ISSUE_TEMPLATE/config.yml | assets/.github/ISSUE_TEMPLATE/config.yml | Disable blank issues, contact links |
.github/PULL_REQUEST_TEMPLATE.md | assets/.github/PULL_REQUEST_TEMPLATE.md | PR checklist |
For LICENSE: if missing, do not silently scaffold. License choice is a decision (MIT, Apache-2.0, AGPL-3.0, etc.) — surface the gap and link the user to https://choosealicense.com/.
For README: surface a missing-or-thin warning but do not auto-generate. README content is the project's voice.
Surface 2 — Supply chain (Scorecard checks)
OpenSSF Scorecard runs ~18 automated checks. The skill wires the ones that are scaffold-shaped:
| Scorecard check | Risk | Action |
|---|---|---|
Security-Policy | Medium | SECURITY.md (Surface 1) |
License | Low | LICENSE (Surface 1, surface only) |
Dependency-Update-Tool | High | assets/.github/dependabot.yml |
Branch-Protection | High | covered by /gh-bootstrap ruleset |
Code-Review | High | covered by /gh-bootstrap PR rule |
CI-Tests | Low | repo's existing CI |
Token-Permissions | High | audit existing workflows for permissions: blocks; report only |
Dangerous-Workflow | Critical | audit only — warn on pull_request_target + actions/checkout of head ref |
SAST | Medium | assets/.github/workflows/codeql.yml (when applicable) |
Pinned-Dependencies | Medium | report only — pinning is per-ecosystem and contentious |
Maintained | High | passive — emerges from real activity |
Binary-Artifacts | High | scan for .so, .dll, .jar, .exe, .zip, .tgz in tree; warn |
Vulnerabilities | High | passive — Dependabot alerts handle it |
Signed-Releases | High | report only — sigstore wiring is project-specific |
Fuzzing | Medium | report only — language-specific |
Packaging | Medium | report only — depends on release pipeline |
Contributors | Low | passive |
CII-Best-Practices | Low | Surface 3 |
Plus the GitHub-native Code Security features that don't go in repo files:
| Feature | How to enable | Action |
|---|---|---|
| Dependabot alerts | Repo Settings → Advanced Security (auto-on for public) | verify via API |
| Secret scanning alerts (for users) | Repo Settings → Advanced Security (free public, opt-in) | enable via API |
| Push protection (secret scanning) | Repo Settings → Advanced Security | enable via API |
| Dependency graph | Repo Settings → Security (auto-on for public) | verify via API |
| Dependency Review Action | assets/.github/workflows/dependency-review.yml | scaffold |
| Scorecard publishing | assets/.github/workflows/scorecard.yml | scaffold (uploads SARIF for the badge) |
Surface 3 — OpenSSF Best Practices Badge
The badge is self-attested at https://www.bestpractices.dev. The skill doesn't fill it out — the project owner has to. What the skill does:
- Checks whether the repo already has a badge (looks for the badge URL in README).
- Prints the registration link with the repo URL pre-filled.
- Suggests adding the badge markdown to README (
assets/README-badge-snippet.md).
The badge is a Scorecard CII-Best-Practices check enabler — registering even at the in-progress level is the lowest-effort way to bump that score.
Protocol
1. Confirm scope and inspect current state
gh auth status
gh repo view --json nameWithOwner,visibility,isPrivate,licenseInfo,description
gh api "repos/$REPO/community/profile" --jq '{
health_percentage,
files: (.files | to_entries | map(select(.value != null)) | from_entries | keys)
}'
gh api "repos/$REPO/vulnerability-alerts" 2>/dev/null && echo "dependabot alerts: ON" || echo "dependabot alerts: OFF"
gh api "repos/$REPO" --jq '{
secret_scanning: .security_and_analysis.secret_scanning.status,
push_protection: .security_and_analysis.secret_scanning_push_protection.status
}'
Ask the user — once, as a single consolidated question with all decisions inline. Do not prompt sequentially; the user should be able to reply "go with defaults" and have the skill proceed. Cap the list at the items below (≤5):
- Visibility — this skill is sized for public repos. Private repos can use a subset (community files yes, secret scanning needs Advanced Security, scorecard publishing needs public visibility for the badge).
- License — if
licenseInfois null, surface and stop until the user picks one. - CodeQL applicability — does the repo contain code in a CodeQL-supported language (
actions,c-cpp,csharp,go,java-kotlin,javascript-typescript,python,ruby,swift)? If not, skip the CodeQL workflow. Surface a recommendation, don't force a question when the only matches are CI-helper scripts (e.g..github/scripts/*.py) — those are not project code, and the default should be skip with the user opting in. - FUNDING.yml — does the user accept sponsorship? If yes, ask for platform + handle (GitHub Sponsors, Buy Me a Coffee, Ko-fi, OpenCollective, etc.).
- CODEOWNERS — only suggest when the repo has multiple maintainers. For solo, skip.
- Contact email — ask for the security/conduct reporting address. If the user gives none, do not write
CODE_OF_CONDUCT.mdorSECURITY.mdwith a literal{{CONTACT_EMAIL}}placeholder; stop and ask before scaffolding those two files.
2. Scaffold the community files
For each file under assets/, in order:
CODE_OF_CONDUCT.md
CONTRIBUTING.md
SECURITY.md
.github/ISSUE_TEMPLATE/bug_report.yml
.github/ISSUE_TEMPLATE/feature_request.yml
.github/ISSUE_TEMPLATE/config.yml
.github/PULL_REQUEST_TEMPLATE.md
Diff against the existing file (if present). If different, ask before overwriting. Substitute {{REPO}}, {{OWNER}}, {{CONTACT_EMAIL}} placeholders.
CONTRIBUTING.md includes a generic skeleton — encourage the user to project-specific-ize it after merge.
3. Scaffold the supply-chain workflows
| Asset | Target | When to skip |
|---|---|---|
assets/.github/dependabot.yml | .github/dependabot.yml | never (always useful) |
assets/.github/workflows/dependency-review.yml | .github/workflows/dependency-review.yml | private repo without Code Security |
assets/.github/workflows/scorecard.yml | .github/workflows/scorecard.yml | private repo (badge needs public) |
assets/.github/workflows/codeql.yml | .github/workflows/codeql.yml | repo has no CodeQL-supported language |
When scaffolding codeql.yml, substitute {{CODEQL_LANGUAGES}} in the language matrix with the CodeQL-supported languages detected in the repo (comma-separated, quoted, e.g. "python", "go").
dependabot.yml is configured with the language packages detected in the repo (look for package.json, Cargo.toml, pyproject.toml, go.mod, Gemfile, composer.json, pom.xml, etc.) plus a github-actions ecosystem entry to keep workflow action versions current.
Manifest detection scope. Only count manifests in project source roots — not under .github/scripts/, .devcontainer/, tools/ci/, or other CI-helper paths. A pyproject.toml under a project root is real; a hard-coded pip install foo==1.2.3 line in a workflow is not, and Dependabot can't track it without a real top-level manifest. When the only language presence is CI-helper code, skip that ecosystem and add a one-line comment in the generated dependabot.yml explaining why (e.g. "no top-level Python manifest; the only Python is in .github/scripts/"). This mirrors the same heuristic used for CodeQL applicability in step 1.
4. Toggle the GitHub-native security features
Use gh api to enable or verify (idempotent — re-applying is a no-op):
# Automated security fixes / Dependabot security updates
gh api -X PUT "repos/$REPO/automated-security-fixes"
# Vulnerability alerts (Dependabot alerts)
gh api -X PUT "repos/$REPO/vulnerability-alerts"
# Secret scanning alerts for users + push protection
gh api -X PATCH "repos/$REPO" \
-F security_and_analysis[secret_scanning][status]=enabled \
-F security_and_analysis[secret_scanning_push_protection][status]=enabled
# Private vulnerability reporting
gh api -X PUT "repos/$REPO/private-vulnerability-reporting"
If private vulnerability reporting cannot be enabled, require a real contact email from the user before writing SECURITY.md — do not fall back to a placeholder reporting channel.
For private repos these may 403 unless GitHub Code Security is paid for — surface and skip rather than fail.
5. Audit existing workflows for Token-Permissions and Dangerous-Workflow
This is detection, not modification. The skill reads each .github/workflows/*.yml:
- Token-Permissions: flag any workflow without a top-level
permissions:block (or withpermissions: write-all). Suggest the safe defaultpermissions: { contents: read }and bump only what each job needs. - Dangerous-Workflow: flag the unsafe pattern of
pull_request_target+actions/checkoutof the head SHA, and any${{ ... }}interpolation ofgithub.event.*inputs into shell scripts.
Print findings; don't auto-edit. These are subtle changes the user should review.
6. Surface the OpenSSF Best Practices Badge step
Print, don't apply. Substitute <owner>, <repo>, and the project ID once registered. Read assets/README-badge-snippet.md and strip the block between <!-- BEGIN-CODEQL --> and <!-- END-CODEQL --> markers when CodeQL was skipped in step 3 — the markers exist precisely so the snippet is conditionally trimmable without ambiguity.
Register at: https://www.bestpractices.dev/en/projects/new
Repo URL: https://github.com/<owner>/<repo>
Once you have a project ID, paste this into README.md:
[](https://scorecard.dev/viewer/?uri=github.com/<owner>/<repo>)
[](https://www.bestpractices.dev/projects/<id>)
The skill does not register the project for the user — registration is a credential and judgment step (the user attests answers).
7. Verify and report
Re-read the community profile and the workflow files. Print a small summary:
gh api "repos/$REPO/community/profile" --jq '{health_percentage, missing: ([.files | to_entries[] | select(.value == null) | .key])}'
gh api "repos/$REPO/private-vulnerability-reporting"
ls .github/workflows/ | sort
The summary should call out:
- What was scaffolded (and the diff vs existing if any)
- What was already correct (no-op)
- What was skipped and why (no LICENSE, private repo, no CodeQL languages, etc.)
- The OSSF badge registration link
Idempotency
- Files: diff before overwriting; ask if the content differs.
- API toggles:
PUT/PATCHare idempotent. - Workflow audit: read-only — re-running just re-prints the same findings.
- Never delete: if a previous run left an artifact (an old workflow with a different name), surface it and let the user decide.
What this skill is NOT for
- License selection — it surfaces the gap, doesn't pick one
- README authoring — content is the project's voice
- Org-wide community files — use
/safe-settingsfor that - Branch protection / merge queue — use
/gh-bootstrap - Sigstore release signing — language- and pipeline-specific, out of scope
- Filling out the OSSF Best Practices Badge questionnaire — that's the maintainer's attestation
- Pinning dependencies — per-ecosystem, often contentious
- Setting up fuzzing — language-specific
Gotchas
- Default community health files: if the user/org has a
.githubrepo with these files, they apply to every repo without its own copy. Scaffolding into a repo overrides the org default; only do it when per-repo overrides are intended. - Dependency Review Action: works on public repos for free, and on private repos only with GitHub Advanced Security. The workflow will hard-fail on private/free.
- Scorecard workflow: needs
id-token: writefor OIDC publishing to scorecard.dev; the asset has the right permissions. If the workflow fails on first run with a 403, the user has org-level OIDC restrictions. - CodeQL setup-mode:
defaultsetup is configured in the GitHub UI (Settings → Code security → CodeQL → Set up). The asset usesadvancedsetup (workflow file). The two are mutually exclusive — if the user enabled default first, the workflow file will conflict. - Token-Permissions audit: actions like
softprops/action-gh-releaseand many publish actions needcontents: write. Don't tell users to set every workflow to read-only — flag and explain. pull_request_targetis dangerous by default: don't use it just to access secrets in fork PRs. The skill flags it; the user should refactor to a separateworkflow_runor labeled-PR pattern.- OSSF badge is self-attested: a passing badge means the maintainer answered the questions, not that an audit happened. It's a signal, not a guarantee.
- Scorecard score on tiny / new repos: the
Maintainedcheck needs 90 days of activity; new repos will score low until they age in. This is a feature, not a bug. - Pinned workflow maintenance: the scaffolded workflows use reviewed commit SHAs. Dependabot can propose SHA refreshes with version comments; review those PRs before merging and keep the checksum or pin evidence current.
References
references/scorecard-checks.md— full table of all 18 Scorecard checks, what they measure, and remediation pointers.references/badge-criteria.md— OpenSSF Best Practices Badge Passing criteria mapped to repo artifacts.references/community-standards.md— GitHub's own checklist and how each file is detected.references/dependabot.md—dependabot.ymlschema reference and per-ecosystem examples.references/workflow-hardening.md— Token-Permissions and Dangerous-Workflow rules with concrete examples.
FAQ
What does the oss-hygiene skill do?
Bring an open-source GitHub repository up to community-standards and supply-chain hygiene baseline: scaffold the GitHub Community Standards files (README check, LICENSE, CODEOFCONDUCT, CONTRIBUTING, SECURITY, issue + PR templates), wire Dependabot version updates, the Dependency Review action, OpenSSF Scorecard, and CodeQL (when applicable), check Dependabot alerts and secret scanning, and add the OpenSSF Best Practices Badge link. Use when the user says "set up OSS hygiene", "make this repo open-source-ready", "add community health files", "wire dependabot", "add scorecard", "OSSF badge", "supply chain hardening", or invokes /oss-hygiene on a public repo. Idempotent — safe to re-run; diffs against templates and asks before overwriting. Distinct from /gh-bootstrap (merge-button + branch protection) and /safe-settings (org-scale settings as code): focuses on the contributor-facing and supply-chain surface, not merge or org policy. Run after /gh-bootstrap; before announcing the repo.
How do I install oss-hygiene?
Run npx skills add https://github.com/paulnsorensen/git-gouda --skill oss-hygiene in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/oss-hygiene/ (personal) or .claude/skills/oss-hygiene/ (project).
Which AI agents can use oss-hygiene?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is oss-hygiene safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains oss-hygiene?
It is published by paulnsorensen in paulnsorensen/git-gouda. It has 68 recorded installs.
More from paulnsorensen/git-gouda
config-review-bot
paulnsorensen/git-gouda
Audit or configure CodeRabbit repository review policy from effective sources. Use for CodeRabbit setup, configuration review, path coverage, or a specific pull-request review audit. Trigger on "configure CodeRabbit", "review .coderabbit.yaml", "set up CodeRabbit", "audit CodeRabbit settings", or "is CodeRabbit covering X". Keep audits read-only by default and separate schema validity, rule quality, and completed-review evidence. Do not use it to run a CodeRabbit CLI review or autofix, or to fix review comments on a pull request.
safe-settings
paulnsorensen/git-gouda
Set up GitHub's safe-settings (a Probot-based GitHub App from the github org) for declarative, org-wide repository policy as code. Use when the user says "settings as code", "safe-settings", "manage repos declaratively", "centralize repo settings", "org-level branch protection", "scaffold an admin repo", "github settings app", or invokes /safe-settings on an org that wants to manage repo settings, branch protection, rulesets, labels, teams, environments, and collaborators from one admin repo. Scaffolds the admin-repo layout (settings.yml + suborgs/ + repos/), the GitHub App installation steps, and a scheduled full-sync GitHub Actions workflow. Distinct from /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously. Not for per-task GitHub ops (PRs, issues, CI status) or local git work — those are out of this catalog's scope.
gh-bootstrap
paulnsorensen/git-gouda
One-time GitHub repository configuration via the gh CLI: lock the default branch with PR and CI rules, optionally enable a supported merge queue, lock merging to squash-only with PR-title commit messages, scaffold automatically-generated release notes (.github/release.yml), and optionally add a tag-driven release workflow. Use when the user says "set up the repo", "configure the merge queue", "enable squash merging", "lock down main", "set up branch protection", "configure release notes", "scaffold releases", "set up release tagging", or invokes /gh-bootstrap on a fresh or loosely-configured GitHub repository. Idempotent — safe to re-run on already-configured repos to bring missing pieces in line. This skill covers one-time repo policy, not per-task GitHub operations, local git commands, or project task running.
prek
paulnsorensen/git-gouda
Onboard prek (Rust-powered pre-commit) into any project and suggest hooks tailored to the language/framework. Use when the user says "add prek", "set up pre-commit hooks", "configure prek", "what hooks should I use", or when you notice a project without a prek.toml that would benefit from pre-commit checks. Also trigger when the user wants to add new hooks to an existing prek.toml, audit their hook config, or migrate from pre-commit to prek. Covers Rust, Python, TypeScript/JavaScript, Go, Ruby, and Shell projects. Do NOT use for husky, lint-staged, or CI pipeline hook configuration — this skill is specifically for prek.
github-copilot-repo-instructions
paulnsorensen/git-gouda
Add, audit, or fix GitHub Copilot repository custom instructions — .github/copilot-instructions.md (repo-wide) and .github/instructions/.instructions.md (path-specific) — so Copilot Chat, Copilot code review, and the Copilot coding agent all pick up project-wide guidance. Also covers AGENTS.md, CLAUDE.md, and GEMINI.md as alternate agent instruction files. Use when the user says "add Copilot instructions", "set up copilot-instructions.md", "audit our Copilot config", "make Copilot follow our conventions", "configure Copilot code review", "add path-specific Copilot rules", "applyTo glob", "excludeAgent", "Copilot is ignoring our guidance", or invokes /github-copilot-repo-instructions. Do NOT use for personal (per-user) Copilot instructions; those are out of scope for this skill. For AGENTS.md authoring guidance beyond file layout, see the agents-md skill.
branch-cleanup
paulnsorensen/git-gouda
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.