What problem does it solve?
Manually writing and maintaining complex YAML transformations is error-prone and time-consuming. This Skill automates the test-first development of robust OpenRewrite recipes, ensuring high-quality, maintainable YAML refactoring.
Core Features & Use Cases
- Test-First Recipe Development: Guides you through writing failing tests before implementing YAML transformations.
- LST-Based Manipulation: Leverages OpenRewrite's Lossless Semantic Tree for precise, formatting-preserving YAML changes.
- JsonPath Matching: Utilizes powerful JsonPath expressions for targeted modifications in GitHub Actions, Kubernetes, and other YAML configs.
- Use Case: Automatically migrate all GitHub Actions workflows from
actions/checkout@v2 to actions/checkout@v3 across a large repository, ensuring all YAML formatting and comments are preserved.
Quick Start
Example: Generate boilerplate for a new recipe
python ./scripts/init_recipe.py --name MyYamlRecipe --package com.example.rewrite --description "My new YAML recipe"