From code-quality
Audit the repository for secrets files, `.env` files, and other sensitive files that should never be committed. Check
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-quality:check-secretsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Audit the repository for secrets files, `.env` files, and other sensitive files that should never be committed. Check
Audit the repository for secrets files, .env files, and other sensitive files that should never be committed. Check
both the current working tree and git history, then ensure every sensitive file pattern is covered by .gitignore.
Scan the working tree for sensitive files: Glob for common secrets file patterns across the entire project:
.env, .env.*, *.envsecrets.*, *secret*, *credentials*, *password**.pem, *.key, *.p12, *.pfx, *.jksid_rsa, id_ed25519, and other common private key namesconfig/secrets.*, config/credentials.*secrets, credentials, or token (with or without extension)Check git tracking: For each sensitive file found, run git ls-files <file> to determine if it is currently
tracked by git. Flag any tracked files as a critical finding.
Scan git history: Run git log --all --full-history -- '*.env' '*.pem' '*.key' '*secret*' '*credential*' (and
similar patterns) to detect if any secrets files were ever committed, even if later deleted. Report any historical
matches.
Read .gitignore: Read the root .gitignore (and any nested .gitignore files) to understand what is currently
excluded. Identify any sensitive file patterns found in steps 1–3 that are not covered.
Update .gitignore: For any sensitive patterns not already covered, append them to the root .gitignore with a
comment explaining why they are excluded. Do not duplicate entries that are already present.
Report findings: Summarize:
git rm --cached and a history rewrite)git filter-repo or BFG to scrub).gitignore (resolved)Offer to install a pre-commit hook: Ask the user if they would like a pre-commit hook installed to
automatically
block commits that add sensitive files in the future. If they agree:
.git/hooks/pre-commit already exists. If it does, read it and append to it rather than overwriting.git diff --cached --name-only) against the same sensitive patterns used in step 1#!/bin/sh) so it works without any external dependencieschmod +x .git/hooks/pre-commit..git/hooks/ is not committed to the repo, so teammates will need to install it separately —
suggest checking in a scripts/install-hooks.sh or using a tool like pre-commit if
team-wide enforcement is needed..gitignore.git rm --cached and that the secret may need to be rotated if the repo has ever been pushed to a remote.npx claudepluginhub mattbobambrose/mattbobambrose-claude-skills --plugin code-qualityChecks git repositories for sensitive data (credentials, API keys, PII) via full-scan or --diff mode for staged changes. Use before commit or for periodic audits.
Detects and remediates committed secrets and dev artifacts using git rm --cached, index audits, and credential rotation. Use when a repo has junk committed or to set up .gitignore rules.
Audits git repositories for committed secrets using Gitleaks: scans history, baselines false positives, configures rules, integrates with CI, and enforces no-secrets constraints.