Skip to content
Back to skills

Tier Injection

ASecurity

Installs the tier kit so a subagent runs on the model its tier names. Use when a host must pin the model of a spawn or a subagent ignores its tier.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 5, 2026
developmentpythonbash

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 5, 2026

npx -y skills add niksavis/handily --skill tier-injection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tier Injection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tier Injection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/niksavis-tier-injection/badge)](https://www.skillsdirectory.com/skills/niksavis-tier-injection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tier-injection
description: Installs the tier kit so a subagent runs on the model its tier names. Use when a host must pin the model of a spawn or a subagent ignores its tier.
---
<!-- 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

- **Check `CLAUDE_CODE_SUBAGENT_MODEL` first when a spawn ignores its tier.** It outranks the value the hook writes, and the hook stays silent.
- **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.

| Host | Result |
| --- | --- |
| Claude Code | A `PreToolUse` hook on the `Agent` tool |
| Copilot CLI | Nothing. Copilot selects the model of a subagent in its configuration, and the kit does not write that configuration |

## Install

```bash
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](references/install.md).

## Check a resolution without a spawn

```bash
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.
- A tier that the map marks `unavailable` resolves to nothing, never to the model of another tier.

## When the repository requires tier-only dispatch

- A dispatch declares a tier: `low`, `medium`, `high` or `maximum`. It never names a provider model id; the tier kit's model map resolves the tier.
- Choose the tier by the cost per landed correct change: tokens, time and human interventions. A weak model's mistakes return as rework on the same change.
- Use `low` only for work whose wrong answer a check catches and a rerun fixes cheaply. Start implementation from prose, decomposition, design and costly judgements at `high`.
- A dispatch with no tier is a bug. It inherits the session's own model.

Files in this skill

  • SKILL.md3.2 KB
  • references/install.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.