# Secrets Guard: Safe AI Vibe-Coding

> Hardens AI-built apps with secret protection, gitleaks automation, and a 30-point production launch gate.

Secrets Guard: Safe AI Vibe-Coding is a free AI agent skill on Agensi by Penny Dinh, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Penny Dinh](https://www.agensi.io/creators/pennydinh)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/secrets-guard-safe-ai-vibe-coding
- Tags: security, llm-ops, devops, api, code-review

## About this skill

Shipping an AI-built app often leads to accidental API key leaks in chat history, exposed `.env` files on GitHub, and insecure payment logic. This skill implements a rigorous security protocol for developers using AI agents like Claude Code or Cursor to build and deploy software. It moves beyond generic advice by enforcing a specific set of rules that prevent sensitive data from ever entering the model's context while ensuring the final product is hardened against common web vulnerabilities.

### What it does
- **Secret Management** prevents API keys from being pasted into chat by creating local entry pages or secure terminal prompts.
- **Automated Scanning** runs `gitleaks` before every commit and push to ensure no secrets enter the git history.
- **Infrastructure Hardening** configures HTTPS, security headers, and VPS firewalls while ensuring databases are never exposed to the public internet.
- **Payment Verification** enforces server-side signature checks for Stripe and PayOS webhooks to prevent order spoofing.
- **Deployment Safety** separates code from data to prevent redeploys from wiping out user uploads or databases.

### How it works
1. **Setup Phase** initializes `.gitignore`, gitleaks hooks, and GitHub Actions for continuous secret scanning.
2. **Development Phase** manages key entry through a local `127.0.0.1` page to keep values out of logs and chat history.
3. **Audit Phase** executes the "Gate 1" checklist on localhost to verify auth, IDOR protection, and input sanitization.
4. **Deploy Phase** runs the "Gate 2" checklist on the live domain to confirm SSL, security headers, and closed ports.

### Frameworks & tools
Supports Claude Code, Cursor, and standard terminals. Uses gitleaks, pre-commit hooks, and GitHub Actions. Compatible with Railway, Hostinger, and standard VPS environments.

### Why this beats prompting it yourself
Standard prompts often fail to prevent the model from printing secrets to the logs or suggesting insecure "quick fixes" like client-side price handling. This skill provides a rigid execution framework that requires the agent to run specific terminal commands to prove security before marking a task as complete.

### Use cases
- Auditing a project before the final handover to a client.
- Securely connecting Stripe, Telegram, or OpenAI APIs without leaking keys.
- Hardening a new VPS for a production launch.
- Recovering and cleaning a repository after a secret has been committed.

### Known limitations
Does not provide automated DDoS mitigation. Cannot prevent physical access to the user's machine. Requires local installation of gitleaks for full commit protection.

## Requires

- Python
- Git

## 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 Secrets Guard: Safe AI Vibe-Coding skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill prevent AI agents from accidentally leaking my API keys?

The Secrets Guard enforces a rigid protocol that prevents sensitive keys from ever entering the model's chat history or logs, and uses automated hooks to block accidental commits of exposed credentials.

### Which AI agents and development environments are compatible with this skill?

This skill is designed for use with terminal-based agents like Claude Code, as well as AI-powered IDEs like Cursor and standard CLI environments.

### What specific assets are included in the purchase?

You receive the core security execution framework, the 'Gate 1' and 'Gate 2' production checklists, and pre-configured automation scripts for gitleaks and GitHub Actions.

### Do I need to switch my hosting provider to use this security protocol?

No, this skill is designed to work with your existing workflow on platforms like Railway, Hostinger, or any standard VPS by hardening the infrastructure you already use.

### What is the difference between the Audit and Deploy phases?

The Setup Phase initializes local environment protections and git hooks, while the Audit and Deploy phases use a 30-point checklist to verify the app is hardened before and after it goes live.

---

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.
