migrate-to-earl

migrate-to-earl is a skill for Claude Code, Codex from mathematic-inc/earl. It costs 69 tokens per session (1,785 once invoked), scanned A, original, Apache-2.0.

A migration workflow that replaces direct command-line or API calls in a codebase with reviewed Earl templates, one service provider at a time. Earl templates are predefined request patterns for making those calls.

In plain words
What is it for?
Use it to scan a project for raw calls such as curl, gh, stripe-cli, psql, or grpcurl and convert eligible calls to Earl templates.
Why use it?
It keeps a migration limited and reviewable, while flagging complex pipelines or extra call sites for manual work. It also pauses at a checkpoint before rewriting existing calls.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan a project for raw calls such as curl, gh, stripe-cli, psql, or grpcurl and convert eligible calls to Earl templates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mathematic-inc/earl/migrate-to-earl
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mathematic-inc/earl --skill migrate-to-earl
Clone the repo
git clone --depth 1 https://github.com/mathematic-inc/earl

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-to-earl

README.md
[![agentmods](https://agentmods.dev/badge/skills/mathematic-inc/earl/migrate-to-earl.svg)](https://agentmods.dev/skills/mathematic-inc/earl/migrate-to-earl)
Your own site
<a href="https://agentmods.dev/skills/mathematic-inc/earl/migrate-to-earl"><img src="https://agentmods.dev/badge/skills/mathematic-inc/earl/migrate-to-earl.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,785 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 115
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Rogue Agent · line 48
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Data Exfiltration · line 81
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 169
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01785
Opus 5 $0.00034 $0.00892
Sonnet 5 $0.00014 $0.00357
Haiku 4.5 $0.00007 $0.00178

Measured 8d ago against content hash 267cb0c58bf3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

migrate-to-earl scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Scans a codebase for raw API/CLI calls (curl, gh, stripe-cli, psql, grpcurl, etc.) and replaces them with Earl templates — one provider at a time. Use when migrating a project from direct CLI tool usage to E

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(["curl", "-H", f"Authorization: Bearer {token}", url])
skills/development/migrate-to-earl/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate to Earl

Converts existing raw CLI/API calls in a codebase to Earl templates. Works one provider at a time to keep changes reviewable and reversible.

Scope Constraints (Read First)

These rules prevent context window exhaustion and partial-migration messes:

  1. One provider per run. If multiple providers are found, ask which to migrate first.
  2. Cap at 10 call sites. If more than 10 are found, ask which 10 to prioritize. Flag the rest with # TODO: migrate to earl comments and note them in the final report.
  3. Commit checkpoint. Pause after template creation, before rewriting call sites. Let the user commit the template before the rewrite begins.
  4. Flag complex pipelines. Multi-pipe commands (curl | jq | xargs) are not rewritten. Add # TODO: migrate to earl (complex pipeline — review manually) and move on.

Phase 1: Scan All Providers

Read references/cli-to-earl-mapping.md (or fetch from https://raw.githubusercontent.com/mathematic-inc/earl/main/skills/development/migrate-to-earl/references/cli-to-earl-mapping.md) for the full list of patterns and files to scan.

Grep across all relevant files for every pattern in the mapping table. Even on repeated invocations, always do a full scan first.

Present a summary before asking the user to pick a provider:

"Found API/CLI calls to:

  • GitHub (12 sites in 4 files)
  • Stripe (8 sites in 2 files)
  • Slack (3 sites in 1 file)

Which provider would you like to migrate first?"

If only one provider is found, proceed with it directly.

Note the remaining providers in the report so the user knows what's left for follow-up runs.


Phase 2: Import Pre-built or Create Custom

Check if a pre-built template exists for the chosen provider (see references/cli-to-earl-mapping.md).

If pre-built exists:

Check earl templates list first — if the provider is already imported, skip the import command below and go directly to showing available commands.

earl templates import https://raw.githubusercontent.com/mathematic-inc/earl/main/examples/<provider>.hcl
earl templates list

Read the full file on GitHub · 229 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 229 lines · 69 tokens per session scan A 267cb0c58bf3

Subscribe to this mod's changes

migrate-to-earl is a skill published in the GitHub repository mathematic-inc/earl (113 stars, last pushed 3d ago), licensed Apache-2.0. It adds 69 tokens to every session and 1,785 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

api-design-patterns

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.

bobmatnyc/claude-mpm · 29 tokens

api-design

Design and implement RESTful APIs with proper routing, validation, error handling, and documentation. Use when building new API endpoints, designing API architecture, or improving existing APIs.

asgarovf/locusai · 37 tokens

mcp2cli

Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI. Use this skill when the user wants to interact with an MCP server, OpenAPI/REST API, or GraphQL API via command line, discover available tools/endpoints, call API operations, or generate a new skill from an API. Triggers include "mcp2cli", "call this…

knowsuchagency/mcp2cli · 126 tokens

lap

LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill…

Lap-Platform/LAP · 89 tokens

lap

LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill…

Lap-Platform/LAP · 89 tokens

api-design-patterns

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.

aAAaqwq/AGI-Super-Team · 29 tokens