Get the FREE Ultimate OpenClaw Setup Guide →

configuration-migrator

npx machina-cli add skill a5c-ai/babysitter/configuration-migrator --openclaw
Files (1)
SKILL.md
2.4 KB

Configuration 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

ToolPurposeIntegration Method
yqYAML processingCLI
jqJSON processingCLI
dotenvENV file handlingLibrary
git-secretsSecret detectionCLI
Config validatorsSchema validationCLI

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

  1. Step 1: Identify source format and paths for the config and desired target
  2. Step 2: Run the migration tool enabling environment variable extraction and secret detection
  3. 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

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers