agentleFS
jeremymcsjeremymcs/skills/github-repo-hygiene/SKILL.md

github-repo-hygiene

Skill8 starsChanged 6 months agoMITView on GitHub

Audit and improve GitHub repository hygiene using evidence from local files, package manifests, dependency metadata, and GitHub settings. Use when the user asks for best practices, repo cleanup, repository hygiene, project health, package.json or dependency hygiene, monorepo health, npm/package publishing readiness, GitHub setup, maintainer readiness, contribution workflow, security posture, CI checks, issue or PR templates, branch protection, Dependabot, CodeQL, licensing, release readiness, or open-source/private repository governance.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 16 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants a repository to be easier to maintain, safer to collaborate on, clearer for contributors, and less …

    line 10
  2. Distinctive:

    Default stance: repo hygiene is contextual.

    line 12
  3. Very specific:

    Read README, package manifests, project docs, existing .github/ files, CI config, release config, security files, and recent git history.

    line 30
  4. Distinctive:

    If GitHub access is available, inspect repo metadata, default branch, open PRs/issues, branch protection, actions, security alerts, …

    line 31
  5. Distinctive:

    Run package hygiene automation when applicable.

    line 40
  6. Very specific:

    If the repo contains package.json, run:

    line 41
  7. Very specific:

    Use --json when another tool or report needs structured findings.

    line 47
  8. Very specific:

    Use --strict only when the user wants warnings to fail the check.

    line 48
  9. Distinctive:

    Treat import-scan findings as heuristics.

    line 49
  10. Very specific:

    Use Must fix for broken setup, unsafe defaults, missing critical checks, exposed secrets, misleading docs, or blocked collaboration.

    line 51
  11. Very specific:

    Use Should fix for maintainability gaps that will create recurring friction.

    line 52
  12. Very specific:

    Use Nice to have for polish, optional community files, or scale-dependent process.

    line 53
  13. Distinctive:

    Prefer minimal repo-native changes over generic templates.

    line 57
  14. Distinctive:

    Avoid adding process that the repo cannot realistically maintain.

    line 58
  15. Distinctive:

    Ask before changing license, branch policy, package ownership, security posture, release strategy, contributor governance, or dependency …

    line 62
  16. Distinctive:

    Run available checks relevant to changed files.

    line 64
  17. Distinctive:

    If GitHub settings were inspected but not changed, state the access limits and manual steps.

    line 67
  18. Distinctive:

    Do not recommend generic open-source files for every repo.

    line 108
  19. Distinctive:

    Do not silently change licenses, branch protections, repository visibility, release policy, or governance rules.

    line 109
  20. Distinctive:

    Do not treat badges, templates, or workflows as healthy unless they point to working commands and current project reality.

    line 110
  21. Distinctive:

    Do not remove dependencies from import-scan evidence alone.

    line 111
  22. Distinctive:

    Do not hide unavailable GitHub access.

    line 112
  23. Distinctive:

    Do not credit any AI for generated docs, templates, or recommendations.

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Repo Hygiene

Use this skill when the user wants a repository to be easier to maintain, safer to collaborate on, clearer for contributors, and less likely to drift in package or dependency configuration.

Default stance: repo hygiene is contextual. Verify the repo's purpose before recommending public open-source defaults, enterprise controls, or heavy process.

Bundled Tools

  • scripts/audit_package_hygiene.mjs: Audit Node package manifests, workspace declarations, lockfiles, dependency sections, local package links, entry points, lifecycle scripts, and simple import/dependency mismatches. Run it before manual package/dependency recommendations when a repo has package.json files.

Success Criteria

  • The audit covers local repository files and GitHub-hosted settings when accessible.
  • Package and dependency findings are backed by manifest, lockfile, or import-scan evidence.
  • Findings are evidence-backed and prioritized by risk, not preference.
  • Recommendations are concrete, small, and appropriate for the repo's size, audience, and activity.
  • Policy-sensitive changes are proposed clearly before editing.

Workflow

  1. Establish repo context.
    • Identify whether the repo is private, public, package/library, app/service, template, docs-only, archived, or experimental.
    • Read README, package manifests, project docs, existing .github/ files, CI config, release config, security files, and recent git history.
    • If GitHub access is available, inspect repo metadata, default branch, open PRs/issues, branch protection, actions, security alerts, releases, and topics.
  2. Inventory hygiene surfaces.
    • Documentation: README, setup, usage, architecture notes, troubleshooting, changelog, license, support, security policy, code of conduct when appropriate.
    • Contribution flow: CONTRIBUTING, issue templates, PR template, labels, discussions, ownership, review expectations.
    • Automation: CI, test/lint/typecheck/build jobs, status checks, release automation, stale workflows, scheduled maintenance.
    • Security: secret scanning, Dependabot, CodeQL or language-appropriate scanning, dependency review, least-privilege workflow permissions, pinned actions, secret handling docs.
    • Package and dependency hygiene: package.json, workspace declarations, lockfiles, package manager metadata, dependency sections, peer dependency patterns, local package links, lifecycle scripts, package entry points, publish metadata, and stale or missing dependency signals.
    • Governance: branch protection, required reviews, required checks, CODEOWNERS, merge strategy, release/versioning policy, archival signals.
    • Repository cleanliness: ignored files, generated artifacts, dead config, duplicate docs, broken links, misleading badges, stale TODOs, missing examples, unclear scripts.
  3. Run package hygiene automation when applicable.
    • If the repo contains package.json, run:

      node github-repo-hygiene/scripts/audit_package_hygiene.mjs <repo-path>
    • Use --json when another tool or report needs structured findings.
    • Use --strict only when the user wants warnings to fail the check.
    • Treat import-scan findings as heuristics. Confirm them from source before editing dependencies.
  4. Classify findings.
    • Use Must fix for broken setup, unsafe defaults, missing critical checks, exposed secrets, misleading docs, or blocked collaboration.
    • Use Should fix for maintainability gaps that will create recurring friction.
    • Use Nice to have for polish, optional community files, or scale-dependent process.
    • Mark anything unverified instead of assuming.
  5. Recommend fixes.
    • Tie every recommendation to evidence and impact.
    • Prefer minimal repo-native changes over generic templates.
    • Avoid adding process that the repo cannot realistically maintain.
    • For GitHub settings that cannot be changed from files, provide exact setting names and suggested values.
  6. Edit only when asked or clearly in scope.
    • Safe file edits include templates, docs, Dependabot config, workflow permission tightening, and obvious broken references.
    • Ask before changing license, branch policy, package ownership, security posture, release strategy, contributor governance, or dependency removals based only on heuristic import scans.
  7. Verify.
    • Run available checks relevant to changed files.
    • Validate YAML and Markdown links when possible.
    • Re-run audit_package_hygiene.mjs after package, dependency, workspace, or lockfile edits.
    • If GitHub settings were inspected but not changed, state the access limits and manual steps.

Output Format

## Repo Hygiene Report

Scope: local files only | local files + GitHub settings
Repo type:
Confidence: High | Medium | Low

### Findings

| Priority | Finding | Evidence | Recommendation |
| --- | --- | --- | --- |
| Must fix/Should fix/Nice to have | What is wrong or missing | File, command, GitHub setting, or observation | Specific fix |

### Recommended Changes

1. Highest-impact change
   - Why:
   - Files/settings:
   - Verification:

### Changes Made

- File or setting changed, if any.

### Verification

```bash
commands run
```

### Limits

- Anything not inspected, inaccessible, or intentionally deferred.

Guardrails

  • Do not recommend generic open-source files for every repo. Match the repo's audience and lifecycle.
  • Do not silently change licenses, branch protections, repository visibility, release policy, or governance rules.
  • Do not treat badges, templates, or workflows as healthy unless they point to working commands and current project reality.
  • Do not remove dependencies from import-scan evidence alone; confirm dynamic imports, CLIs, config files, generated code, and peer dependency requirements first.
  • Do not hide unavailable GitHub access. Report whether the audit covered local files only or GitHub settings too.
  • Do not credit any AI for generated docs, templates, or recommendations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.