agentleFS
martin0nemartin0ne/claude-skills/skills/repo-publish-audit/SKILL.md

repo-publish-audit

Skill0 starsChanged 5 months agoMITView on GitHub

Use before making any git repository public — gh repo create --public, gh repo edit --visibility public, first push to a public remote, or sharing a repo/portfolio link externally. Runs a deterministic secret/PII pre-scan plus an agentic multi-dimension audit (secrets, PII, confidential/client data, git history, hygiene, professionalism, licensing) with adversarial verification, then returns a per-repo SAFE-TO-PUBLISH / FIX-FIRST verdict with concrete remediation. Treat it as a hard gate — never push or flip a repo to public without running it first. Auto-invoke on keywords like "opublikuj repo", "wystaw na GitHub", "zrób publiczne", "publish repo", "make public", "portfolio repo", "wrzuć na githuba", "upewnij się że nic poufnego".

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the bundled scanner against every candidate repo.

    line 22
  2. Very specific:

    Run the bundled Workflow script via the Workflow tool, passing absolute repo paths as args.

    line 32
  3. Very specific:

    Read references/audit-checklist.md before judging — it defines the 7 dimensions and severities.

    line 38
  4. Very specific:

    Missing .gitignore: add one covering .DS_Store, .env, __pycache__/, data/cache dirs, venvs.

    line 58
  5. Distinctive:

    Missing LICENSE: add an appropriate one (MIT for code, CC BY 4.0 for docs/frameworks) — absence reads as unfinished to a recruiter.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Repo Publish Audit

Overview

Gate that prevents confidential, embarrassing, or unprofessional content from reaching a public repository, and confirms each published repo reads as portfolio-grade work. Once a repo is public on GitHub, anything in it — including content deleted from HEAD but still in git history — is effectively permanent (cloned, cached, indexed). This skill is the sanity check before that irreversible, outward-facing step.

Serves two goals at once: protect (no secrets/PII/client data leak) and polish (license + clean README + no debug junk), because a public repo often doubles as a portfolio artifact that others will judge.

Core principle

Public is forever, and git history is part of "public". A clean working tree is not enough — a secret committed three commits ago and removed is still exposed once pushed. Audit the tree AND the history. When in doubt, treat a finding as a BLOCKER until proven safe (adversarial default).

Workflow — 4 steps

Step 1 — Deterministic pre-scan (fast, high-signal)

Run the bundled scanner against every candidate repo. It greps tracked files AND full git history for secret/PII patterns, lists .env/key files, dumps .dvc/config (local remotes leak home paths + macOS username), and reports .gitignore / LICENSE / .DS_Store status.

bash scripts/scan_secrets.sh <repo-path> [<repo-path> ...]

The pre-scan catches high-signal cases but produces false positives (CSS in HTML, token variables, lockfile URLs) and misses judgment calls. It is the floor, not the verdict.

Step 2 — Agentic audit (judgment, per repo, adversarially verified)

Run the bundled Workflow script via the Workflow tool, passing absolute repo paths as args. It spawns one auditor per repo across the 7 dimensions, then an adversarial verifier per BLOCKER (confirms true-positive / kills false-positive), then synthesizes a per-repo verdict.

Workflow({ scriptPath: "<this-skill>/scripts/audit_workflow.js", args: ["/abs/repo1", "/abs/repo2"] })

Read references/audit-checklist.md before judging — it defines the 7 dimensions and severities. The judgment calls a grep cannot make:

  • Is a "sample"/example file genuinely synthetic, or real client/employer data wearing a sample's name?
  • Is an email/name an intentional public business contact, or leaked personal PII?
  • Does prose leak internal strategy, pricing, client identities, or employer-confidential material?
  • Does the README/commit history read as professional, or expose half-finished/embarrassing notes?

Severities: BLOCKER (must fix before publish) · WARN (should fix, professionalism) · OK.

Step 3 — Report + remediate

Present findings grouped by repo, BLOCKER first, each with a one-line remediation. Apply fixes (see cheatsheet). Re-run Step 1 to confirm BLOCKERs are gone.

Step 4 — Publish only on green + explicit human go

Publishing is outward-facing and hard to reverse. Even after a green audit, get the user's explicit go-ahead before gh repo create --public / visibility flip / push. Never auto-publish.

Remediation cheatsheet

  • Home-path / username leak in .dvc/config (/Users/<name>/... local remote): remove the local remote or replace with a placeholder — a local-path DVC remote is useless to cloners anyway.
  • Secret in git history (not just HEAD): git filter-repo --replace-text / --invert-paths to purge across all commits, then rotate the leaked credential regardless.
  • Missing .gitignore: add one covering .DS_Store, .env, __pycache__/, data/cache dirs, venvs.
  • Missing LICENSE: add an appropriate one (MIT for code, CC BY 4.0 for docs/frameworks) — absence reads as unfinished to a recruiter.
  • Real data in "samples": replace with synthetic data, or remove.

Resources

  • scripts/scan_secrets.sh — deterministic pre-scan (Step 1).
  • scripts/audit_workflow.js — agentic multi-repo audit Workflow (Step 2).
  • references/audit-checklist.md — the 7 audit dimensions, severities, and judgment guidance.

Notes

  • Complements (does not replace) security-review, which hunts code vulnerabilities; this skill answers the narrower "is it safe and professional to make THIS repo public".
  • Intended to run as a mandatory pre-publish gate in any workflow where repos go public.

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.