troubleshoot-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.
Best use case
troubleshoot-earl is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using troubleshoot-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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/troubleshoot-earl/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How troubleshoot-earl Compares
| Feature / Agent | troubleshoot-earl | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
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
# Troubleshoot Earl
Cold-start diagnostic for when Earl isn't working. Follow the steps in order — each step
may reveal the root cause.
## What Agents Can Fix
- Earl not installed
- HCL parse errors
- Jinja render errors
- Template not found
- Wrong CLI flag order
- MCP config missing or incorrect
- SSRF blocks (suggest workaround)
## What Requires Human Action
- Secret values — agent prints checklist; human runs `earl secrets set <key>` manually
- `auth_code_pkce` OAuth — agent provides command; human completes browser flow
- Agent restart for MCP — agent notes this; continues with CLI mode
- macOS keychain access dialog — agent warns; human clicks "Always Allow"
---
## Step 1: Earl Doctor
```bash
earl doctor
```
If this fails with `command not found: earl`, Earl is not installed. Install it:
```bash
cargo install earl # requires Rust toolchain + Node.js + pnpm
# or: curl -fsSL https://raw.githubusercontent.com/mathematic-inc/earl/main/scripts/install.sh | bash
# Windows: irm https://raw.githubusercontent.com/mathematic-inc/earl/main/scripts/install.ps1 | iex
```
If `earl doctor` reports other failures, address each one before continuing.
---
## Step 2: Validate Templates
```bash
earl templates validate
```
Fix any errors found. Common errors and fixes:
| Error message | Cause | Fix |
| --------------------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------ |
| `HCL parse error` / `unexpected token` | Invalid HCL syntax | Check structure, quotes, and braces |
| `template root must be an object` | Missing top-level fields | Add `version = 1` and `provider = "..."` |
| `template must define either 'commands' or 'command', not both` | Used both singular and plural form | Use only `command` blocks |
| `command X has empty title` | Missing `title` field | Add `title = "..."` to the command block |
| `undefined variable` | `{{ args.x }}` doesn't match a param name | Check that param names match `{{ args.x }}` references |
| `params = [{{ ... }}]` | Bare Jinja in HCL array | Wrap in string: `params = ["{{ ... }}"]` |
---
## Step 3: Check Template Exists
```bash
earl templates list
```
If the expected `provider.command` is not listed:
- Check that the file is in `./templates/` or the global template directory:
`~/.config/earl/templates/` (macOS/Linux) or `%APPDATA%\earl\templates\` (Windows)
- Check that `provider` in the HCL matches what you're calling (`earl call <provider>.<command>`)
- Re-run `earl templates validate` to catch parse errors
---
## Step 4: Check Secrets
```bash
earl secrets list
```
If required secrets are missing, print the checklist:
```
Run in your terminal:
earl secrets set <provider>.<key>
Tell me when done and I'll verify.
```
**macOS note:** If `earl secrets set` hangs for more than 5 seconds, check for a macOS system
dialog behind your terminal window asking to allow Earl keychain access. Click "Always Allow."
After confirmation, re-run `earl secrets list` to verify keys are set.
---
## Step 5: Check MCP Config (if using MCP)
Check that the MCP config file exists and contains the `earl` entry:
**Claude Code:** `.claude/settings.json`
```json
{
"mcpServers": {
"earl": {
"command": "earl",
"args": ["mcp", "stdio"]
}
}
}
```
Note: `["mcp", "stdio", "--mode", "discovery"]` is also valid — it is used when the template
count is ≥ 30 (per `setup-earl` Phase 3). Do not remove the `--mode discovery` flag from a
config that already has it; that would silently downgrade to full mode.
**Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS),
`%APPDATA%\Claude\claude_desktop_config.json` (Windows), or
`~/.config/Claude/claude_desktop_config.json` (Linux)
**Cursor:** `.cursor/mcp.json` (project directory)
**Windsurf:** `.windsurf/mcp.json` (project directory)
If the config is missing or incorrect, write it (merging with existing entries, not overwriting).
**MCP tools not visible?** The config is correct but MCP tools only activate after restarting
the agent. In the current session, use `earl call --yes --json` via Bash instead.
---
## Step 6: Run the Failing Command
If all above pass, run the failing command directly and examine the output:
```bash
earl call --yes --json <provider>.<command> --<param> <value>
```
Match the error to the table:
| Symptom | Category | Fix |
| -------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HCL parse error` / `unexpected token` | HCL syntax | Agent: edit template, re-validate |
| `undefined variable` / `template error` | Jinja render | Agent: fix `{{ args.* }}` references |
| HTTP 401 / 403 | Auth failure | Human: `earl secrets set <key>` |
| `address not allowed` | SSRF block | Agent: use a public URL, or use `bash` protocol for local services |
| `command not found: earl` | Not installed | Agent: run install script |
| `no such command` | Wrong command name | Agent: check `earl templates list` |
| MCP tool not visible in agent | MCP not configured or restart needed | Agent: write/fix config; tell user to restart |
| `earl call` hangs waiting for input | `--yes` flag in wrong position | Agent: reorder — `earl call --yes --json provider.command ...` |
| `earl secrets set` hangs | macOS keychain dialog | Human: click "Always Allow" in system dialog |
| OAuth flow required | Browser-based auth | Human: run `earl auth login <profile>`, complete browser flow |
| `unknown environment` / `invalid environment name` | Bad `--env` value | Agent: check `environments` block in template for valid names |
| `vars.*` resolves to empty string | No active environment | Agent: pass `--env <name>` or set `[environments] default` in config.toml |
| `environment protocol switching not allowed` | Protocol mismatch in environment override | Agent: prefer `vars.*` for different base URLs; only add `allow_environment_protocol_switching = true` to `annotations` if a protocol change is genuinely required (bypasses HTTP egress rules — see `secure-agent`) |
---
## Next Steps
- If the issue was a missing template: invoke `create-template`
- If the issue was MCP config: config is now written; restart your agent for MCP tools to activate
- If the issue required browser OAuth: run `earl auth login <profile>`, then retry the command
- If Earl still isn't working after all steps: run `earl doctor --json` and share the outputRelated Skills
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.
setup-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
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
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
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
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.
linux-troubleshooting
Linux system troubleshooting workflow for diagnosing and resolving system issues, performance problems, and service failures.
earllm-build
Build, maintain, and extend the EarLLM One Android project — a Kotlin/Compose app that connects Bluetooth earbuds to an LLM via voice pipeline.
devops-troubleshooter
Expert DevOps troubleshooter specializing in rapid incident response, advanced debugging, and modern observability.
claude-in-chrome-troubleshooting
Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.
power-bi-performance-troubleshooting
Systematic Power BI performance troubleshooting prompt for identifying, diagnosing, and resolving performance issues in Power BI models, reports, and queries.
writing-clearly-and-concisely
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.