secret-handling

Prevent agents from reading .env files and writing secrets to .squad/ files.

3|5|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/ronniegeraghty/hyoka --skill secret-handling-ronniegeraghty
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/ronniegeraghty/hyoka/tree/main/.agents/skills/secret-handling
Command: npx skills add https://github.com/ronniegeraghty/hyoka --skill secret-handling-ronniegeraghty

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents currently may read environment secrets from files like .env and inadvertently write secrets to .squad/ committed files, risking credential leakage and exposure in git history. This skill codifies strict prohibitions and safe alternatives to prevent such leakage.

Core Features & Use Cases

  • Prohibited File Reads: NEVER read files such as .env, .env.local, .env.production, .env.development, .env.staging, .env.test, or any .env.* unless explicitly allowed; use .env.example, .env.sample, or .env.template for schema and testing.
  • Prohibited Output Patterns: Prevent secrets from appearing in .squad/ decisions, logs, or history; replace with placeholders and redact sensitive content.
  • Safe Guidance & Validation: Enforce user prompts to ask for credentials or read from safe placeholders; includes pre-commit validation to block commits containing secrets.

Quick Start

Enable the secret-handling policy by activating this skill in your agent workflow to prevent reading .env files and writing secrets to .squad/ committed files.

Frequently Asked Questions about secret-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent AI agents from reading environment secrets from .env files?

To prevent AI agents from reading environment secrets, you enforce strict prohibitions on .env file access. This skill blocks agents from reading .env files and guides them to use safe placeholders like .env.example instead.

How do I stop secrets from being committed to code repository history?

To stop secrets from being committed to code repository history, you enforce pre-commit validation. This skill blocks commits containing credentials and prevents secrets from appearing in committed files.

What is the best way to redact sensitive content in automated agent workflows?

The best way to redact sensitive content in automated agent workflows is to replace secrets with placeholders. This skill prevents secret exposure in logs and history by enforcing safe alternatives and redaction.

Can I use .env.example files for schema and testing without exposing credentials?

Yes, you can use .env.example files for schema and testing without exposing credentials. This skill explicitly allows reading .env.example, .env.sample, or .env.template while blocking actual .env files.

How do I enforce safe credential handling policies in automated code repositories?

To enforce safe credential handling policies in automated code repositories, you apply strict rules on agent file access. This skill codifies prohibitions on secret file reads and enforces pre-commit validation to block credential exposure.