Claude Skill

configuring

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

LLM Mart · 0 points · 1 views 0 listing impressions 0 install-command copies
Download oaustegard-claude-skills-plugins_environment-and-config_skills_configuring-e39c726.zip · 11 KB

Install

skills CLI npx skills add https://github.com/oaustegard/claude-skills/tree/main/plugins/environment-and-config/skills/configuring
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oaustegard-claude-skills@llmmart
Git git clone https://github.com/oaustegard/claude-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole oaustegard/claude-skills collection as a plugin from our marketplace. Git is the plain clone.

README

configuring

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

Skill manifest

Configuring

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

Quick Start

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

# 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:

{
  "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

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:

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:

# 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 (claude-skills)
  • assets
    • example.env 485 B · in bundle
  • examples
    • turso_refactored.py 8.9 KB
      Loading…
  • scripts
    • getting_env.py 19.4 KB
      Loading…
    • __init__.py 0 B
      Loading…
  • .gitignore 202 B · in bundle
  • CHANGELOG.md 920 B
    Loading…
  • README.md 201 B
    # configuring
    
    Universal configuration management for AI agent environments. Loads environment variables, secrets, and config from Claude.ai, Claude Code, OpenAI Codex, Jules, and standard .env files.
    
  • SKILL.md 3.3 KB
    ---
    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)
    ```
    
  • __init__.py 681 B
    Loading…

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.