Agent skill

Python Configuration

by wshobson in wshobson/agents

Python configuration management via environment variables and typed settings.

MITAuto-check: notesDevOps & Cloud

Install Python Configuration

skills CLI
$ npx skills add wshobson/agents --skill python-configuration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wshobson/agents python-configuration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wshobson/agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/python-development/skills/python-configuration .claude/skills/python-configuration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-configuration
GitHub stars
40k
Token cost
~1.6k tokens
SKILL.md length
353 words
Files
2 (incl. references)
Skills in repo
142
Repo updated
First seen
Licence
MIT

At a glance

Python configuration management via environment variables and typed settings.

  • Works in 4 steps: Externalized Configuration → Typed Settings → Fail Fast → …
  • Externalizing config
  • SKILL.md covers When to Use This Skill, Core Concepts, Quick Start and Fundamental Patterns, plus 2 more sections
  • Needs DB_PASSWORD and API_SECRET_KEY

What it does

Python Configuration is an agent skill from wshobson/agents. Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing environment-specific behavior.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/details.md`).

It sits in DevOps & Cloud, covering Secrets management. It works with Python and Pydantic. The repository describes itself as: Multi-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, Google Antigravity, and Pi. The licence is MIT.

When your agent uses it

  • Externalizing config
  • Setting up pydantic-settings
  • Managing secrets
  • Implementing environment-specific behavior

Example prompts

  • “/python-configuration”

Requirements

  • Python 3
  • A credential in API_KEY
  • A credential in API_SECRET_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Externalized Configuration
  2. Typed Settings
  3. Fail Fast
  4. Sensible Defaults

What it can do on your machine

Read from SKILL.md and the folder at commit 46891e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DB_PASSWORD
    • API_SECRET_KEY
    • API_KEY
    • AUTH_SECRET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Python Configuration loads about 1.6k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 353 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:82
    "env_file": ".env",
  • NoteMentions a .env fileSKILL.md:156
    model_config = {"env_file": ".env"}
  • NoteMentions a .env fileSKILL.md:159
    Create a `.env` file for local development (never commit this):
  • NoteMentions a .env fileSKILL.md:162
    # .env (add to .gitignore)
  • NoteMentions a .env fileSKILL.md:206
    5. **Never commit secrets** - Use `.env` files (gitignored) or secret managers

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wshobson/agents at commit 46891e7, republished under its MIT licence (© wshobson). 353 words, ~1,555 tokens.

Download SKILL.mdSave it as .claude/skills/python-configuration/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
python-configuration
description
Python configuration management via environment variables and typed settings. Use when externalizing config, setting up pydantic-settings, managing secrets, or implementing environment-specific behavior.

Python Configuration Management

Externalize configuration from code using environment variables and typed settings. Well-managed configuration enables the same code to run in any environment without modification.

When to Use This Skill

  • Setting up a new project's configuration system
  • Migrating from hardcoded values to environment variables
  • Implementing pydantic-settings for typed configuration
  • Managing secrets and sensitive values
  • Creating environment-specific settings (dev/staging/prod)
  • Validating configuration at application startup

Core Concepts

1. Externalized Configuration

All environment-specific values (URLs, secrets, feature flags) come from environment variables, not code.

2. Typed Settings

Parse and validate configuration into typed objects at startup, not scattered throughout code.

3. Fail Fast

Validate all required configuration at application boot. Missing config should crash immediately with a clear message.

4. Sensible Defaults

Provide reasonable defaults for local development while requiring explicit values for sensitive settings.

Quick Start

python
from pydantic_settings import BaseSettings
from pydantic import Field

class Settings(BaseSettings):
    database_url: str = Field(alias="DATABASE_URL")
    api_key: str = Field(alias="API_KEY")
    debug: bool = Field(default=False, alias="DEBUG")

settings = Settings()  # Loads from environment

Fundamental Patterns

Pattern 1: Typed Settings with Pydantic

Create a central settings class that loads and validates all configuration.

python
from pydantic_settings import BaseSettings
from pydantic import Field, PostgresDsn, ValidationError
import sys

class Settings(BaseSettings):
    """Application configuration loaded from environment variables."""

    # Database
    db_host: str = Field(alias="DB_HOST")
    db_port: int = Field(default=5432, alias="DB_PORT")
    db_name: str = Field(alias="DB_NAME")
    db_user: str = Field(alias="DB_USER")
    db_password: str = Field(alias="DB_PASSWORD")

    # Redis
    redis_url: str = Field(default="redis://localhost:6379", alias="REDIS_URL")

    # API Keys
    api_secret_key: str = Field(alias="API_SECRET_KEY")

    # Feature flags
    enable_new_feature: bool = Field(default=False, alias="ENABLE_NEW_FEATURE")

    model_config = {
        "env_file": ".env",
        "env_file_encoding": "utf-8",
    }

# Create singleton instance at module load
try:
    settings = Settings()
except ValidationError as e:
    print(f"Configuration error:\n{e}")
    sys.exit(1)

Import settings throughout your application:

python
from myapp.config import settings

def get_database_connection():
    return connect(
        host=settings.db_host,
        port=settings.db_port,
        database=settings.db_name,
    )
Pattern 2: Fail Fast on Missing Configuration

Required settings should crash the application immediately with a clear error.

python
from pydantic_settings import BaseSettings
from pydantic import Field, ValidationError
import sys

class Settings(BaseSettings):
    # Required - no default means it must be set
    api_key: str = Field(alias="API_KEY")
    database_url: str = Field(alias="DATABASE_URL")

    # Optional with defaults
    log_level: str = Field(default="INFO", alias="LOG_LEVEL")

try:
    settings = Settings()
except ValidationError as e:
    print("=" * 60)
    print("CONFIGURATION ERROR")
    print("=" * 60)
    for error in e.errors():
        field = error["loc"][0]
        print(f"  - {field}: {error['msg']}")
    print("\nPlease set the required environment variables.")
    sys.exit(1)

A clear error at startup is better than a cryptic None failure mid-request.

Pattern 3: Local Development Defaults

Provide sensible defaults for local development while requiring explicit values for secrets.

python
class Settings(BaseSettings):
    # Has local default, but prod will override
    db_host: str = Field(default="localhost", alias="DB_HOST")
    db_port: int = Field(default=5432, alias="DB_PORT")

    # Always required - no default for secrets
    db_password: str = Field(alias="DB_PASSWORD")
    api_secret_key: str = Field(alias="API_SECRET_KEY")

    # Development convenience
    debug: bool = Field(default=False, alias="DEBUG")

    model_config = {"env_file": ".env"}

Create a .env file for local development (never commit this):

bash
# .env (add to .gitignore)
DB_PASSWORD=local_dev_password
API_SECRET_KEY=dev-secret-key
DEBUG=true
Show full SKILL.md (136 more words)Show less
Pattern 4: Namespaced Environment Variables

Prefix related variables for clarity and easy debugging.

bash
# Database configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp
DB_USER=admin
DB_PASSWORD=secret

# Redis configuration
REDIS_URL=redis://localhost:6379
REDIS_MAX_CONNECTIONS=10

# Authentication
AUTH_SECRET_KEY=your-secret-key
AUTH_TOKEN_EXPIRY_SECONDS=3600
AUTH_ALGORITHM=HS256

# Feature flags
FEATURE_NEW_CHECKOUT=true
FEATURE_BETA_UI=false

Makes env | grep DB_ useful for debugging.

Detailed worked examples and patterns

Detailed sections (starting with ## Advanced Patterns) live in references/details.md. Read that file when the navigation summary above is insufficient.

Best Practices Summary

  1. Never hardcode config - All environment-specific values from env vars
  2. Use typed settings - Pydantic-settings with validation
  3. Fail fast - Crash on missing required config at startup
  4. Provide dev defaults - Make local development easy
  5. Never commit secrets - Use .env files (gitignored) or secret managers
  6. Namespace variables - DB_HOST, REDIS_URL for clarity
  7. Import settings singleton - Don't call os.getenv() throughout code
  8. Document all variables - README should list required env vars
  9. Validate early - Check config correctness at boot time
  10. Use secrets_dir - Support mounted secrets in containers

© wshobson, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in plugins/python-development/skills/python-configuration of wshobson/agents.

  • SKILL.md
  • references/details.md

Open the folder on GitHubat commit 46891e7

Compare with similar skills

Python Configuration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Configuration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Configuration this skillwshobson/agents40k—~1.6kAutomated safety check: NotesMIT
Specx Settingsmaksimzayats/specx202—~707Automated safety check: NotesMIT
Env Var Conventionssgl-project/sglang37k2 repos~2.9kAutomated safety check: PassApache-2.0
Flow Contextflowexec/flow137—~654Automated safety check: PassApache-2.0
Secret Serializationgetsentry/skills1k—~2.6kAutomated safety check: NotesApache-2.0
Azurekid-sid/claude-spellbook189—~3.7kAutomated safety check: NotesMIT

Similar skills

  • Specx Settings

    maksimzayats/specx

    Add runtime configuration to specx Python services with pydantic-settings.

    202 GitHub stars~707 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes
  • Env Var Conventions

    sgl-project/sglang

    Conventions for SGLang environment variables — where to define, how to access, how to name, and how to deprecate.

    37k GitHub starsUsed in 2 repos~2.9k tokens
    DevOps & CloudAuto-check passed
  • Flow Context

    flowexec/flow

    This project uses flow for automation. An agent skill from flowexec/flow.

    137 GitHub stars~654 tokensUpdated 6 days ago
    DevOps & CloudAuto-check passed
  • Secret Serialization

    getsentry/skills

    Official

    Finds secrets, tokens, passwords, and API keys that can leak through generated serialization: Python dataclass repr and asdict, attrs, pydantic modeldump, NamedTuple, JavaScript JSON.stringify and…

    1k GitHub stars~2.6k tokensUpdated 5 days ago
    DevOps & CloudAuto-check: notes
  • Azure

    kid-sid/claude-spellbook

    A skill your agent uses when writing Python code that integrates with Azure Blob Storage, AI Search, Document Intelligence, or Key Vault — or when configuring Managed Identity auth, designing a…

    189 GitHub stars~3.7k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check: notes
  • Env Manager

    bobmatnyc/claude-mpm

    Environment variable validation, security scanning, and management for Next.js, Vite, React, and Node.js applications

    155 GitHub stars~3.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes

More from wshobson/agents

All 142 skills in this repo
  • Cuts cloud spend across AWS, Azure, GCP and OCI with cost tagging, rightsizing, commitment and spot pricing models, and architecture changes.

    40k GitHub starsUsed in 13 repos~1.7k tokens
    Auto-check passed
  • Billing Automation

    wshobson/agents

    Covers building subscription billing: billing cycles, subscription states, invoice generation, proration, tax handling and dunning for failed payments.

    40k GitHub starsUsed in 12 repos~473 tokens
    Auto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 12 repos~814 tokens
    Auto-check passed
  • Portfolio Risk Metrics

    wshobson/agents

    Covers portfolio risk measurement with VaR, CVaR, Sharpe, Sortino and drawdown, plus guidance on limits, stress tests and tail risk.

    40k GitHub starsUsed in 12 repos~502 tokens
    Auto-check passed
  • Plans memory headroom, works through out-of-memory failures and watches temperature and power during long ML training jobs on NVIDIA DGX Spark.

    40k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.

    40k GitHub starsUsed in 11 repos~1.3k tokens
    Auto-check passed

Works with

Categories

Questions about Python Configuration

What does Python Configuration do?

Python configuration management via environment variables and typed settings. Python Configuration is an agent skill from wshobson/agents. Python configuration management via environment variables and typed settings.

When should I use Python Configuration?

Python Configuration fits situations like: externalizing config; setting up pydantic-settings; managing secrets; implementing environment-specific behavior.

How do I install Python Configuration in Claude Code?

Run `npx skills add wshobson/agents --skill python-configuration -a claude-code`. Or copy the skill folder (plugins/python-development/skills/python-configuration in wshobson/agents) into .claude/skills/python-configuration in your project. Claude Code loads it when a task matches its description.

How do I install Python Configuration in Codex?

Run `npx skills add wshobson/agents --skill python-configuration -a codex`. Or copy the skill folder (plugins/python-development/skills/python-configuration in wshobson/agents) into .agents/skills/python-configuration in your project. Codex loads it when a task matches its description.

Can I use Python Configuration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wshobson/agents --skill python-configuration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-configuration, .gemini/skills/python-configuration, .github/skills/python-configuration and .opencode/skills/python-configuration in your project.

What does Python Configuration need to run?

Going by SKILL.md and its folder, Python Configuration needs credentials named DB_PASSWORD, API_SECRET_KEY, API_KEY and AUTH_SECRET_KEY. Our summary lists: Python 3; A credential in API_KEY; A credential in API_SECRET_KEY.

Does Python Configuration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Python Configuration safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Python Configuration use?

Python Configuration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Configuration use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Python Configuration?

Skills that share tags, products or a category with Python Configuration: Specx Settings (maksimzayats/specx, 202 stars), Env Var Conventions (sgl-project/sglang, 37k stars), Flow Context (flowexec/flow, 137 stars) and Secret Serialization (getsentry/skills, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Configuration?

wshobson (a GitHub user) maintains it in wshobson/agents, which has 40,254 GitHub stars. The repository holds 142 skills in this directory. The repository was last updated on October 5, 2026.

Source: wshobson/agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.