/ai-meter:delegatefrom ai-meter
Delegates self-contained coding tasks (reading code, finding usages, drafting tests, small fixes) to free models or user's other subscription plans via AI Meter, saving coordinator quota.
Ships in ai-meter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The ai-meter-delegate tools run a task with a coding agent already set up on this PC (Pi or OpenCode, or AI Meter's managed Pi), on a free model whose pool has room according to AI Meter, or, when the user agrees, with Codex or Claude Code on one of the user's subscription plans (see Subscription plans below). You stay the coordinator: you write the task, check the answer and decide what to keep.
Good fits:
Keep it yourself when the task needs this conversation's context, a design decision, security-sensitive judgement, or secrets. Check the free model's answer as carefully as a stranger's: it may be shallower or wrong.
The task, and every file the agent reads, go to the provider of the chosen model. Providers of free models may log prompts or train on them. So the plugin never runs an agent in the user's folder itself:
read_only works on a copy of the files Git tracks or would track, as they are on disk. Ignored files, symbolic links, submodules and files whose names suggest secrets (.env and its variants except .env.example, .npmrc, *.pem, *.key, private SSH keys) are left out; secret_files_left_out lists those it found. The copy is removed when the task ends.modify works in a new worktree made from the last commit, so ignored files such as .env are not in it. Committed files that look like secrets are, and worktree.committed_secrets_visible lists them: tell the user.delegate_candidates lists where a task can run now: candidates in AI Meter's order, each with its context_tokens, max_output_tokens and why, the reason for its place; each pool's room (and the warnings shared by all its candidates), why other models are left out, and the agents found. excluded names the models only where you could act on the reason; otherwise it gives a count. Without model, the first candidate that starts is used. AI Meter puts first the models the user prefers, then pools with room, then the models that worked best on this PC (completed tasks minus failed and rate-limited ones, over 30 days), then models with a reply of at least 16k tokens, the largest models (unknown sizes first), the largest context and the fastest measured; for the same model, the agent with the smaller fixed cost per request (Pi about 4,600 tokens of system prompt per request, OpenCode about 9,600) and the one in the plugin's place. No catalogue states quality, so choose yourself when it matters, and pass model and runtime:
runtime, and where) when they have one.delegate with:
task: complete instructions. Name the files, say what to look for and the shape of the answer. The agent sees nothing else;workspace: the absolute path of the repository root (the server may not run in it); it must be in a Git repository;mode: read_only (default), or modify for a task that changes files;model, runtime, where, managed, min_context, timeout_seconds;wait_seconds up to 50, so that short tasks answer in the same call.status is queued, starting or running, call delegate_result with wait_seconds: 50. delegate_status lists recent jobs; delegate_cancel stops one, with the processes it started, and releases its lease. timeout_seconds covers the whole job, choosing the candidate included. At most four jobs run at once: a fifth is refused until one ends.answer is only the agent's own claim. A wrong but confident answer is common on small free models.
activity, which the plugin builds from the agent's tool events: calls (each tool call, its arguments in one line, and failed), files_written, and commands with ok, exit_code and output_tail, the end of the output. An answer that says tests pass needs a test command with ok: true and a passing result in its output_tail; one that says a file was changed needs that file in files_written. A claim with no matching call is unverified: say so, or check it yourself. No activity means the agent made no tool call.activity shows that a command ran, not that it tested the right thing.activity is not a failed task: agents often try a command that does not match and go on.completed means the agent ended normally; an answer cut off for length, or output the plugin could not read, is failed with the reason in error. On a completed task error is null; errors the agent recovered from, such as a rate limit it retried, are in counters.recovered_errors and need no action. Tokens are null when no event reported them, which is not zero.modify, review the worktree. The change is in worktree.path, on branch worktree.branch, made from the commit worktree.base (uncommitted changes in the user's checkout are not in it). worktree.commits lists commits the agent made, and files and diff_stat compare with the base, so they include them. New files are in the diff too, with status A (the plugin marks them intent-to-add, without staging content). Nothing is merged. Read the diff (worktree.review), then bring the change over yourself only if the user agrees, or discard it with worktree.discard.duration_seconds), and the requests and tokens from counters.error with excluded and runtimes: no free model fits, or no agent has a key of its own. Explain the reasons. runtimes.unsupported lists agents that are installed but cannot be used (such as Gemini CLI, or Codex and Claude Code on Windows), each with a detail sentence you can show. Never install an agent or handle a key: the user sets agents up.next_step (in the report, or in delegate_candidates when it finds no candidate): one sentence saying what the user can do in AI Meter's Settings so that a task can run, such as having AI Meter set up its copy of Pi, ticking a service's key for it, or starting WSL; or, after Cloudflare refused a task's token, adding the Workers AI permission to that token in Cloudflare's dashboard (the key in AI Meter is right, so do not send the user to AI Meter's Settings for it); or, after Cloudflare refused a model it keeps for its paid plan, choosing another model. Relay it to the user as it is; do not try to do it yourself.error that ends with the agent's exit code and the start of its error output, such as "No API key found for openrouter.": the agent could not start the task. Show that line to the user; the fix is theirs.skipped: candidates that were tried and why, such as AI Meter's own error for that agent, an agent and place it has not verified, an agent in another WSL distribution, a key only exported in a WSL shell profile when the plugin runs on Windows, or a pool with no room.excluded with agent_lists_price: the service lists the model as free, but the agent's own list prices it, so the agent would pay for the first request before the plugin could stop it.A copy of Pi that AI Meter keeps for users with a key and no agent, inside WSL (where: "wsl", with its distro) or on Windows (where: "windows"), each installed on its own. It exists only if the user installed it in AI Meter's Settings › MCP › Delegation agent and ticked there the services whose keys it may use; neither you nor the plugin can install it or give it a key. runtimes.managed lists each copy (installed, reachable, the services it holds a key for), and its candidates have managed: true.
where only when the task needs it. managed: true pins the managed copies; managed: false keeps to the user's own agents.modify commands through Linux's bash. It works on repositories in WSL and on Windows folders; on a Windows folder, Git commands inside its working copy do not find the repository and Windows-only toolchains do not run: for such a project pin where: "windows". From WSL, only the copy in your own distribution can be used.\\wsl.localhost\..., \\wsl$\..., however the path is written) skips it, with the reason in skipped. Its modify tasks run commands through Git Bash when AI Meter has bound the copy to Git for Windows, otherwise through PowerShell, never through WSL's bash.exe.candidate.shell says which shell ran the commands. It is known only when the task starts, so in a task for a managed copy say what to run ("run the tests") rather than shell command lines.PATH included, stays. Do not rely on such variables in a task for it.grep and find tools need ripgrep and fd on PATH (Pi downloads nothing while it works); without them they fail with an error.warnings containing managed_key_redacted: the agent output one of the copy's keys (in its answer, a commit, a file name...), and the plugin removed it everywhere in the report. The model and its provider still saw it: tell the user, and never ask the managed Pi to read its own configuration.managed_key_check_failed: the key file could not be checked after the agent ended (unreadable, or its keys changed more than once or were still being changed), so its answer, activity and changes are withheld (error says why). The worktree is still there: tell the user, and review it yourself only with their agreement.Some services, such as NVIDIA and the Gemini API, do not state prices or tool support. Their models are never ordinary candidates. They can be best-effort candidates when an agent's own model list has them at no price.
delegate_candidates with include_best_effort: true lists them in best_effort. Each comes with estimated, which says what rests on the agent's word (unverified: price, tools, context, limits). Without the flag, best_effort_available counts them, and a failed job reports it too.delegate with allow_best_effort: true. Ordinary candidates are still tried first.Cloudflare Workers AI models are priced, but free within 10,000 Neurons a day. They are never candidates unless asked for: excluded reports them as free_tier_not_allowed.
delegate_candidates with include_free_tier: true lists them, with warnings: ["free_tier_budget"].delegate with allow_free_tier: true.agent_price_unknown means no agent with a Cloudflare key prices the model, so its spending would be invisible; allowance_unknown that today's use could not be read. Neither can be worked around.The user's other plan can take a task too: from Claude Code, Codex on the ChatGPT plan; from Codex, Claude Code on the Claude plan. Never the plan you run on: the plugin tells AI Meter which one that is (pass coordinator only if you are not Claude Code or Codex on your own plan). A plan task never draws on pay-as-you-go billing.
excluded reports them as plan_not_requested. delegate_candidates with include_plan: true lists them, with billing: "included_in_plan" and the plan's windows (room left, the user's reserve, the reset).delegate with allow_plan: true. Free models are still tried first, unless the plan's room is about to be lost at a reset.plan_off_in_settings: the user has not turned the plan on in AI Meter's Settings › MCP › Subscription plans. Tell them; do not work around it.plan_reserve (with until): a window is at or below what the user keeps for themselves. plan_extra_usage_on: Claude's extra usage is on and would bill past the plan. plan_credits_on: Codex would spend credits past the plan. plan_usage_unknown or plan_sign_in_not_confirmed: AI Meter cannot see the plan's room or a plan sign-in. None of these can be worked around.plan.window, the room plan.before and plan.after it. The room after includes anything else the account used meanwhile.counters.billed means the agent showed billed usage (an API key, or extra usage) and the plugin stopped it: tell the user, and do not retry on that plan.counters.paid_request: true: a request was priced above zero, so the plugin stopped the agent. That request was already made and is billed: tell the user, with counters.cost, and do not retry on the same model.counters.allowance is the budget in US dollars, and paid_request: true means the requests cost more than it: the free Neurons are used up for today. Tell the user, with counters.cost, and do not retry on that service today.warnings containing openrouter_byok_fallback (in delegate_candidates, on the OpenRouter pool): OpenRouter can retry a :free request on a provider key the user linked to OpenRouter (BYOK), billed to that account, while the agent still shows a price of zero. Mention it once. counters.byok_fallback: true means OpenRouter's error named such a key: tell the user that their linked key was used, and suggest unlinking it before delegating again.~/.aimeter/jobs. Folders of ended jobs are removed a week later, the next time a task starts; nothing removes them if no task starts again. The provider has its own copy (see "What leaves this PC").What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub dichiara19/ai-meter --plugin ai-meter