pydantic-settings

pydantic-settings is a skill for Claude Code, Codex from tedivm/robs_awesome_python_template. It costs 38 tokens per session (900 once invoked), scanned A, original, MIT.

A set of rules for managing application configuration with Pydantic Settings. Configuration means values such as environment variables, settings in a .env file, and secrets used by an application.

In plain words
What is it for?
Adding environment variables and settings fields, configuring optional or required values, and working with passwords, tokens, and API keys.
Why use it?
It keeps configuration in one place and makes missing, optional, and sensitive values clear. It also prevents secrets from being handled like ordinary text.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Adding environment variables and settings fields, configuring optional or required values, and working with passwords, tokens, and API keys.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tedivm/robs_awesome_python_template/pydantic-settings
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tedivm/robs_awesome_python_template --skill pydantic-settings
Clone the repo
git clone --depth 1 https://github.com/tedivm/robs_awesome_python_template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pydantic-settings

README.md
[![agentmods](https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/pydantic-settings/github.svg)](https://agentmods.dev/skills/tedivm/robs_awesome_python_template/pydantic-settings)
Your own site
<a href="https://agentmods.dev/skills/tedivm/robs_awesome_python_template/pydantic-settings"><img src="https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/pydantic-settings/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pydantic-settings

Your own site · 80×15
<a href="https://agentmods.dev/skills/tedivm/robs_awesome_python_template/pydantic-settings"><img src="https://agentmods.dev/badge/skills/tedivm/robs_awesome_python_template/pydantic-settings.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 37
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00900
Opus 5.5 $0.00015 $0.00360
Sonnet 5.5 $0.00008 $0.00180
Haiku 4.5 $0.00004 $0.00090

Measured 2mo ago against content hash 15260213f847, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pydantic-settings scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

{{cookiecutter.__package_slug}}/.agents/skills/pydantic-settings/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pydantic Settings

context7: If the context7 tools are available, resolve and load the full pydantic-settings documentation before adding or modifying any settings:

context7_resolve-library-id: "pydantic-settings"
context7_query-docs: <resolved-id> "your query"

All application configuration is managed through the pydantic-settings library. Settings are defined in a single class and loaded from the environment and .env file.


Key Rules

  • One settings class: The main Settings class lives at {{cookiecutter.__package_slug}}/conf/settings.py. Always update this existing class — never create a new settings class.
  • Secrets use SecretStr or SecretBytes: Any value that is sensitive (passwords, tokens, API keys) must be wrapped in one of these types.
  • Optional settings default to None: Never use empty strings as a sentinel for "not set".
  • All fields use Field(): Include a description= for every field so operators know what it does.

Pattern

# {{cookiecutter.__package_slug}}/conf/settings.py
from pydantic import Field, SecretStr
from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore",
    )

    # Regular setting with a default
    project_name: str = Field(default="{{ cookiecutter.__package_slug }}", description="Human-readable project name")

    # Optional sensitive setting — defaults to None, not empty string
    api_key: SecretStr | None = Field(
        default=None,
        description="API key for external service. Leave unset to disable.",
    )

    # Optional non-sensitive setting
    max_connections: int = Field(
        default=10,
        description="Maximum number of connections",
    )

Accessing Secrets

SecretStr wraps the value to prevent accidental logging. Access the actual value explicitly when needed:

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 122 lines · 38 tokens per session scan A 15260213f847

Subscribe to this mod's changes

pydantic-settings is a skill published in the GitHub repository tedivm/robs_awesome_python_template (313 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 900 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

pydantic-settings compared with skills from other repositories

pydantic-settings next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pydantic-settingstedivm/robs_awesome_python_templateSkill3135mo agoMITA38Claude Code, Codex
background-taskvstorm-co/full-stack-ai-agent-templateSkill2.0k7d agoMITA62Claude Code
channel-botvstorm-co/full-stack-ai-agent-templateSkill2.0k7d agoMITA53Claude Code
chatgpt-appsHaohao-end/openagentSkill748yesterdayMITA96Codex
aspnet-coreHaohao-end/openagentSkill748yesterdayMITA79Codex
projxukanhaupa/projxSkill724d agoMITA53Claude Code
gitlab_writeParendumOU/NexoraSkill2628d agoMITA0Claude Code, Codex