agentleFS
coffee-man666coffee-man666/dsh-lens/skills/publish-screen/SKILL.md

publish-screen

Skill0 starsChanged 3 months agoMITView on GitHub

Screen a repository for sensitive information before or after making it public: tracked content, file and directory paths, git history, identity terms, credential patterns; fix by scrubbing, fresh-history rebuild, or going private.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    test-fixture personas (/Users/alice, example.com URLs)

    line 29
  2. Very specific:

    Publishing an export: never push a working tree.

    line 40

≈ “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

Publish Screen

A clean working tree proves nothing. Public exposure covers tracked content, file and directory names, and every historical commit — three separate surfaces, each needing its own proof. Screen all of them before making a repository public, and again after any bulk import of artifacts (session logs, generated reports, workspace dumps), which are the usual leak carriers.

Scan procedure (all four steps, in order)

  1. Tracked content — git grep over the index (not the filesystem, which drags in node_modules and scratch files):
    • credential patterns: sk-…, ghp_…, github_pat_…, AKIA…, AIza…, xox[bap]-…, glpat-…, sk-ant-…, long Bearer …
    • identity terms: the operator's username(s), real name, personal email domains (gmail/outlook/qq/163/icloud)
    • absolute home paths: /Users/<name>, /home/<name>
  2. Tracked paths — git ls-files | grep the identity terms. Directory names encode data too: session stores and caches often normalize the working directory into the path itself, and content-only scrubs leave the directory name behind.
  3. History — git log --all -p | grep the same patterns. Deleted files, earlier versions, and force-push survivors are all publicly readable by SHA until rewritten; count git rev-list --all --count first to know what a rewrite would cost.
  4. Fork scoping — for forks of upstream projects, re-run the scan restricted to your own commits (git log --all -p --author=<you>). Upstream test fixtures and paths in upstream commits are upstream's content, not your leak; your exposure is only the commits you added.

False-positive triage

A hit is real only if it names the operator or carries a working credential. Common benign hits:

  • placeholder fixtures: sk-xxx…, AKIAIOSFODNN7EXAMPLE, alphabet keys, redactSecrets tests
  • npm/pnpm lockfile sha512-… integrity hashes (match base64-ish credential patterns)
  • test-fixture personas (/Users/alice, example.com URLs)
  • .env.example files and docs telling users where to put keys
  • product names that happen to contain a username fragment

Fix procedures

  • Content: scrub with sed across tracked text files (e.g. /Users/<name> → ~), commit.
  • Paths: git mv the directories to neutral names; verify with git ls-files again.
  • History (own small repos): rebuild as a fresh single-commit history and force-push, then verify old SHAs return 404. Viable when every commit is yours and recent.
  • History (shared or large repos): git filter-repo targeted at the affected files, or a GitHub Support purge request; coordinate with collaborators before rewriting.
  • Emergency containment: gh repo edit <repo> --visibility private --accept-visibility-change-consequences FIRST, then clean, then republish. Making a repo private also unpublishes GitHub Pages on free plans.
  • Publishing an export: never push a working tree. git archive <branch> | tar -x into a fresh repository, commit under a noreply identity (<id>+<login>@users.noreply.github.com), screen the fresh tree once more, then publish.

Rules

  • Screen before first publication and after every bulk artifact import; re-screen the whole repo when adding generated content.
  • Clean tree, clean paths, clean history are three independent proofs — report all three counts, never one as a summary of the others.
  • Fixes that rewrite history or flip visibility need the owner's explicit go-ahead; report findings with per-repo fix options instead of acting unilaterally.
  • Record what was scanned (patterns, scopes, exclusions) wherever the scan result is claimed, so a "clean" verdict is auditable.

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.