# Secret Guard: Keep API Keys and Passwords Out of Your Agent

> Stops your coding agent from reading or repeating API keys, tokens and passwords. Secrets show up as [REDACTED] instead.

Secret Guard: Keep API Keys and Passwords Out of Your Agent is a paid AI agent skill on Agensi by Nicolas Fernando, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Nicolas Fernando](https://www.agensi.io/creators/nikolaz)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/secret-guard-keep-api-keys-and-passwords-out-of-your-agent
- Tags: security, api, devops, privacy, secrets, redaction, claude-code

## What it does

- Detects 30+ key formats: Anthropic, OpenAI, AWS, GitHub, Stripe, Slack, JWTs, private keys and more
- Catches passwords in URLs, secrets in query strings, and assignments like password = "..."
- Flags random-looking tokens with no known prefix, while leaving branch names, paths and hashes alone
- Scans a project before you commit and lists file and line for each finding, never the value
- Runs offline as one Python file, standard library only, with nothing sent anywhere
- Includes a self-test you can run in one command

## Who it's for

- **Developers who use AI coding agents:** Keep the keys in your .env files out of chat logs, transcripts and commits. Try: "Show me which settings are in my .env file, but hide the values."
- **Freelancers working on client projects:** Work on client configs without your agent seeing or repeating their credentials. Try: "Show me the settings in docker-compose.yml but hide any passwords."
- **Open source maintainers:** Catch a leaked key before it reaches a public repository. Try: "Scan this project for secrets before I commit."

## About this skill

secret-guard makes your agent read credentials only through a redacting filter. It works with .env files, .npmrc, AWS credentials, config files and command output. The agent still sees variable names and structure, but never the values.

- Detects 30+ key formats: Anthropic, OpenAI, AWS, GitHub, GitLab, Stripe, Slack, Google, Hugging Face, JWTs, private keys and more
- Catches passwords in URLs, secrets in query strings, and assignments like password = "..."
- Flags random-looking tokens with no known prefix, while leaving branch names, paths and hashes alone
- Scans a project before you commit and lists file and line for each finding, never the value
- One Python file, standard library only, works offline, nothing sent anywhere
- Includes a self-test you can run in one command

Detection uses patterns and heuristics, so treat it as a safety net. It won't catch a short password typed with no variable name.

## Requires

- Python

Runs locally. Nothing to install beyond Python, and nothing is sent over the network.

## Known limitations

It may miss very short passwords or unique internal tokens that don't follow common patterns. It cannot hide what you have already typed into the chat box.

## Technical details

This skill uses a Python 3 script (secret_guard.py) to process text via regex patterns and entropy checks. It handles specific files like .env, .npmrc, and .aws/credentials by piping them through a redactor. It includes a scan mode for CI/CD or pre-commit checks and can be integrated into CLI workflows to filter stdout. It does not require external API calls and works entirely on the local file system.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Secret Guard: Keep API Keys and Passwords Out of Your Agent skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent my private keys from being seen by an AI?

The skill tells your agent to read credential files and risky command output only through a bundled redacting script. The script swaps each secret for a label like [REDACTED:GitHub token], so the agent can still help with your settings without seeing the values. It works through the agent following these rules, so treat it as a safety net.

### What kind of secrets can it actually find?

This skill recognizes over 30 specific types of credentials, including those for AWS, GitHub, Stripe, and OpenAI. It also catches passwords found in website addresses and secret values assigned to variables in your code.

### Do I need any special software or accounts to run this?

You only need Python 3.8 or newer on your system. The skill uses a built-in script that works offline and does not require you to sign up for any extra services or install additional software libraries.

### How do I tell my AI agent to use this protection?

You can tell your agent to use the redacting tool before it opens any configuration file or runs a system command that might show sensitive settings. You can also ask it to scan your entire project folder for hidden secrets before you share or publish your code.

### Are there any types of passwords this skill might miss?

It cannot hide text that you type yourself directly into the chat. It also might miss very short passwords or unusual internal tokens that do not follow standard patterns, so you should still treat it as a safety net rather than a perfect guarantee.

### Can the AI agent try to bypass the filter to see the original password?

The skill instructs the agent never to undo a redaction or look up a hidden value another way (reading the file raw, cat, grep, echo). If a task truly needs the value, the agent asks you to supply it through an environment variable at run time.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
