agentleFS
niksavisniksavis/handily/.agents/skills/tier-injection/SKILL.md

tier-injection

Skill2 starsChanged 34 days agoMITView on GitHub

Chooses the model for an owner, a delegated agent, an advisor or an orchestrator, and installs the tier kit that pins it. Use when deciding which model or tier a task or subagent gets, or when a subagent ignores its tier.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Delegated work names a tier: Use medium by default, high for a judgement the owner would otherwise repeat, and low only to run a test suite …

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->

Tier Injection

A subagent definition declares a portable tier: low, medium, high or maximum. The kit changes that tier into the model the spawn runs on, at spawn time.

Rules

  • Set CLAUDE_CODE_SUBAGENT_MODEL as a machine-wide default. Then no untiered subagent inherits the session model. Since Claude Code 2.1.251 a model the hook writes outranks the variable; on an older Claude Code the variable wins.
  • Relaunch the whole CLI process after a first install. The host does not watch a directory that did not exist at startup. /clear reloads neither hooks nor agents.
  • Remove a model pin to let the tier decide. The hook leaves a definition that pins its own model, and a spawn that names one.
  • Commit .basicly/core/models/model-map.json in the repository. A repository with no map in its own tree gets no rewrite.

What the kit is

The kit is three files in .basicly/core/kit/tier/: install_hook.py, claude_tier_hook.py and tier_resolver.py. It needs no basicly import, nothing on PATH, no third-party package and no network. Copy the three files and .basicly/core/models/model-map.json into any repository, and the kit works there.

HostResult
Claude CodeA PreToolUse hook on the Agent tool
Copilot CLINothing. Copilot selects the model of a subagent in its configuration, and the kit does not write that configuration

Install

python3 .basicly/core/kit/tier/install_hook.py --dry-run
python3 .basicly/core/kit/tier/install_hook.py
python3 .basicly/core/kit/tier/install_hook.py --user

A second run changes nothing. For every flag (--user, --host, --root, --interpreter, --uninstall) and the command each scope writes, read install.

Check a resolution without a spawn

python3 .basicly/core/kit/tier/tier_resolver.py --host claude --name my-agent

It exits 0 with a model and an alias, or exits 1 with the reason that nothing resolved. Other options: --definition <path>, --tier <tier>, --default-tier <tier>, --vendor <vendor>, --map <path> and --root <path>.

Behaviour to expect

  • The hook writes an alias such as opus, not a model id. The model field of the Agent tool takes an alias. The frontmatter of a definition takes a full model id.
  • An unresolved tier declared by an agent refuses its spawn where this kit has an installed model map. Repair the map or explicitly select a supported model. An optional default does not block a spawn.
  • The map records a concrete model version. Claude aliases select a family through the host's model settings. Compare resolved and observed models before using a run as evidence for a specific version.

Choose the model by role

  • Owner. One model owns a task from start to finish. Start on the high model.
  • Delegated work names a tier. Use medium by default, high for a judgement the owner would otherwise repeat, and low only to run a test suite or a mechanical search. A dispatch never names a provider model id; the model map resolves the tier.
  • maximum is Fable, and Fable is never a delegated worker. It has two roles. As advisor (/advisor fable), ask it when a problem survived two failed approaches or a decision is hard to undo. As orchestrator, make it the session model for work larger than one context window, or for routine work with a long cost tail.
  • Raise the effort level before you add a second model.
  • A start with no tier and no model runs on the session model. Name the model in the call. As a net, set BASICLY_DEFAULT_TIER=medium in the env block of a Claude settings file: the hook then gives an untiered general-purpose start that tier.

For the measured cost of each choice, read roles.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.