mgiovani/cc-arsenal/skills/env-setup/SKILL.md
env-setup
Scans a codebase for environment variable usage to generate or sync .env.example, validate .env completeness against what the code actually reads, and detect leaked secrets in .env or git history. Use for "/env-setup", "update .env.example", "sync .env.example with the codebase", "check if .env has everything it needs", "is .env in .gitignore", or "scan for leaked secrets in .env". Not a full security audit (use review-security for OWASP-level scanning) and not a generic secret-rotation or CI-se
- Source repository stars
- 6
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Scan the codebase for environment variable usage, generate or update .env.example, validate .env completeness, and detect leaked secrets.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/mgiovani/cc-arsenal --skill "skills/env-setup"Inspect the Agent Skill "env-setup" from https://github.com/mgiovani/cc-arsenal/blob/410f2649860bb1892ee8c66721f57462eeefcf13/skills/env-setup/SKILL.md at commit 410f2649860bb1892ee8c66721f57462eeefcf13. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
Grep for environment variable usage matching the project's actual language/framework: see references/scan-patterns.md for the ready-to-run pattern per language (Node/TS, Python, Ruby, Rust, Java/Kotlin, Docker Compose, client-exposed prefixes). Only run the pattern(s) for stacks…
.env.example (existing entries to preserve)config/ directory for config files referencing env varsFramework config files (next.config.js, vite.config.ts, etc.) - 02
Phase 1: Scan Codebase
Grep for environment variable usage matching the project's actual language/framework: see references/scan-patterns.md for the ready-to-run pattern per language (Node/TS, Python, Ruby, Rust, Java/Kotlin, Docker Compose, client-exposed prefixes). Only run the pattern(s) for stacks…
.env.example (existing entries to preserve)config/ directory for config files referencing env varsFramework config files (next.config.js, vite.config.ts, etc.) - 03
Phase 2: Categorize Variables
Group discovered variables by prefix/service: see the service prefix table in references/scan-patterns.md for the standard groupings (Database, Cache, Auth, OAuth, Stripe, AWS, Email, App config, Client vars).
Required vs Optional (required if no default/fallback in code)Secret vs Config (secret if it contains key/secret/password/token in name)Client-exposed (NEXTPUBLIC, VITE: flag if contains secrets) - 04
Phase 3: Compare with .env.example
Read existing .env.example (if it exists):
Read existing .env.example (if it exists): - 05
Phase 4: Generate / Update .env.example
For scan or sync operations:
SCREAMINGSNAKECASE variable namesGrouped by service (with section comments)Placeholder values for secrets, real defaults for config
Permission review
Static risk signals and limitations
Reads files
The documentation asks the agent to read local files, directories, or repositories.
Scan the codebase for environment variable usage, generate or update `.env.example`, validate `.env` completeness, and detect leaked secrets.Reads files
The documentation asks the agent to read local files, directories, or repositories.
**Verify .gitignore**: Actually read the file before claiming `.env` is ignoredRuns scripts
The documentation asks the agent to run terminal commands or scripts.
git log --all --full-history --diff-filter=A -p -- .env 2>/dev/null | grep -iE "(password|secret|key)\s*=" | head -20Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 84/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 6 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- mgiovani/cc-arsenal
- Skill path
- skills/env-setup/SKILL.md
- Commit
- 410f2649860bb1892ee8c66721f57462eeefcf13
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Env Setup
Scan the codebase for environment variable usage, generate or update .env.example, validate .env completeness, and detect leaked secrets.
Anti-Hallucination Guidelines
Only report variables that are actually found in the code:
- Grep before reporting: Never invent variable names; only list what grep actually returns
- Read .env.example before writing: Preserve existing entries; only add/update what changed
- No actual secrets:
.env.examplemust only contain placeholder values (e.g.,your_api_key_here) - Verify .gitignore: Actually read the file before claiming
.envis ignored - Never echo a found secret value: when Phase 6 flags a leaked secret, report the variable name and
file:lineonly. Never print, quote, or write the actual value into chat output, a report file, or anywhere else: the scan's job is to locate leaks, not to create a second one.
Workflow
Phase 1: Scan Codebase
Grep for environment variable usage matching the project's actual language/framework: see references/scan-patterns.md for the ready-to-run pattern per language (Node/TS, Python, Ruby, Rust, Java/Kotlin, Docker Compose, client-exposed prefixes). Only run the pattern(s) for stacks present in the repo.
Also scan:
.env.example(existing entries to preserve)config/directory for config files referencing env vars- Framework config files (
next.config.js,vite.config.ts, etc.)
Phase 2: Categorize Variables
Group discovered variables by prefix/service: see the service prefix table in
references/scan-patterns.md for the standard groupings (Database, Cache, Auth, OAuth,
Stripe, AWS, Email, App config, Client vars).
Classify each variable:
- Required vs Optional (required if no default/fallback in code)
- Secret vs Config (secret if it contains key/secret/password/token in name)
- Client-exposed (
NEXT_PUBLIC_*,VITE_*: flag if contains secrets)
Phase 3: Compare with .env.example
Read existing .env.example (if it exists):
# Variables in code but NOT in .env.example (missing)
# Variables in .env.example but NOT in code (undocumented/stale)
# Variables in both (up to date)
Report:
- Missing vars (need to be added to
.env.example) - Stale vars (in
.env.examplebut no longer used) - Up-to-date vars
Phase 4: Generate / Update .env.example
For scan or sync operations:
Generate .env.example with:
- SCREAMING_SNAKE_CASE variable names
- Grouped by service (with section comments)
- Placeholder values for secrets, real defaults for config
- Type and description comments
# =============================================================================
# Database
# =============================================================================
DATABASE_URL=postgresql://user:password@localhost:5432/app_development
JWT_SECRET=your_jwt_secret_here # openssl rand -hex 32
Full section-header style and rules (preserve existing entries, only add what's missing,
never a real value), see references/env-example-template.md, load it when writing the
actual file.
Phase 5: Validate .env (if validate subcommand or .env exists)
Read .env and check:
- Missing required variables: Every variable in code without a default/fallback must be set
- Empty values:
VAR=with no value is suspicious for required vars - Stale variables: Present in
.envbut not found in codebase scan .gitignorecheck: Verify.env(and.env.local) are in.gitignore
grep -E "^\.env" .gitignore 2>/dev/null
Warn clearly if .env is NOT in .gitignore.
Phase 6: Secret Detection (if --check-secrets)
Scan .env for high-entropy strings and known secret patterns:
# Check for common secret patterns
grep -iE "(password|secret|api_key|private_key|token|auth_key)\s*=\s*['\"]?[A-Za-z0-9+/_.=-]{16,}" .env 2>/dev/null
The character class includes _, -, . alongside base64's +/=: most real key formats
(sk_live_..., xoxb-..., AKIA...) contain underscores or hyphens, and a base64-only class
silently misses them.
Check git history for leaked secrets:
git log --all --full-history --diff-filter=A -p -- .env 2>/dev/null | grep -iE "(password|secret|key)\s*=" | head -20
Report each hit as a commit + file:line reference (e.g. git log output line, or
.env:12), never paste the matched value itself into the report.
Flag client-exposed secrets:
- Check
NEXT_PUBLIC_*,VITE_*,REACT_APP_*variables - If any contain "secret", "key", "password", "token" in the name, warn loudly, by variable name only
Recommend pre-commit tools:
detect-secrets(Python):pip install detect-secrets && detect-secrets scan > .secrets.baselinegitleaks:gitleaks detect --source=.
Argument Parsing
scan(default): Scan codebase, generate/update.env.examplevalidate: Validate.envagainst discovered variablessync: Sync.env.exampleto match current codebase (add missing, mark stale)--check-secrets: Enable secret detection in.envand git history
Important Notes
- Never include real secrets in
.env.example: only placeholder values - Never echo a found secret's value: report variable name +
file:lineonly, whether the finding goes to chat or a report file - Client-exposed vars (
NEXT_PUBLIC_*,VITE_*) are bundled into the frontend: flag if their name suggests a secret .envmust be gitignored: verify and warn if not- Historical leaks matter: even if
.envis gitignored now, it may have been committed in the past - Stale variables in
.envcan be security risks: document and remove unused ones
Alternatives
Compare before choosing
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
migrate-vstest-to-mtp
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
HKUDS/Vibe-Trading
strategy-generate
Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.