Python config
Python configuration workflow for environment variables, config files, Pydantic settings, precedence rules, defaults, secrets, test isolation, and development/test/production separation.From its SKILL.md
npx -y skills add nyquistwilder/personal-pi --skill python-configAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, 509 tokens by cl100k_base, as published. Nobody here has run it
Python Config
Rule
Make configuration typed, explicit, testable, and safe. Define precedence rules clearly and avoid hidden global state that makes tests order-dependent or deployments surprising.
For greenfield personal-baseline apps and services, prefer Pydantic Settings for environment and file-backed settings when validation is needed.
Hard Stops
Stop and ask before changing configuration when:
- Environment variable names, prefixes, defaults, or precedence are unclear.
- Existing deployments, CLI flags, config files, or secrets management may depend on current behavior.
- Real secrets or production configuration values are present. Do not repeat secret values.
- Adding Pydantic Settings, dotenv loading, or config-file support would change project policy.
- Tests would read or mutate the user's real environment or config files.
Configuration Defaults
- Precedence should be documented; for CLIs prefer
CLI flags > environment variables > config files > defaultsunless the project specifies otherwise. - Use a stable environment prefix, typically the import package uppercased.
- Keep secrets out of logs, exceptions, test fixtures, and committed files.
- Prefer immutable settings objects or explicit settings injection.
- Do not load configuration at import time if tests or applications need different settings.
- Separate development, test, and production defaults deliberately.
Pydantic Settings Guidance
- Use Pydantic models for validation and type coercion at config boundaries.
- Use field aliases or env names intentionally.
- Use
SecretStror equivalent secret types where values may be displayed. - Validate paths, URLs, ports, log levels, and enum-like values explicitly.
- Keep settings construction centralized but injectable.
Workflow
- Inspect current settings, environment variables, config files, docs, tests, and deployment references.
- Identify all consumers and compatibility constraints.
- Define or preserve precedence rules.
- Implement typed settings and explicit loading boundaries.
- Add tests with
monkeypatch,tmp_path, and isolated config files. - Update docs or README snippets when configuration surface changes.
- Run focused tests and repository validation.
Testing
Never depend on machine-local environment. Use monkeypatch to set and delete variables.
Use tmp_path for config files. Test defaults, env overrides, invalid values, missing
required values, and secret redaction when relevant.
Completion
Report config keys changed, precedence rules, defaults, secret-handling decisions, tests run, and deployment compatibility risks.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.