/reports-sanitizer:gitignore-auditfrom reports-sanitizer
Audits the .gitignore of a git repo. Lists the files and folders git does not ignore but should (env files, keys, credentials, logs, editor litter, dependency and build output, caches, *_dev scratch folders, untracked files holding a secret) as a numbered list, and appends only the patterns the user picks by number. Use when a repo may commit private or generated files, or when the .gitignore needs a check. Trigger with "audit the gitignore", "what should be gitignored", "check .gitignore".
Ships in reports-sanitizer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
gitignore_audit.py finds files that git does not ignore (tracked, and untracked-not-ignored) that belong to a private or generated class, plus untracked files in which the vendored secrets-shield scanner finds a secret. It prints one numbered row per pattern to add. The user chooses by number; nothing is written without an answer. It reads and writes only the .gitignore of the target repo and never touches the git index.
--repo PATH, or the current folder.uv run --no-project "${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py" [--repo PATH]. Exit 3 means the list is not empty; exit 0 means "nothing to add", stop there.all, 1,3,5-7, !2,4). Wait for the answer. Never apply without an answer.--repo and flags as step 1 so the numbers match, the list id from the last line of step 1 as --expect, and the answer always in single quotes (an unquoted ! is history expansion in zsh and bash): uv run --no-project "${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py" [--repo PATH] --apply '<answer>' --expect <list id>. Exit 2 with "the list changed" means the repo changed since step 1: go back to step 1. Report the appended lines.git rm --cached -- <path> lines, those files are already tracked and ignoring them does not untrack them. Show the lines and ask a second time whether to run them. Run each line (in the repo) only if the user confirms; the script never runs them.--json prints the list as JSON; --no-secret-scan skips the scanner.N. pattern [class] matches: k TRACKED - reason; a TRACKED row has a second indented line saying that adding the pattern will not untrack its files; the last line is list id: <id>. Control, bidi and zero-width characters in file names are shown escaped. --json prints {"repo", "list_id", "candidates": [{"number", "pattern", "class", "reason", "matches", "tracked", "tracked_matches"}]}.--apply: the lines appended to .gitignore, then the git rm --cached lines for chosen patterns that match tracked files. A pattern already in .gitignore is never duplicated. The secret check never prints a value, only the path and the kind.Exit codes: 0 nothing to add (list) or applied, 1 git, file or scanner error, 2 usage error (a bad --apply value, --json with --apply, --expect without --apply, or an --expect id that differs from the fresh list: the repo changed since the list was shown, so list it again and ask again), 3 candidates exist. A selection is all, numbers and ranges to include (1,3,5-7), or one ! followed by numbers and ranges to leave out (!2,4); words, a mix of included and left-out items, 0, a number above the list size and a reversed range are usage errors and nothing is written.
# List what the .gitignore of the current repo misses
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py"
# Add rows 1, 3 and 5 to 7
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py" --apply '1,3,5-7'
# Add everything except rows 2 and 4 (single quotes: the ! must not reach the shell)
uv run --no-project "${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py" --apply '!2,4'
${CLAUDE_PLUGIN_ROOT}/gitignore_audit.py: the script; its class table is the CLASS_TABLE constant.${CLAUDE_PLUGIN_ROOT}/shield_scan_cli.py: the scanner wrapper used for the secret check.${CLAUDE_PLUGIN_ROOT}/tests/test_gitignore_audit.py: the tests.What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
Other plugins' skills for the same job
reports-sanitizer@emasoft-plugins is listed by emasoft/emasoft-plugins — review the source before installing
npx claudepluginhub emasoft/emasoft-plugins --plugin reports-sanitizer