config-schema-migrator

Migrate Pydantic configuration schemas with backward-compatible automated scripts.

1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/OmarTheGrey/Council-Of-HAL --skill config-schema-migrator-omarthegrey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: config-schema-migrator
Source: https://github.com/OmarTheGrey/Council-Of-HAL/tree/main/.claude/skills/config-schema-migrator
Command: npx skills add https://github.com/OmarTheGrey/Council-Of-HAL --skill config-schema-migrator-omarthegrey

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

As AI systems evolve, their configuration schemas often change, risking breakage for existing users. This skill provides robust patterns to safely evolve Pydantic config schemas with backward compatibility and automated migration paths, ensuring smooth updates.

Core Features & Use Cases

  • Backward Compatibility: Add new config sections and fields without breaking old configurations, preserving user experience.
  • Automated Migrations: Generate scripts to automatically update user config files to the latest schema, eliminating manual editing.
  • Environment Variable Support: Securely inject secrets and dynamic values using environment variable substitution, enhancing security.
  • Type Discrimination: Utilize Pydantic's discriminated unions for flexible, type-safe configuration of different component types (e.g., CLI vs. HTTP adapters).
  • Use Case: You're refactoring how adapters are configured, moving from a simple cli_tools list to a more structured adapters section with type discriminators. This skill guides you through the schema changes, migration script creation, and comprehensive testing.

Quick Start

Explain how to add a new optional field to an existing Pydantic configuration schema while maintaining backward compatibility for users who haven't updated their config files.

Frequently Asked Questions about config-schema-migrator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add new fields to a Pydantic config schema without breaking existing user configurations?

Backward-compatible schema evolution adds optional fields with defaults to existing Pydantic models, preserving old configs. This Skill automates the process by generating migration scripts that safely update schemas while maintaining type safety and allowing gradual user adoption of new structure.

Can I automatically migrate user config files when my Pydantic schema changes?

Yes, automated migration scripts update existing config files to match evolved schemas. This Skill generates those scripts to handle field additions, type changes, and section restructuring, eliminating manual user edits while providing clear migration guidance and error messages.

How do I use environment variables securely in Pydantic configuration schemas?

Environment variable substitution injects secrets and dynamic values into configs using ${VAR} syntax. This Skill enforces type safety through Pydantic validators, supports variable expansion, and provides actionable error messages when substitution fails or values are missing.

What's the best way to restructure config sections while maintaining backward compatibility?

Restructuring with backward compatibility uses Pydantic validators and discriminated unions to handle old and new schema layouts simultaneously. This Skill provides patterns for moving data between sections, applying type discrimination, and emitting deprecation warnings so users migrate at their own pace.

How do I test config migrations to ensure they work correctly?

Testing migrations validates that automated scripts transform old configs to new schemas without data loss or type errors. This Skill integrates Pydantic's type enforcement with comprehensive error messaging to catch migration issues before users encounter them.

When should I use type discriminators for configuration instead of a flat list structure?

Type discriminators add flexibility when config components have different types and fields—like CLI versus HTTP adapters. This approach improves type safety and readability; this Skill guides schema refactoring from simple lists to discriminated unions with full backward compatibility.