secret-handling

Prohibit agents from reading secret files and prevent credential leakage.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill secret-handling-jperezdelreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/jperezdelreal/GymBro/tree/main/.copilot/skills/secret-handling
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill secret-handling-jperezdelreal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Never read .env files or expose live credentials; this skill enforces safe secrets handling to prevent credential leaks and accidental exposure in logs, decisions, or history.

Core Features & Use Cases

  • Prohibits reading .env, .env.local, and other secret files, replacing them with safe placeholders or .env.example references.
  • Recommends safe alternatives and prompts user for needed config details, ensuring credentials are never written to committed files.
  • Validates commits to prevent secret leakage in .squad/ and logs, with remediation guidance.

Quick Start

Configure the agent to never read real secrets and to rely on placeholders or example files for configuration.

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 .env files and leaking credentials?

To prevent credential leaks, you can configure agents to never read real .env files directly. This ensures live credentials are never exposed in logs, decisions, or history by relying on safe placeholders.

What is the best way to keep live secrets out of committed repository files?

The best way to keep secrets out of committed files is to prohibit reading real .env files and replace them with .env.example references. This prompts users for needed config details while ensuring credentials are never written to committed files.

How do I validate commits to block secret leakage in CI workflows and automation tasks?

You can validate commits by applying pre-commit checks that block secrets from being written to .squad/ directories and logs. This provides remediation guidance to prevent credential leakage across CI workflows and automation tasks.

Does this credential safeguarding approach work across repository access and CI pipelines?

Yes, this secret handling approach applies across repository access, CI workflows, and automation tasks. It enforces safe secrets handling by requiring safe placeholders and pre-commit checks to keep live secrets confidential.

Why should I use .env.example files instead of reading real .env files for configuration?

You should use .env.example files because reading real .env files risks accidental credential exposure. Safe placeholders ensure configuration details are provided by the user without writing live secrets into committed files or agent history.

What happens when a secret is accidentally written to the .squad/ directory?

When a secret is accidentally written to .squad/, pre-commit validation checks detect the secret leakage and provide remediation guidance. This prevents the credential exposure from persisting in committed files or logs.