Skip to content
Back to skills

Secret Guard

ASecurity

Use when reviewing changes or committing ANY code in this project — prevents leaking secrets and sensitive information to git/GitHub. Pairs with the deterministic gitleaks pre-commit gate.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
securitygoawsgcpgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add oioio-space/unpixel --skill secret-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Secret Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Secret Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oioio-space-secret-guard/badge)](https://www.skillsdirectory.com/skills/oioio-space-secret-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: secret-guard
description: Use when reviewing changes or committing ANY code in this project — prevents leaking secrets and sensitive information to git/GitHub. Pairs with the deterministic gitleaks pre-commit gate.
---

# Secret Guard

Goal: **nothing sensitive ever reaches git history / GitHub.** Two layers:

- **Deterministic** — `gitleaks git --staged` runs in the git `pre-commit` hook
  (`mise run scan:secrets:staged`) and blocks the commit on a regex/entropy match.
  Full history is re-scanned in CI (`mise run scan:secrets`).
- **AI review (this skill)** — when you (Claude) are about to `git commit`, the
  PreToolUse hook injects this checklist so you confront the staged diff against the
  things regex misses (internal hostnames, PII, private URLs, unknown token shapes).

## What counts as a leak — review the staged diff for:

- **Credentials & keys**: API keys/tokens, passwords, `Authorization:` headers,
  private keys (`-----BEGIN ... PRIVATE KEY-----`), `.pem`/`.p12`, SSH keys,
  cloud creds (AWS `AKIA…`, GCP service-account JSON), DB connection strings with
  passwords, OAuth client secrets, JWTs, webhook signing secrets.
- **Config that should be local**: `.env` files, `*.local.*`, credential files,
  `kubeconfig`, `.netrc`, `.npmrc` with `_authToken`.
- **Internal/PII**: real internal hostnames/IPs, private endpoints, customer data,
  emails, names, phone numbers, account IDs in fixtures or logs.
- **Accidental inclusions**: pasted terminal output containing tokens, debug dumps,
  build artifacts, `dist/`, coverage files with embedded data.

## How to act

1. Run `git diff --cached` and scan for the categories above.
2. If you find a secret: **do not commit.** Remove it, move it to an env var /
   secret manager, and add the file to `.gitignore`. If it was a real credential
   that already touched the working tree, treat it as compromised → rotate it.
3. For false positives in gitleaks, add a scoped allowlist to `.gitleaks.toml`
   (never disable scanning wholesale) or a `.gitleaksignore` entry with a comment.
4. Prefer placeholders in examples: `ghp_xxx`, `<API_KEY>`, `password=REDACTED`.

## Notes

- The deterministic gate uses `--redact`, so matched secrets are not printed back.
- This skill is a safety net for what gitleaks can't pattern-match; it does not
  replace the gate. Both run before every commit.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.