secret-handling

Prohibit reading live environment files and writing secrets to committed artifacts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spawned agents have read access to the entire repository, including .env files containing live credentials. This skill codifies absolute prohibitions and safe alternatives to prevent credential leakage and accidental exposure in committed artifacts.

Core Features & Use Cases

  • Prohibits live secret reads: Never read production or local environment files like .env*
  • Safe alternatives: Prefer .env.example, .env.sample, or .env.template for schema and structure
  • Guided interactions: Ask the user for sensitive details when needed instead of peeking at secrets, and enforce redaction and placeholder usage in outputs
  • Pre-commit safeguards: Validate staged content to block secret leakage and surface remediation steps before commit

Quick Start

Configure agents to refuse reading live environment files and always use placeholders or .env.example for configuration when secrets are required.

Frequently Asked Questions about secret-handling

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

FAQPage Schema
How do I prevent credential leakage from .env files when using AI agents?

Preventing credential leakage requires prohibiting agents from reading live environment files like .env and enforcing safe alternatives like .env.example for configuration schemas.

What is the best way to stop secrets from being committed to my repository?

The best way to stop secret leakage is implementing pre-commit validation that scans staged content to block credentials and surfaces remediation steps before the commit finalizes.

How do pre-commit safeguards detect and block secret leakage in staged files?

Pre-commit safeguards work by validating staged content to detect embedded secrets, blocking the commit automatically, and surfacing specific remediation steps to remove the leaked credentials.

Should I use .env.example instead of .env files for agent configuration?

Yes, you should use .env.example, .env.sample, or .env.template instead of .env files to provide configuration structure and schema without exposing live credentials to spawned agents.

Can AI agents safely access a repository containing live production secrets?

Agents can safely access repositories with live secrets only if governed by prompt policies that prohibit reading environment files, enforce redaction, and require asking users for sensitive details.

What are the limitations of relying on prompt governance for security policy enforcement?

Relying solely on prompt governance lacks technical enforcement, so pre-commit secret validation is required to block committed artifacts and guarantee credential leakage prevention meets security requirements.