Back to Skills

recipe-writer

verified

Expert in test-first development of production-quality OpenRewrite recipes for automated code refactoring. Automatically activates when working with OpenRewrite recipe files, Java/YAML files in `src/main/java/**/rewrite/**` directories, writing tests implementing `RewriteTest`, or when users ask about recipe development, writing recipes, creating migrations, LST manipulation, JavaTemplate usage, visitor patterns, preconditions, scanning recipes, YAML recipes, GitHub Actions transformations, Kubernetes manifest updates, or code migration strategies. Guides recipe type selection (declarative/Refaster/imperative), visitor implementation, and test-driven development workflows.

View on GitHub

Marketplace

claude-plugins

sjungling/claude-plugins

Plugin

openrewrite

Repository

sjungling/claude-plugins
7stars

plugins/openrewrite/skills/recipe-writer/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/sjungling/claude-plugins/blob/main/plugins/openrewrite/skills/recipe-writer/SKILL.md -a claude-code --skill recipe-writer

Installation paths:

Claude
.claude/skills/recipe-writer/
Powered by add-skill CLI

Instructions

# OpenRewrite Recipe Writing Expert

## Overview

Create production-quality OpenRewrite recipes using test-first development. This skill combines comprehensive coverage of all recipe types (declarative, Refaster, imperative) with deep domain expertise in Java and YAML transformations.

**Core Principle:** Write tests first (RED), implement minimally (GREEN), apply OpenRewrite idioms (REFACTOR).

## When to Use This Skill

Explicitly invoke this skill for:

- **Planning recipes** - Determining the best recipe type for a use case
- **Implementing recipes** - Writing recipe classes, visitors, and JavaTemplate code
- **Writing tests** - Creating comprehensive test coverage with RewriteTest
- **YAML transformations** - GitHub Actions, Kubernetes manifests, CI/CD configs
- **Java refactoring** - Code migrations, API updates, framework modernization
- **Debugging recipes** - Troubleshooting visitor behavior, type checking, or preconditions
- **Converting recipe types** - Analyzing if an imperative recipe can be declarative
- **Understanding OpenRewrite concepts** - Learning about LSTs, cursors, traits, or scanning patterns

## When NOT to Use This Skill

Do NOT invoke this skill for:

- **General Java programming questions** - Use standard Java knowledge unless specifically about OpenRewrite LST manipulation
  - ❌ "How do I parse JSON in Java?"
  - ✅ "How do I parse Java code into LSTs?"
- **General YAML editing** - Use standard Edit tools for direct file modifications
  - ❌ "Edit this YAML file to change the value"
  - ✅ "Create a recipe to update GitHub Actions across all repositories"
- **Running OpenRewrite recipes** - This skill is for authoring recipes, not executing them
  - ❌ "How do I run the Maven plugin?"
  - ✅ "How do I test my recipe runs correctly?"
- **Build tool configuration** - Unless directly related to recipe publishing/distribution
  - ❌ "How do I configure Gradle for my project?"
  - ✅ "How do I publish my recipe to Maven Central?"
- **General refacto

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
32534 chars