home / skills / a5c-ai / babysitter / configuration-migrator

This skill migrates configuration files between formats and versions, extracts environment variables, and detects secrets to streamline secure, consistent

npx playbooks add skill a5c-ai/babysitter --skill configuration-migrator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.4 KB
---
name: configuration-migrator
description: Migrate configuration files between formats and versions with environment variable extraction
allowed-tools: ["Bash", "Read", "Write", "Grep", "Glob", "Edit"]
---

# 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

| 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

```json
{
  "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

Overview

This skill migrates configuration files between formats and versions while extracting environment variables and identifying secrets. It streamlines format conversion, schema validation, and template generation to make config migrations deterministic and repeatable. The focus is on safe, auditable transformations that preserve defaults and surface required overrides.

How this skill works

The skill parses source configuration files (XML, INI, Properties, TOML, JSON, YAML, .env) and converts them into the target format using configurable transformation rules. It extracts environment-specific values into env files or variable references, runs schema validations, and scans for hardcoded secrets. The output is an auditable migration record including conversions, extracted variables, detected secrets, and validation results.

When to use it

  • Converting legacy config files to a new format during an upgrade or refactor.
  • Centralizing environment-specific values into .env files for deployment consistency.
  • Detecting and removing hardcoded credentials before releasing or auditing code.
  • Validating migrated configs against a schema to ensure compatibility.
  • Generating config templates and examples for multi-environment deployments.

Best practices

  • Run migration in a branch and include the generated migration record in PRs for auditability.
  • Keep transformation rules and schema definitions in source control to ensure deterministic runs.
  • Use secret detection as a gating check; never commit extracted secrets to the repo.
  • Preserve default values and clearly document required overrides in the generated templates.
  • Validate outputs with both machine schema checks and a quick manual review for edge cases.

Example use cases

  • Migrate application.properties to YAML while extracting DB credentials to a .env file and flagging any hardcoded keys.
  • Convert legacy INI server configs into JSON for a cloud deployment and validate against the cloud provider schema.
  • Transform TOML-based tool config into standardized YAML templates for multiple environments and generate example env files.
  • Run a pre-release check to detect API keys or passwords embedded in various config formats before merging.

FAQ

What formats are supported?

Common formats are supported: XML, YAML, JSON, Properties, INI, TOML and .env files.

How are secrets handled?

The skill flags hardcoded secrets and credentials, extracts environment variables to separate files, and warns against committing secrets. Integration with CLI scanners is supported for deeper detection.

Can I validate migrated configs?

Yes. The skill validates outputs against provided schemas and reports errors and warnings in the migration record.