configuring
$
npx mdskill add oaustegard/claude-skills/configuringLoad secrets and configs from any AI coding platform instantly.
- Eliminates manual setup by auto-detecting active environments.
- Integrates with Claude.ai, Claude Code, OpenAI Codex, and Jules.
- Returns detected environment name or loaded configuration values.
- Provides direct access to tokens, ports, and project settings.
SKILL.md
.github/skills/configuringView on GitHub ↗
---
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)
```
More from oaustegard/claude-skills
- accessing-github-reposGitHub repository access in containerized environments using REST API and credential detection. Use when git clone fails, or when accessing private repos/writing files via API.
- api-credentialsSecurely manages API credentials for multiple providers (Anthropic Claude, Google Gemini, GitHub). Use when skills need to access stored API keys for external service invocations.
- asking-questionsGuidance for asking clarifying questions when user requests are ambiguous, have multiple valid approaches, or require critical decisions. Use when implementation choices exist that could significantly affect outcomes.
- browsing-blueskyBrowse Bluesky content via API and firehose - search posts, fetch user activity, sample trending topics, read feeds and lists, analyze and categorize accounts. Supports authenticated access for personalized feeds. Use for Bluesky research, user monitoring, trend analysis, feed reading, firehose sampling, account categorization.
- building-github-indexGenerate progressive disclosure indexes for GitHub repositories to use as Claude project knowledge. Use when setting up projects referencing external documentation, creating searchable indexes of technical blogs or knowledge bases, combining multiple repos into one index, or when user mentions "index", "github repo", "project knowledge", or "documentation reference".
- categorizing-bsky-accountsAnalyze and categorize Bluesky accounts by topic using keyword extraction. Use when users mention Bluesky account analysis, following/follower lists, topic discovery, account curation, or network analysis.
- chartingSelect the right Python charting library (seaborn, matplotlib, graphviz) and produce publication-quality static visualizations. Use when creating charts, plots, graphs, diagrams, heatmaps, visualizations from data, or when choosing between matplotlib/seaborn/graphviz. Also triggers for network diagrams, flowcharts, dependency trees, state machines, and entity-relationship diagrams. For interactive browser-rendered charts or uploaded data exploration, defer to charting-vega-lite instead.
- charting-vega-liteCreate interactive data visualizations using Vega-Lite declarative JSON grammar. Supports 20+ chart types (bar, line, scatter, histogram, boxplot, grouped/stacked variations, etc.) via templates and programmatic builders. Use when users upload data for charting, request specific chart types, or mention visualizations. Produces portable JSON specs with inline data islands that work in Claude artifacts and can be adapted for production.
- check-toolsValidates development tool installations across Python, Node.js, Java, Go, Rust, C/C++, Git, and system utilities. Use when verifying environments or troubleshooting dependencies.
- cloning-projectExports project instructions and knowledge files from the current Claude project. Use when users want to clone, copy, backup, or export a project's configuration and files.