skills/runtime/earl/SKILL.md
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.
npx skillsauth add mathematic-inc/earl earlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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).
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:
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.
Read the matched command's parameter schema from the search result. For each required parameter:
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.commandwith these arguments:{param: value}Does this look right?
Wait for explicit approval before continuing.
Flag order is strict — --yes and --json must come before the command name:
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:
earl call --yes --json provider.command --param value
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 | 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. |
| 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." |
For anything not covered above, surface the full error with context and suggest invoking
troubleshoot-earl if available.
troubleshoot-earlsecure-agenttools
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.
tools
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.
tools
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.
tools
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.