secret-handling

Scan staged files for secrets and block commits containing sensitive data.

3.1k|475|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/bradygaster/squad --skill secret-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: secret-handling
Source: https://github.com/bradygaster/squad/tree/main/.squad/skills/secret-handling
Command: npx skills add https://github.com/bradygaster/squad --skill secret-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the accidental exposure of sensitive credentials and PII by enforcing strict rules on reading secret files and writing sensitive data to version-controlled files.

Core Features & Use Cases

  • Prohibits reading sensitive files: Blocks access to .env and similar files containing live credentials.
  • Restricts output of secrets: Prevents agents from writing API keys, passwords, or PII to .squad/ files that get committed.
  • Enforces pre-commit validation: Scribe scans staged files for secrets before allowing a commit, blocking and alerting on violations.
  • Guides remediation: Provides clear instructions if secrets are found in git history.

Quick Start

Use the secret-handling skill to ensure no sensitive data is committed to the repository.

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 and leaking secrets in my codebase?

To prevent AI agents from leaking secrets, enforce security policies that strictly block reading local development files like .env and restrict credentials from being written into version-controlled files. This ensures sensitive data remains isolated during automated codebase interactions.

How do I scan staged files for committed secrets and prevent accidental exposure?

To scan staged files for secrets, use pre-commit git hooks that automatically check file contents for sensitive patterns before allowing a commit. This validates staged changes and blocks violations by alerting on detected credentials or PII.

What is the best way to stop credentials from being written to version-controlled files?

The best way to stop credentials from entering version-controlled files is to restrict output paths, preventing AI agents from writing passwords or PII into the .squad/ directory. This enforces data protection by blocking sensitive output at the source.

How do I remediate historical data leaks if secrets are already in my git history?

To remediate historical data leaks, follow structured remediation steps provided by the secret-handling policy to safely purge exposed credentials from git history. This guides you through removing sensitive patterns from prior commits to secure your repository.

Does this secret-handling approach work with local development environment files?

Yes, this approach explicitly works with local development environment files by strictly prohibiting agents from reading .env files containing live credentials. This prevents accidental exposure of local secrets during AI-assisted coding sessions.

Can I enforce compliance and AI safety policies for secrets management automatically?

Yes, you can enforce compliance and AI safety policies automatically by applying pre-commit validation hooks that scan for secret patterns. This restricts AI agents from accessing sensitive files and blocks unauthorized commits, ensuring continuous data protection.