secret-guard

Scan staged git changes for sensitive patterns before commits.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/klemensms/mcp-consultant-tools --skill secret-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-guard
Source: https://github.com/klemensms/mcp-consultant-tools/tree/main/.claude/skills/pr-prep-secret-guard
Command: npx skills add https://github.com/klemensms/mcp-consultant-tools --skill secret-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mandatory secret scanning before any git operation to prevent accidental exposure of keys and credentials in version control.

Core Features & Use Cases

  • Scans staged changes for common secret patterns (keys, tokens, credentials) before commits, pushes, or PRs.
  • Provides high-risk file detection and actionable remediation guidance.
  • Use Case: A developer attempts to commit a file containing an API key; the guard blocks the operation and reports the finding.

Quick Start

Run Secret Guard automatically before any git operation to block secrets from being committed.

Frequently Asked Questions about secret-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent secrets from being committed to git?

To prevent secrets from being committed to git, you need mandatory secret scanning that intercepts git commit, push, add, or PR creation operations and blocks them when sensitive patterns are detected.

What is pre-commit secret detection in DevSecOps?

Pre-commit secret detection in DevSecOps is the process of scanning staged changes for sensitive keywords, credential-like strings, and secret tokens before they enter version control to prevent accidental exposure of keys.

Can I use secret scanning to block git push and PR creation in CI?

Yes, you can use secret scanning to block git push and PR creation across typical development workflows, including CI triggers, by operating before these git operations execute to intercept sensitive patterns.

How do I scan staged changes for API keys and credentials?

You scan staged changes for API keys and credentials by running automated secret detection before git commit, which identifies high-risk files and credential-like strings then provides actionable remediation steps.

What happens when a secret is found in staged git changes?

When a secret is found in staged git changes, the guard blocks the git operation from completing and reports the finding by providing high-risk file detection and actionable remediation guidance to resolve the issue.

Does secret scanning work automatically before every git operation?

Yes, secret scanning works automatically before git commit, push, add, or PR creation operations, intercepting the workflow to detect sensitive keywords and secret tokens without requiring manual intervention.