Skip to content
Back to skills

Configuring

BSecurity

Universal environment variable loader for AI agent environments. Loads secrets and config from Claude.ai, Claude Code, OpenAI Codex, Jules, and standard .env files.

  • 150 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 8, 2026
devopspythonshellbashdebuggingapi

Works with

  • claude code
  • cli
  • api

Security analysis

B75/100
  • criticalModifies startup scripts or system services for persistence

Pro scans all 11 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add oaustegard/claude-skills --skill configuring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Configuring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Configuring
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/oaustegard-configuring/badge)](https://www.skillsdirectory.com/skills/oaustegard-configuring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: configuring
description: Universal environment variable loader for AI agent environments. Loads secrets and config from Claude.ai, Claude Code, OpenAI Codex, Jules, and standard .env files.
metadata:
  version: 2.0.0
  replaces: api-credentials, getting-env
---

# Configuring

Unified configuration management across AI coding environments. Load environment variables, secrets, and other opinionated configuration setups from any AI coding platform.

## Quick Start

```python
import sys
sys.path.insert(0, '/path/to/claude-skills')  # or wherever skills are installed
from configuring import get_env, detect_environment

# Get a variable (searches all sources automatically)
token = get_env("TURSO_TOKEN", required=True)

# With default
port = get_env("PORT", default="8080")

# What environment are we in?
env = detect_environment()  # "claude.ai", "claude-code-desktop", "codex", "jules", etc.
```

## Supported Environments

| Environment | Config Sources |
|-------------|----------------|
| **Claude.ai Projects** | `/mnt/project/*.env`, `/mnt/project/*-token.txt` |
| **Claude Code** | `~/.claude/settings.json` (`env` block), `.claude/settings.json` |
| **OpenAI Codex** | `~/.codex/config.toml`, setup script → `~/.bashrc`, `shell_snapshots/*.sh` |
| **Jules** | Environment settings UI, `.env` in repo |
| **Universal** | `os.environ`, `.env`, `.env.local` |

## API Reference

```python
# Core
get_env(key, default=None, *, required=False, validator=None) -> str | None
load_env(path) -> dict[str, str]           # Load specific file
load_all(force_reload=False) -> dict       # Load all sources

# Utilities
detect_environment() -> str                 # Current platform
mask_secret(value, show_chars=4) -> str    # Safe logging
debug_info() -> dict                        # Troubleshooting
get_loaded_sources() -> list[str]          # What was checked
```

## Credential File Formats

**`.env` files** (KEY=value):
```
TURSO_TOKEN=eyJhbGciOiJFZERTQSI...
EMBEDDING_API_KEY=sk-svcacct-...
```

**Single-value files** (`*-token.txt`, `*-key.txt`):
```
eyJhbGciOiJFZERTQSI...
```
Filename becomes key: `turso-token.txt` → `TURSO_TOKEN`

**Claude Code settings.json**:
```json
{
  "env": {
    "TURSO_TOKEN": "eyJhbGciOiJFZERTQSI..."
  }
}
```

## Priority Order

Later sources override earlier:
1. OS environment variables
2. Platform-specific sources (detected automatically)
3. `.env` files in cwd
4. OS environment variables (again - explicit exports always win)

## Debugging

```python
import sys
sys.path.insert(0, '/path/to/claude-skills')
from configuring import debug_info
print(debug_info())
# {'environment': 'claude.ai', 'sources': ['os.environ', 'claude.ai:/mnt/project/'], ...}
```

CLI:
```bash
cd /path/to/claude-skills/configuring
python scripts/getting_env.py                    # Show debug info
python scripts/getting_env.py TURSO_TOKEN        # Get specific key
```

## Migration from api-credentials / getting-env

Replace:
```python
# Old (api-credentials)
from credentials import get_anthropic_api_key
key = get_anthropic_api_key()

# Old (getting-env)
from getting_env import get_env
key = get_env("ANTHROPIC_API_KEY")

# New (configuring)
import sys
sys.path.insert(0, '/path/to/claude-skills')
from configuring import get_env
key = get_env("ANTHROPIC_API_KEY", required=True)
```

Files in this skill

  • .gitignore202 B
  • CHANGELOG.md920 B
  • README.md201 B
  • SKILL.md3.3 KB
  • _MAP.md692 B
  • __init__.py682 B
  • assets/example.env485 B
  • examples/_MAP.md130 B
  • examples/turso_refactored.py8.9 KB
  • scripts/_MAP.md573 B
  • scripts/getting_env.py19.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…