sanitize-envrc

Generate a sanitized .envrc.sample and git-ignore .envrc.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/doesitscript/dotfile-vnext --skill sanitize-envrc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sanitize-envrc
Source: https://github.com/doesitscript/dotfile-vnext/tree/main/.cursor/skills/sanitize-envrc
Command: npx skills add https://github.com/doesitscript/dotfile-vnext --skill sanitize-envrc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing secrets in project environment files (.envrc) can expose sensitive data if committed or shared; this skill creates a sanitized .envrc.sample and ensures .envrc is git-ignored.

Core Features & Use Cases

  • Reads the project .envrc and identifies secret variables by name patterns (KEY, SECRET, TOKEN, PASSWORD, etc.).
  • Produces a sanitized .envrc.sample with secrets replaced by obvious placeholders.
  • Ensures the repository ignores .envrc to prevent accidental commits and helps new projects bootstrap securely.

Quick Start

Run this skill at the repository root to generate a safe .envrc.sample and ensure .envrc is ignored.

Frequently Asked Questions about sanitize-envrc

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

FAQPage Schema
How do I sanitize a .envrc file before committing to git?

To sanitize a .envrc file before committing, this skill reads the file, identifies secret variables by name patterns like KEY or TOKEN, and generates a .envrc.sample with placeholders. It also ensures .envrc is added to .gitignore to prevent accidental exposure.

What is the best way to generate a sample .envrc file without exposing secrets?

The best way to generate a sample .envrc file safely is by using a sanitization process that detects common secret names and replaces their values with obvious placeholders, ensuring new projects can bootstrap securely without leaking sensitive configuration data.

How does secret detection work for environment configuration files?

Secret detection for environment configuration files works by scanning variable names for patterns such as SECRET, TOKEN, KEY, and PASSWORD. When matches are found, the actual values are substituted with obvious placeholders in the output file.

Can I automatically add .envrc to .gitignore to prevent accidental commits?

Yes, you can automatically add .envrc to .gitignore to prevent accidental commits. This skill checks the repository's .gitignore and updates it when needed, ensuring your environment configuration is ignored by version control.

Does this sanitization tool work with any dotenv variable naming convention?

This sanitization tool targets common secret variable naming conventions like KEY, SECRET, TOKEN, and PASSWORD. It scans these patterns within your .envrc file to accurately identify which values require placeholder substitution.

Why should I use a .envrc.sample file instead of committing my .envrc?

You should use a .envrc.sample file because committing a .envrc file risks exposing sensitive data like API keys and passwords. A sanitized sample provides the required structure for team members without sharing actual secret values.