frugal-subagents

frugal-subagents is a skill for Claude Code from ikotelkin/claude-skills. It costs 211 tokens per session (2,074 once invoked), scanned B, original, MIT.

A plugin that controls how helper agents are started in Claude. It can select a cheaper default model, block helpers from creating more helpers, cap session-wide spawns, and report when a call is changed or blocked.

In plain words
What is it for?
Use it to enforce model and delegation rules around Agent calls, with optional settings for strict model selection, nested helpers, and spawn limits.
Why use it?
It prevents recursive delegation and uncontrolled model usage from exhausting a session's allowance.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions subagents; mentions Claude Code.

Part of the frugal-subagents plugin — 1 skill, 2 agents, 1 hook shipped together

Good fit Use it to enforce model and delegation rules around Agent calls, with optional settings for strict model selection, nested helpers, and spawn limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ikotelkin/claude-skills/frugal-subagents
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 ikotelkin/claude-skills --skill frugal-subagents
Clone the repo
git clone --depth 1 https://github.com/ikotelkin/claude-skills

Made for: Claude Code.

Or install frugal-subagents, the plugin that ships this one along with the rest of its 1 skill, 2 agents, 1 hook.

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 frugal-subagents

README.md
[![agentmods](https://agentmods.dev/badge/skills/ikotelkin/claude-skills/frugal-subagents/github.svg)](https://agentmods.dev/skills/ikotelkin/claude-skills/frugal-subagents)
Your own site
<a href="https://agentmods.dev/skills/ikotelkin/claude-skills/frugal-subagents"><img src="https://agentmods.dev/badge/skills/ikotelkin/claude-skills/frugal-subagents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frugal-subagents

Your own site · 80×15
<a href="https://agentmods.dev/skills/ikotelkin/claude-skills/frugal-subagents"><img src="https://agentmods.dev/badge/skills/ikotelkin/claude-skills/frugal-subagents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 211 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00211 $0.02074
Opus 5 $0.00105 $0.01037
Sonnet 5 $0.00042 $0.00415
Haiku 4.5 $0.00021 $0.00207

Measured 4d ago against content hash 23889c313104, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

frugal-subagents scanned grade B 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (hooks/guard.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

2. Offer to install Node.js LTS and wait for a yes. Use the platform's package manager: Windows `winget install OpenJS.NodeJS.LTS`; macOS `brew install node` (or the installer from nodejs.org if Homebrew is absent); Debi

Runs shell commandslowCapability

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

const {spawnSync}=require('child_process');
skills/frugal-subagents/SKILL.md · 96 lines

How it starts

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

Frugal Subagents

Why

Delegation is where a session's budget leaks. Subagents inherit the parent's model unless told otherwise, so a top-tier session that fans out three research agents is running three more copies of its most expensive model — and if one of them fans out again, the cost multiplies silently. On subscription plans that can exhaust the limit in minutes, with most results lost to rate limits. Written rules ("use sonnet for scans") don't survive context compaction; this plugin turns them into a hook, which does.

What the hook enforces

Every Agent call passes through hooks/guard.js before it runs. Nothing is silent: when the hook fills in a model it says so in the tool result, and a blocked call returns the reason as tool feedback.

Rule Default Lift / tune
No model given → the default cheap model is injected sonnet FRUGAL_SUBAGENTS_DEFAULT_MODEL=haiku; strict mode FRUGAL_SUBAGENTS_REQUIRE_MODEL=1 denies instead of defaulting
No subagents from inside a subagent on FRUGAL_SUBAGENTS_ALLOW_NESTED=1
Spawns per session 12 FRUGAL_SUBAGENTS_MAX_SPAWNS=<n>
Ceiling on subagent tier off FRUGAL_SUBAGENTS_MAX_TIER=sonnet (or haiku, opus)
Everything off FRUGAL_SUBAGENTS_OFF=1

Variables go into the user's or project's settings.json under "env", or the shell environment. The user changes them, not the session: a denied call is policy, and splitting or rephrasing a call to get around it is not an option.

How to delegate under the guard

Pick the tier by what the work costs, not by how important it feels. Search/fetch volume, page scanning, listing comparison, extraction, renames, tests-to-a-spec → sonnet or haiku (leaving model out gives the default, sonnet). The session's own top-tier model is for judgment that cannot be delegated — decomposition, contested decisions, final synthesis — and normally stays in the main session; name it explicitly on a subagent only when that judgment genuinely has to run in a separate context.

Read the full file on GitHub · 96 lines

Files

What ships with it

6 files 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. 4d ago First seen · 96 lines · 211 tokens per session scan B 23889c313104

Subscribe to this mod's changes

frugal-subagents is a skill published in the GitHub repository ikotelkin/claude-skills (3 stars, last pushed 5d ago), licensed MIT. It adds 211 tokens to every session and 2,074 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-08.

Related

Other skills, from other repositories

skill-curator

A Chinese-language evaluator for deciding whether developer tools and agent resources are suitable for a curated collection. It checks real repositories, installation paths, activity, duplicates, and security boundaries using evidence.

laolaoshiren/claude-code-skills-zh · 75 tokens

git-workflow

A guide for handling Git repository work safely, including status checks, branches, commits, pushes, pull requests, and rebasing. Git is a version-control system that records code changes and coordinates work between developers.

laolaoshiren/claude-code-skills-zh · 73 tokens

env-manager

An environment-variable manager for project settings stored outside the code, often in .env files. It checks variable definitions and usage while keeping secret values out of reports and terminal output.

laolaoshiren/claude-code-skills-zh · 22 tokens

perf-profiler

A performance investigation guide that uses repeatable measurements and profiling evidence to find where software spends time or resources. Profiling records runtime activity such as CPU use, memory use, database work, or network delays.

laolaoshiren/claude-code-skills-zh · 78 tokens

changelog-gen

A changelog generator that turns Git history into a version-by-version record of project changes. A changelog is a readable summary of new features, fixes, breaking changes, documentation, and other updates.

laolaoshiren/claude-code-skills-zh · 19 tokens

i18n-helper

A helper for adding internationalization, which lets software show different languages and regional text. It finds user-visible text written directly in code and moves it into language files.

laolaoshiren/claude-code-skills-zh · 33 tokens