.agents/skills/pr-prep-secret-guard/SKILL.md
Mandatory secret scanning before any git operation. MUST trigger automatically before git commit, git push, git add, PR creation, or any commit-related skill. Scans staged files for API keys, tokens, credentials, and other secrets to prevent accidental exposure in version control.
npx skillsauth add kissrosecicd-hub/agents-evolution secret-guardInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
MANDATORY: Run before ANY git commit, push, add, or PR operation.
Run these before proceeding with any git operation:
# Check for secret keywords in staged changes (skip removed lines)
git diff --cached | grep -iE '(client_secret|password|api[_-]?key|secret_key|private_key|token|bearer|credential)' | grep -v "^-" | head -20
# Check for long credential-like strings (base64, hex, Azure secrets with ~)
git diff --cached | grep -oE '[a-zA-Z0-9+/~]{35,}' | head -10
# Check config files specifically for secrets
git diff --cached -- '*.json' '*.yaml' '*.yml' | grep -iE '(secret|password|key|token)' | grep -v "^-" | head -10
# List staged files
git diff --cached --name-only
STOP and warn if any of these are staged:
.env, .env.* — Never commit.claude/settings.json — Often contains embedded secrets*.pem, *.key, *.p12, *.pfx — Private keyscredentials.json, secrets.json, auth*.json, *token*.json**/config/*.json — May contain hardcoded credentials| Pattern | Identifier |
|----------------------|-----------------------------------------|
| Azure AD secrets | Contains ~ (e.g., Pl~8Q~abc...) |
| AWS Access Keys | Starts with AKIA |
| GitHub tokens | Starts with ghp_, gho_, ghs_ |
| API keys | Prefixes: sk-, pk-, api_ |
| JWT tokens | Starts with eyJ |
| Base64 secrets | 40+ alphanumeric chars |
BLOCK the git operation immediately.
Response format:
🚨 SECRET DETECTED - BLOCKING COMMIT
Found in: <filename>
Pattern: <what was found>
REQUIRED ACTIONS:
1. Remove the secret from the file
2. Use environment variables instead
3. If already committed: rotate the credential immediately
Proceed with commit? (only after user confirms false positive)
After successful commit without pre-commit hooks installed:
"Consider adding a pre-commit hook for automatic secret scanning."
tools
KISS reference skill for v2rayA on Arch/Ubuntu/Fedora with TUN, RoutingA, DoH DNS and Outline key import.
testing
Identifies dependencies at heightened risk of exploitation or takeover. Use when assessing supply chain attack surface, evaluating dependency health, or scoping security engagements.
development
Run Semgrep static analysis scan on a codebase using parallel subagents. Supports two scan modes — "run all" (full ruleset coverage) and "important only" (high-confidence security vulnerabilities). Automatically detects and uses Semgrep Pro for cross-file taint analysis when available. Use when asked to scan code for vulnerabilities, run a security audit with Semgrep, find bugs, or perform static analysis. Spawns parallel workers for multi-language codebases.
development
Identifies error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes. Use when reviewing API designs, configuration schemas, cryptographic library ergonomics, or evaluating whether code follows 'secure by default' and 'pit of success' principles. Triggers: footgun, misuse-resistant, secure defaults, API usability, dangerous configuration.