env-manager
Skill1 starsChanged 13 months agoApache-2.0View on GitHub
PROACTIVELY use when environment variables are missing, scripts fail with "environment" or "variable not set" errors, or tasks require configuration (testing, API calls, deployment). Intelligently detects missing variables, finds .env files in project, analyzes formats (shell/simple/fish), and provides exact shell-specific commands to load configuration. Supports bash, zsh, fish. Use automatically at task start for any work requiring environment setup.
- Reads credentials
3 other projects use a version of this.
Adopted by
Most recently taken up by
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
- laolaoshiren/claude-code-skills-zhtheir own version, first seen Jul 2, 2026
- thoitiettxl-cyber/Claw-IItheir own version, first seen Apr 3, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- laolaoshiren/claude-code-skills-zh★ 907same name
- nek1987/auto-agent-harness★ 4same name
- thoitiettxl-cyber/Claw-II★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- app-runnerSkill
- delegateSkill
- lexical-recall-guardSkill
- narrative-inventorySkill
- narrative-keywordsSkill
- narrative-mapsSkill
- obsidian-apiSkill
- obsidianSkill
- project-indexerSkill
- skill-api-conversionSkill
- skill-creatorSkill
- skill-distillSkill
- slipbox-integrationSkill
- story-structure-22-step-apiSkill
- story-structure-22-step-distilledSkill
- story-structure-22-stepSkill
- story-structure-7-stepsSkill
- story-structure-crime-distilledSkill
- story-structure-crimeSkill
- story-structure-myth-distilledSkill
- story-structure-mythSkill
- symbol-webSkill
- webapp-testingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 140
Respect user's shell choice: - don't assume bash
- Distinctive: line 141
Don't modify environment files: - only read and suggest
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Environment Manager
This skill provides intelligent environment variable management for Claude Code. It handles detection of missing variables, parsing of various .env file formats, and provides appropriate commands for different shells.
When to Use This Skill
AUTOMATICALLY use this skill when:
- User asks to test anything (web pages, APIs, etc.) - testing ALWAYS needs environment
- User asks to run tests, check functionality, or verify pages work
- Starting tasks that need configuration (deployment, API integration, database work)
- Any script or command fails with environment-related errors
- You detect phrases like "missing", "not set", "required", "environment" in error messages
- User mentions specific pages to test (e.g., "test the billing page", "check the login form")
- Beginning work on web applications, APIs, or services
CRITICAL: If the user says "test the X page" or similar, invoke this skill FIRST before writing any test code.
DO NOT wait for the user to ask - proactively invoke this skill when environment issues are likely. DO NOT check for .env files or write environment loading code - that's what THIS skill does.
Key Features
- Shell Detection: Automatically detects user's shell (bash, zsh, fish)
- Format Recognition: Understands multiple .env file formats:
- Shell format:
export VAR=value - Simple format:
VAR=value - Commented files with
#comments
- Shell format:
- Smart Loading: Recommends the right tool for the job:
sourcefor shell-formatted filesexportfor inline variable settingdotenvcommand for simple format files (if available)
- Project Awareness: Searches project directory for .env files
- Frictionless UX: Provides copy-paste commands for users
Helper Scripts
scripts/check_env.py- Check if required environment variables are setscripts/detect_env_files.py- Find and analyze .env files in projectscripts/load_env.sh- Shell script to load environment variables
Usage Patterns
Pattern 1: Check for Required Variables
import subprocess
import json
result = subprocess.run(
['python', '~/.claude/skills/env-manager/scripts/check_env.py',
'--required', 'VAR1,VAR2,VAR3'],
capture_output=True,
text=True
)
info = json.loads(result.stdout)
if not info['all_present']:
# Handle missing variables
print(f"Missing: {info['missing']}")Pattern 2: Find and Suggest .env Files
result = subprocess.run(
['python', '~/.claude/skills/env-manager/scripts/detect_env_files.py'],
capture_output=True,
text=True
)
files = json.loads(result.stdout)
for file_info in files:
print(f"Found: {file_info['path']}")
print(f"Format: {file_info['format']}")
print(f"Load command: {file_info['load_command']}")Environment File Formats
Shell Format (Recommended)
# .env file
export DATABASE_URL=postgres://localhost/db
export API_KEY=secret123
export DEBUG=trueLoad with: source .env
Simple Format
# .env file
DATABASE_URL=postgres://localhost/db
API_KEY=secret123
DEBUG=trueLoad with: dotenv command or manually set with export
Fish Shell Format
# .env.fish file
set -x DATABASE_URL postgres://localhost/db
set -x API_KEY secret123
set -x DEBUG trueLoad with: source .env.fish
Integration with Other Skills
Other skills should delegate environment management to this skill:
# In another skill's script
from pathlib import Path
import subprocess
import sys
# Check for required environment variables
check_cmd = [
'python',
str(Path.home() / '.claude/skills/env-manager/scripts/check_env.py'),
'--required', 'VAR1,VAR2',
'--role', 'user'
]
result = subprocess.run(check_cmd, capture_output=True, text=True)
if result.returncode != 0:
print("Environment not configured. Run env-manager skill first.")
sys.exit(1)Best Practices
- Always check environment before running tasks that require specific variables
- Provide clear feedback about which variables are missing
- Suggest concrete commands for users to run
- Respect user's shell choice - don't assume bash
- Don't modify environment files - only read and suggest
Shell Compatibility
| Shell | Detection | .env Loading | Variable Setting |
| bash | ✓ | source | export VAR=val |
| zsh | ✓ | source | export VAR=val |
| fish | ✓ | source | set -x VAR val |
| sh | ✓ | . | export VAR=val |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

