secret-handling

Prevent agents from reading secret files and writing secrets to .squad directories.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/lbouriez/Squad-Templates --skill secret-handling-lbouriez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/lbouriez/Squad-Templates/tree/main/Nectari-Devops-Squad/.copilot/skills/secret-handling
Command: npx skills add https://github.com/lbouriez/Squad-Templates --skill secret-handling-lbouriez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Agents spawned in squads have access to the entire repository, including secret files containing live credentials. If an agent reads secrets and writes them to .squad/ files (decisions, logs, history), Scribe auto-commits them to git, exposing them in remote history. This skill codifies absolute prohibitions and safe alternatives.

Core Features & Use Cases

  • Prohibits reading secret files such as env files and promotes safe placeholders like env.example, env.sample, and env.template.
  • Provides escalation and remediation guidance for secret exposure, including pre-commit validation and redaction strategies.
  • Guides teams on when to ask users for credentials and how to reference schema documentation instead of reading live secrets.

Quick Start

Enforce a no-secret-read policy for agents and guide safe configurations using placeholder environment 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 leaking secrets into git history?

Preventing AI agents from leaking secrets into git history requires blocking agent access to secret files and preventing writes to .squad directories. This skill enforces no-secret-read policies, promotes placeholder files like env.sample, and adds pre-commit validation to catch exposures before commit.

Why does my code generation agent write credentials to squad logs?

Code generation agents write credentials to squad logs because they have full repository access and read live secret files. Without explicit prohibition lists and safe alternatives, agents copy secrets into .squad/ files which Scribe auto-commits to remote git history.

How to set up pre-commit validation for secret scanning in repositories?

Setting up pre-commit validation for secret scanning in repositories involves integrating Scribe pre-commit hooks with regex-based scanning. This skill provides explicit prohibition lists and redaction strategies to validate staged files and block credential leakage before it reaches remote history.

Does this secret handling approach work with automation squads using env files?

Yes, this secret handling approach works with automation squads using env files by guiding safe configurations across contexts. It prohibits reading live env files, promotes env.template placeholders, and provides escalation guidance for credential exposure remediation.

What is the best way to manage environment credentials for AI code generation squads?

The best way to manage environment credentials for AI code generation squads is enforcing placeholder environment files and schema documentation references. This skill guides teams on when to ask users for credentials and how to reference schemas instead of reading live secrets.

When should I not allow agents to read environment files in repositories?

You should not allow agents to read environment files in repositories when they contain live credentials that could be written to .squad/ files and auto-committed. This skill enforces absolute prohibitions on reading secrets and provides remediation guidance for exposure incidents.