Skip to content
Back to skills

Secrets Guard

ASecurity

Secrets guard rules. Use when a task involves IPs, SSH, database or API endpoints, domains, .env files, passwords, tokens or keys, when you see {{PLACEHOLDER}} names, or when a Gatekeeper hook blocks a message or tool call.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 3, 2026
securitypythongobashtestinggitapidatabase

Works with

  • claude code
  • terminal
  • api
  • mcp

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add loverobusta/claude-gatekeeper-plugin --skill secrets-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Secrets Guard?

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

Security grade badge for Secrets Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loverobusta-secrets-guard/badge)](https://www.skillsdirectory.com/skills/loverobusta-secrets-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: secrets-guard
description: Secrets guard rules. Use when a task involves IPs, SSH, database or API endpoints, domains, .env files, passwords, tokens or keys, when you see {{PLACEHOLDER}} names, or when a Gatekeeper hook blocks a message or tool call.
user-invocable: false
---

# Secrets guard

You see credentials only as placeholders (`{{SERVER_IP}}`, `{{DB_HOST}}`, `{{ENDPOINT}}`). Real values stay in `.gatekeeper/vault.json` on the user's computer. Hooks block messages that contain credentials before you see them, and deny tool calls that would read secret files.

## Rules

1. **Write placeholders everywhere:** code, docs, commits, commands, replies. Keep the rest of a URL visible (`https://{{ENDPOINT}}/v1/orders`). The user sees your reply with real values on their screen, so don't ask them to replace placeholders by hand.
2. **Never ask for, guess, decode or print a real value.** If one is missing, the user stores it in their own terminal: `python3 .gatekeeper/vault.py set NAME` (typed hidden). Then use it as `{{NAME}}`.
3. **Never read** `.env`, `.env.*`, `*.env` (except `.example` and `.template`), anything in `.gatekeeper/` other than running `vault.py`, `*.revealed.*`, files written by `render`, credential files (`credentials.json`, `service-account.json`, keys, `.pem`) or `gatekeeper.rules`. Don't run `env`, `printenv` or `export -p`, and don't read whole folders that hold secret files (`grep -r .`, `find -exec`, `tar`, `cp -r`); use `git grep` / `git ls-files` or exclude the files. The hook checks every tool (MCP tools too), every part of a command, `bash -c`/`eval` strings, globs and symlinks, so don't try other routes.
4. **Never type a real value** into a command or a file you write. Use `{{NAME}}`; the hook denies raw IPs, tokens, credential URLs and vault values in Bash commands and in Write/Edit content.
5. **Run commands that need secrets** through the runner. Output comes back masked:
   `python3 .gatekeeper/vault.py run -- "ssh deploy@{{SERVER_IP}} 'systemctl status app'"`
   Values are also exported as env vars: use `"$DB_PASSWORD"` for values with quotes or `$`.
6. **Config files:** to set one value in `.env`: `python3 .gatekeeper/vault.py envset MONGODB_URI 'mongodb://{{DB_HOST}}:27017/app'`. For more, edit a template with placeholders, then `python3 .gatekeeper/vault.py render .env.template .env`. For an existing `.env`, `python3 .gatekeeper/vault.py import .env` writes `.env.template`.
7. **If a real value appears anyway:** don't repeat it, use a placeholder from then on, and tell the user once that the AI saw it (suggest `set`, and rotating it if it's a password, token or key). If it landed in a file, run `python3 .gatekeeper/vault.py mask FILE`.
8. **If the user asks to see a real value** ("what's the DB host?"): don't look it up. Answer with the placeholder and say that real values are never shown to you. They see them with `#guard-reveal`, or by running `python3 .gatekeeper/vault.py list` in their own terminal. For that reply the screen shows placeholders too.
9. Before finishing a doc or config, run `python3 .gatekeeper/vault.py scan FILE` and fix what it reports.

## The user's switches (never change these yourself)

- **What's guarded per project:** IPs, private IPs, RDS and database endpoints, URL endpoints and SSH targets, domains, and secrets. Well-known public sites and `localhost` aren't guarded.
- **"X isn't secret":** tell the user to send a message starting with `#guard-allow X`. A plain message containing X would itself be blocked. `#guard-protect domains off` switches off a whole category.
- **Guard off or on:** `/gatekeeper:disable`, `/gatekeeper:enable`. Testing real API calls doesn't need the guard off: `vault.py run` uses the real values on the user's computer.
- `set`, `reveal`, `last`, `remove`, `rules`, `allow`, `unallow`, `protect`, `mode`, `showreal`, `autoreveal`, `harden` and `disable` are for the user only: the hook denies them and they refuse to run without the user's terminal (`disable` runs only right after the user's own `/gatekeeper:disable`). You can't write inside `.gatekeeper/`, the plugin's files or Claude Code's settings files either.
- If the user wants stronger protection, suggest they run `python3 .gatekeeper/vault.py harden --sandbox` in their terminal. The organisation's rules file (`gatekeeper.rules`) is off-limits too: if the user asks you to change what's blocked, tell them to run `python3 .gatekeeper/vault.py rules add KIND PATTERN` themselves.
- If the guard is off, still never copy real credentials into files or commits.

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.