configuration-migrator
npx machina-cli add skill a5c-ai/babysitter/configuration-migrator --openclawConfiguration Migrator Skill
Migrates configuration files between different formats and versions, handles environment variable extraction, and manages secret detection.
Purpose
Enable configuration migration for:
- Config format conversion
- Environment variable extraction
- Secret detection and handling
- Schema validation
- Template generation
Capabilities
1. Config Format Conversion
- XML to YAML/JSON
- Properties to YAML
- INI to JSON
- TOML conversion
- ENV file handling
2. Environment Variable Extraction
- Identify environment-specific values
- Extract to env files
- Create variable references
- Document variables
3. Secret Detection
- Find hardcoded secrets
- Identify credentials
- Detect API keys
- Flag sensitive data
4. Schema Validation
- Validate against schemas
- Check required fields
- Verify data types
- Ensure compatibility
5. Default Value Handling
- Preserve defaults
- Document required overrides
- Create sensible defaults
- Handle missing values
6. Template Generation
- Create config templates
- Generate example files
- Document all options
- Support multiple environments
Tool Integrations
| Tool | Purpose | Integration Method |
|---|---|---|
| yq | YAML processing | CLI |
| jq | JSON processing | CLI |
| dotenv | ENV file handling | Library |
| git-secrets | Secret detection | CLI |
| Config validators | Schema validation | CLI |
Output Schema
{
"migrationId": "string",
"timestamp": "ISO8601",
"source": {
"format": "string",
"path": "string"
},
"target": {
"format": "string",
"path": "string"
},
"conversions": [
{
"sourceKey": "string",
"targetKey": "string",
"transformation": "string"
}
],
"extracted": {
"envVariables": [],
"secrets": []
},
"validation": {
"valid": "boolean",
"errors": [],
"warnings": []
}
}
Integration with Migration Processes
- configuration-migration: Primary tool
- framework-upgrade: Config version updates
- cloud-migration: Cloud config adaptation
Related Skills
compliance-validator: Secret compliance
Related Agents
configuration-centralization-agent: Config modernization
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/specializations/code-migration-modernization/skills/configuration-migrator/SKILL.mdView on GitHub Overview
The Configuration Migrator Skill migrates configuration files between formats and versions, supports environment variable extraction, and detects secrets. It also offers schema validation and template generation to ensure configs stay compatible and deployment-ready.
How This Skill Works
It uses CLI tooling like yq for YAML, jq for JSON, and dotenv for ENV handling, plus secret detection with git-secrets and schema validation with config validators. The workflow converts source formats to the target, extracts environment variables into env files, flags hardcoded secrets, validates data against schemas, and creates usable config templates for multiple environments.
When to Use It
- Migrating legacy XML, INI, or Properties configs to modern YAML or JSON
- Extracting environment variables into .env files during migration
- Scanning for secrets and rotating credentials as part of migration
- Performing schema validation to ensure required fields and types
- Generating multi-environment config templates and examples for deployment
Quick Start
- Step 1: Identify source format and paths for the config and desired target
- Step 2: Run the migration tool enabling environment variable extraction and secret detection
- Step 3: Review validation results, extracted env vars, and generated templates
Best Practices
- Plan conversion mappings from source keys to target keys
- Run secret detection early and avoid exposing secrets in logs
- Validate against schemas after each conversion
- Document all environment variables and defaults
- Use template generation to cover multiple environments and versions
Example Use Cases
- XML to YAML with environment variable extraction for a microservice config
- Properties to YAML during a framework upgrade
- INI to JSON with schema validation and default handling
- ENV file handling and secret detection for cloud configs
- Template generation for staging and production environments