earl

Use when you need to call an API, run a database query, or execute a shell command via Earl. Discovers available commands and calls them correctly. Do not use raw curl, gh, psql, or similar tools when Earl is available.

111 stars

Best use case

earl is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when you need to call an API, run a database query, or execute a shell command via Earl. Discovers available commands and calls them correctly. Do not use raw curl, gh, psql, or similar tools when Earl is available.

Teams using earl should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/earl/SKILL.md --create-dirs "https://raw.githubusercontent.com/mathematic-inc/earl/main/skills/runtime/earl/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/earl/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How earl Compares

Feature / AgentearlStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when you need to call an API, run a database query, or execute a shell command via Earl. Discovers available commands and calls them correctly. Do not use raw curl, gh, psql, or similar tools when Earl is available.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Earl

Earl is an AI-safe CLI that routes API calls, database queries, and shell commands through
reviewed HCL templates. Secrets stay in the OS keychain. You do not know what templates are
installed — discover them at runtime.

---

## Step 1: Detect Mode

Check which Earl interface is available:

**MCP discovery mode** — if `earl.tool_search` and `earl.tool_call` are available as MCP tools,
use them. Skip to Step 2 (MCP path).

**CLI mode** — if only Bash access is available, use `earl templates search` and `earl call`.
Skip to Step 2 (CLI path).

---

## Step 2: Find the Right Command

Translate your task into a short search query (e.g. "list github pull requests",
"send slack message", "query user table").

**MCP discovery path:**

```
earl.tool_search(query="<intent>", limit=5)
```

**CLI path:**

```bash
earl templates search --json "<intent>"
```

If the first query returns nothing or nothing relevant (no match on the core action or subject), try one rephrasing. If still nothing,
report that no template covers this task and stop. Do not improvise.

---

## Step 3: Inspect Parameters

Read the matched command's parameter schema from the search result. For each required parameter:

- If the value is clear from task context: use it.
- If the value is ambiguous or missing: ask the human. Do not guess.
- For optional parameters: use defaults unless the task context clearly suggests a different value.

---

## Step 4: Get Permission for Write-Mode Commands

Check the command's mode from the search result.

**Read-mode:** proceed directly to Step 5.

**Write-mode:** show the human exactly what will be called before executing:

> I'm going to call: `provider.command` with these arguments: `{param: value}`
> Does this look right?

Wait for explicit approval before continuing.

---

## Step 5: Call

Flag order is strict — `--yes` and `--json` must come before the command name:

```bash
earl call --yes --json provider.command --param value   ✓
earl call provider.command --yes --json --param value   ✗
```

**MCP discovery path:**

```
earl.tool_call(name="provider.command", arguments={"param": "value"})
```

**CLI path:**

```bash
earl call --yes --json provider.command --param value
```

---

## Step 6: Handle the Result

Return the result to the user.

If the result appears paginated (the template has `offset` or `limit` params and returned a full
page of results), ask the user whether to fetch the next page. Do not paginate automatically.

---

## Error Handling

### Fix inline

| Error | Fix |
|-------|-----|
| `--yes` / `--json` after command name | Retry with flags before command name |
| Type mismatch (string where number expected) | Coerce if unambiguous; otherwise ask human |
| `no such command` | Re-search with a broader query |
| `address not allowed` | Report: this endpoint is blocked by Earl's network policy. Stop. |
| `HCL parse error` / `template error` | Report: the template is broken. Stop. Suggest `troubleshoot-earl`. |

### Pause for human

| Error | What to do |
|-------|------------|
| HTTP 401 / 403 | Run `earl secrets list`, identify the missing or expired key |
| Secret not set | Print `earl secrets set <key>` for the human to run. Wait for confirmation before retrying. |
| OAuth required | Print `earl auth login <profile>`. Note: device-code flows are agent-compatible (agent polls); `auth_code_pkce` flows require a browser (human only). |
| `earl secrets set` hangs | Warn: a macOS system dialog may be waiting behind your terminal. Click "Always Allow." |

### Escalate

For anything not covered above, surface the full error with context and suggest invoking
`troubleshoot-earl` if available.

---

## Next Steps

- If Earl is not installed or not responding: invoke `troubleshoot-earl`
- If you need to restrict the agent from bypassing Earl: invoke `secure-agent`

Related Skills

troubleshoot-earl

111
from mathematic-inc/earl

Diagnoses and fixes Earl problems including installation failures, template errors, authentication issues, MCP connectivity, and SSRF blocks. Use when Earl isn't working, when earl call returns errors, when MCP tools are not visible, or when earl doctor reports failures.

setup-earl

111
from mathematic-inc/earl

Installs Earl, configures MCP integration for your agent platform, writes CLAUDE.md instructions, and routes to template creation or migration. Use when setting up Earl for the first time, when a new developer is onboarding to a project that uses Earl, or when Earl needs to be connected to an agent platform.

migrate-to-earl

111
from mathematic-inc/earl

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 Earl, or when replacing raw HTTP calls with reviewed templates.

secure-agent

111
from mathematic-inc/earl

Locks down an AI agent by configuring platform-level tool restrictions (deniedTools) and Earl network egress rules. Use after Earl is working and templates are created, to make Earl's security guarantee enforceable rather than advisory.

create-template

111
from mathematic-inc/earl

Creates a new Earl HCL template for a specific API, database, or shell command. Use when adding a new service to Earl's template library, or when a pre-built template doesn't cover a needed command.

recall_ai

111
from mathematic-inc/earl

Use recall.ai to record video meetings, retrieve transcripts, and access recordings. Use when the user wants to record a meeting, get a transcript, summarize a call, or access meeting audio/video.

earllm-build

31392
from sickn33/antigravity-awesome-skills

Build, maintain, and extend the EarLLM One Android project — a Kotlin/Compose app that connects Bluetooth earbuds to an LLM via voice pipeline.

Mobile DevelopmentClaudeCursorGemini

writing-clearly-and-concisely

24269
from davila7/claude-code-templates

Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.

early-stopping-callback

1868
from jeremylongshore/claude-code-plugins-plus-skills

Early Stopping Callback - Auto-activating skill for ML Training. Triggers on: early stopping callback, early stopping callback Part of the ML Training skill category.

writing-clearly-and-concisely

662
from wimpysworld/nix-config

Core writing rules for clear, concise prose. Load when writing any text a human will read.

early-warning-monitor

509
from a5c-ai/babysitter

Continuous supplier and supply chain risk monitoring with automated alerts

early-access-email-sequence

381
from gooseworks-ai/goose-skills

Generate a personalized 7-email onboarding sequence for Goose early access signups. Takes a LinkedIn profile URL and company domain, researches the person and company, classifies their role, and produces all 7 emails ready to send — personalized with real context, not merge tags. Outputs to a Notion database (one row per user, columns for each email). Use this skill whenever someone signs up for Goose early access, when you need to generate onboarding emails for new users, when the user says "generate emails for a new signup", "onboard this person", "add them to the email sequence", or provides a LinkedIn URL with a company domain in the context of the launch. Also use when processing a batch of signups.