managing-agent-secrets

Installation
SKILL.md

Managing Agent Secrets

Overview

AI coding agents leak secrets. Not occasionally -- routinely. The mechanisms are predictable: an agent prints an API key for "debugging," commits a .env file, suggests a curl command with a bearer token inline, or writes a config file with real database credentials.

The problem is structural. Claude Code silently loads .env files into its context (documented by Knostic security research, January 2025). GitHub Copilot autocompletes credentials from training data patterns. Every AI coding tool that reads your project files has access to every secret in those files -- and no built-in restraint against repeating them.

The numbers confirm it. GitGuardian's 2024 report found a 40% increase in secrets exposure since AI coding tools became prevalent. Secrets in source code are the single most exploited attack vector in supply chain compromises. One leaked AWS key costs an average of $28,000 in unauthorized compute charges before detection.

This skill prevents secret leakage at the agent level. It defines what agents must never do with secrets, what they must always do instead, and how to detect violations before they reach a commit.

The Rules

These are non-negotiable. No exceptions for convenience, speed, or "just testing."

Installs
2
First Seen
Feb 18, 2026
managing-agent-secrets — chrbailey/agent-security-skills