migrate-to-earl

Convert raw CLI and HTTP API invocations into Earl templates.

112|7|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/brwse/earl --skill migrate-to-earl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-to-earl
Source: https://github.com/brwse/earl/tree/main/skills/development/migrate-to-earl
Command: npx skills add https://github.com/brwse/earl --skill migrate-to-earl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the tedious and risky process of replacing raw CLI and HTTP API invocations spread across a codebase with reviewed, reusable Earl templates, reducing accidental secret leakage and making call sites reviewable and reversible.

Core Features & Use Cases

  • Repository-wide scanning: Grep-based detection across scripts, CI workflows, Dockerfiles, and common source files using a maintained mapping of CLI and URL patterns.
  • Template import or creation: Import pre-built provider templates when available or invoke create-template for unmatched commands, including secret setup and validation.
  • Safe, staged rewrites: Map call sites to Earl commands, run test calls, pause for a commit checkpoint, rewrite up to ten call sites per provider, and flag complex pipelines for manual review.
  • Use case: Migrate GitHub curl/gh calls or Stripe CLI usages in a project to Earl templates one provider at a time to keep changes small and auditable.

Quick Start

Ask the skill to scan the repository for provider patterns, import or create the provider template, set required secrets, verify commands, and then rewrite up to ten approved call sites.

Frequently Asked Questions about migrate-to-earl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate raw curl and CLI commands to reusable templates in CI workflows?

Migrating raw curl and CLI commands to reusable templates involves scanning source and CI files for provider patterns, importing pre-built templates or creating new ones, validating required secrets, and rewriting call sites with safe staged replacements. This process replaces direct invocations with reviewed template calls to prevent accidental secret leakage and ensure changes are auditable.

What is the safest way to replace shell script API calls without breaking pipelines?

The safest way to replace shell script API calls without breaking pipelines is to migrate one provider at a time, run non-destructive test calls where possible, and require a user commit checkpoint before rewriting files. Complex multi-pipe commands should be flagged for manual review rather than being automatically rewritten.

Can I migrate Stripe CLI and GitHub curl calls in Dockerfiles to Earl templates?

Yes, you can migrate Stripe CLI and GitHub curl calls in Dockerfiles to Earl templates. The process applies grep-based detection across scripts, CI workflows, Dockerfiles, and source files to find provider patterns, then imports or creates the corresponding provider template for each detected command.

How do you handle secret management when converting HTTP API invocations to templates?

Handling secret management when converting HTTP API invocations to templates requires checking and setting template-required secrets during the import or creation flow. The migration process validates these secrets and runs non-destructive test calls before any source files are rewritten to ensure credentials are correctly configured.

What are the limitations of automated CLI migration for complex multi-pipe commands?

Automated CLI migration for complex multi-pipe commands is limited because the tool flags them for manual review rather than attempting automated rewrites. Additionally, staged rewrites are capped at ten call sites per provider to keep changes small and auditable, preventing bulk unreviewed modifications across the codebase.

Why does my codebase need staged rewrites when converting raw API calls to templates?

Your codebase needs staged rewrites when converting raw API calls to templates to make call sites reviewable and reversible. By pausing for a commit checkpoint before rewriting and limiting changes to one provider at a time, the migration reduces the risk of accidental secret leakage and keeps modifications auditable.