Agent skill
secrets-guardian
Protect repositories from accidental secret commits. Essential when working with AI agents. Use when: setting up new project, adding pre-commit hooks, scanning for secrets, fixing leaked credentials. Triggers: "настрой защиту секретов", "setup secrets", "check secrets", "scan secrets", "проверь секреты", "pre-commit", "gitleaks". PROACTIVELY suggest when creating new projects or when .pre-commit-config.yaml is missing.
Install this agent skill to your Project
npx add-skill https://github.com/timequity/vibe-coder/tree/main/skills/secrets-guardian
SKILL.md
Secrets Guardian
Multi-layered protection against accidental secret commits. Critical for AI-assisted development where agents may not recognize sensitive data.
Quick Setup
For new projects, run this setup:
# 1. Check if pre-commit is installed
which pre-commit || pip install pre-commit
# 2. Copy pre-commit config from assets
# See assets/pre-commit-config.yaml
# 3. Create secrets baseline
echo '{"version": "1.5.0", "results": {}}' > .secrets.baseline
# 4. Install hooks
pre-commit install
pre-commit install --hook-type pre-push
# 5. Verify .gitignore has secret patterns
# See assets/gitignore-secrets
Commands
Setup Protection
When user says "настрой защиту секретов" or "setup secrets protection":
- Check existing setup:
ls -la .pre-commit-config.yaml .secrets.baseline .gitignore 2>/dev/null
-
If .pre-commit-config.yaml missing:
- Copy from
assets/pre-commit-config.yaml - Or add secret scanning hooks to existing config
- Copy from
-
Check .gitignore for secret patterns:
grep -E "\.env|\.key|API_KEY|secret" .gitignore
- If missing, append patterns from
assets/gitignore-secrets
- Create .secrets.baseline:
echo '{"version": "1.5.0", "results": {}}' > .secrets.baseline
- Install hooks:
pre-commit install
pre-commit install --hook-type pre-push
- Ask about CI/CD:
- "Добавить GitHub Actions workflow для проверки секретов в CI?"
- If yes, copy
assets/security-workflow.yamlto.github/workflows/
Scan for Secrets
When user says "проверь секреты" or "check secrets":
# Quick scan with gitleaks
gitleaks detect --no-git -v
# Detailed scan with detect-secrets
detect-secrets scan --all-files
Report findings and suggest fixes.
Fix Leaked Secret
When secret is detected:
-
Identify the secret type (API key, password, private key, etc.)
-
Suggest remediation:
- Move to
.envfile (ensure it's in .gitignore) - Use environment variable:
os.environ.get("API_KEY") - For false positives: update
.secrets.baseline
- Move to
-
If already committed:
- Rotate the credential immediately
- Consider git history cleanup (if not pushed)
- Warn about exposed secrets in git history
Update Baseline
For false positives, update the baseline:
detect-secrets scan --baseline .secrets.baseline
Proactive Checks
IMPORTANT: When working in any project, check for secret protection:
# Quick check
if [ ! -f .pre-commit-config.yaml ]; then
echo "WARNING: No pre-commit config found"
fi
If missing, ask user: "В проекте нет защиты от утечки секретов. Настроить?"
Reference Files
- Setup Guide - Detailed installation steps
- Tools Reference - gitleaks, detect-secrets, etc.
Asset Files
Copy these to project as needed:
assets/pre-commit-config.yaml- Pre-commit hooks configurationassets/gitignore-secrets- Patterns to add to .gitignoreassets/security-workflow.yaml- GitHub Actions CI workflow
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
mvp-help
Help and documentation for Idea to MVP plugin. Use when: user asks about building MVPs, vibe coding, or available commands. Triggers: "help", "what can you do", "mvp help", "how to build".
verification-gate
Hidden quality gate that runs before showing "Done!" to user - ensures all tests pass, build succeeds, and requirements met before claiming completion
brainstorming
Refine ideas into detailed designs through Socratic dialogue. Use when: user has rough idea, needs to clarify requirements, explore approaches. Triggers: "brainstorm", "discuss idea", "I'm thinking about", "what if", "help me think through", "explore options", "/brainstorm".
subagent-creator
Guide for creating effective subagents (custom agents). Use when users want to create a new subagent that can be dispatched via Task tool for autonomous work. Covers frontmatter fields (name, description, tools, model, permissionMode, skills), prompt design, and when to use subagents vs skills.
backend-rust
Modern Rust backend with Axum, SQLx, tokio + CI/CD automation. Use when: building Rust APIs, high-performance services, or needing build/test/lint/audit automation. Triggers: "axum", "rust backend", "rust api", "sqlx", "tokio", "cargo build", "cargo test", "clippy", "rustfmt", "cargo-audit", "cross-compile", "rust ci", "release build", "rust security", "shuttle", "actix".
test-driven-development
Write failing test first, then minimal code to pass. Red-Green-Refactor cycle. Use when: implementing features, fixing bugs, refactoring code. Triggers: "implement", "add feature", "fix bug", "tdd", "test first", "write tests", "test-driven".
Didn't find tool you were looking for?