Install
$ agentstack add skill-scott2b-claude-skills-env-manager Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Dangerous shell/eval execution.
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ● Shell / process execution Used
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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 - 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=true
Load with: source .env
Simple Format
# .env file
DATABASE_URL=postgres://localhost/db
API_KEY=secret123
DEBUG=true
Load 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 true
Load 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 |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: scott2b
- Source: scott2b/claude-skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.