secret-guard

Scan staged and tracked Git files for API keys, tokens, and private keys.

9|1|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/ControlNet/oma-dotfile --skill secret-guard-controlnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-guard
Source: https://github.com/ControlNet/oma-dotfile/tree/main/skills/secret-guard
Command: npx skills add https://github.com/ControlNet/oma-dotfile --skill secret-guard-controlnet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Detect secrets and credentials before they leak into git by scanning code for sensitive data.

Core Features & Use Cases

  • Scans staged and tracked files for secrets and credentials (e.g., API keys, tokens, passwords, private keys).
  • Provides actionable findings and remediation guidance to prevent exposure.
  • Supports an audit workflow for .gitignore coverage and secure development practices.

Quick Start

Scan your repository for secrets before committing to catch leaks early.

Frequently Asked Questions about secret-guard

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

FAQPage Schema
How do I scan my repository for secrets before committing to git?

A pre-commit secret scanner checks staged or tracked files using rules-based pattern matching to detect sensitive credentials like API keys and tokens before they enter your git history.

What types of credentials can a pre-commit secret detection tool identify?

Pre-commit secret detection tools identify sensitive credentials such as API keys, tokens, passwords, and private keys by scanning file content using rules-based pattern matching against staged git files.

Can I use a Python standard library scanner to audit git security without external dependencies?

Yes, you can use a Python standard library scanner to audit git security without external dependencies, running file- and content-based checks on staged or tracked files to detect exposed credentials.

Does secret detection work on already tracked files or only staged changes?

Secret detection works on both staged changes and already tracked files, scanning all relevant content in the repository to catch sensitive credentials during code reviews and security audits.

What is the best way to prevent API keys and tokens from leaking into git workflows?

The best way to prevent API keys and tokens from leaking into git workflows is implementing pre-commit secret detection with rules-based pattern scanning, verifying .gitignore coverage, and reviewing actionable remediation guidance.

Why should I run a code audit for sensitive credentials instead of just relying on .gitignore?

You should run a code audit for sensitive credentials because .gitignore only prevents future tracking, whereas a secret scanner actively detects existing API keys and tokens in staged or tracked files and provides remediation guidance.