jl-cmd-projects/claude-dev-env/tree/main/packages/subagent-models
subagent-models
서브에이전트 모델과 에이전트 유형을 켜거나 끄고, 서브에이전트가 실행할 때 사용할 작업 강도를 /config의 기본값으로 또는 /subagent-models를 통해 한 세션에만 설정합니다.
이 mod 소개
subagent-models
서브에이전트가 사용할 수 있는 모델과 에이전트 유형, 그리고 실행 강도를 결정하는 Claude Code mod입니다.
기능
- 꺼진 모델을 지정한 spawn은 대신 기본 모델로 실행됩니다.
offAction을deny로 설정하면 사용할 모델을 명시한 메시지와 함께 spawn이 거부됩니다. - 전체 모델 id는 제품군별로 계산됩니다.
claude-fable-5-1은 fable입니다. - 꺼진 에이전트 유형도 모델의 에이전트 목록에는 남지만, 해당 유형을 지정한 spawn은 거부됩니다.
- 꺼진 스킬도 모델의 스킬 목록에는 계속 표시됩니다. 모델이나 사용자가 실행하면 스킬 텍스트가 꺼져 있다는 안내로 바뀌므로 모델이 건너뜁니다.
tdd같은 짧은 이름도pstack:tdd와 일치합니다. - 기본 모델은 항상 허용되므로 꺼진 모델에는 언제나 이동할 곳이 있습니다.
- 서브에이전트가 보내는 모든 요청은 설정한 강도로 실행됩니다. 주 대화는 자체 모델과 강도를 유지합니다.
applyToRunning을 켜면 실행 중인 서브에이전트에 다음 요청부터 강도 변경이 전달됩니다. 끄면apply또는 바의apply now버튼이 모두를 이동할 때까지 각 서브에이전트가 시작 당시의 강도를 유지합니다.- 에이전트 정의에서 모델을 받는 서브에이전트는 첫 요청에서 포착되어 같은 방식으로 이동합니다.
- fork는 부모를 상속하고 그대로 통과합니다. 모델을 지정하지 않은 spawn도 같습니다.
- 푸터 필에는
opus/medium처럼 기본 모델과 강도가 표시됩니다.*는 이 세션이 기본값과 다르다는 뜻입니다. 클릭하면 바를 열거나 닫습니다.
설정
/config에는 새 세션이 시작할 때마다 적용되는 기본값이 들어 있습니다.
| 설정 | 옵션 | 기본값 |
|---|---|---|
| Opus 서브에이전트 | on, off | on |
| Fable 서브에이전트 | on, off | off |
| Sonnet 서브에이전트 | on, off | off |
| Haiku 서브에이전트 | on, off | on |
| 기본 서브에이전트 모델 | opus, sonnet, haiku, fable | opus |
| 서브에이전트 강도 | inherit, low, medium, high, xhigh, max | medium |
| spawn이 꺼진 모델을 지정할 때 | move, deny | move |
| 강도 변경을 실행 중인 서브에이전트에 전달 | on, off | on |
| 꺼진 에이전트 유형 | Explore, Plan 같은 쉼표로 구분한 에이전트 유형 | none |
| 꺼진 스킬 | pstack:tdd, simplify 같은 쉼표로 구분한 스킬 | none |
| 스킬을 미사용으로 계산하기 전 일수 | unused after 메뉴의 시작 기준이 되는 정수 | 14 |
이 명령은 기본 모델을 끄는 것과 꺼진 모델을 기본 모델로 지정하는 것을 모두 거부합니다.
이 세션에서만
/subagent-models는 다음 spawn부터 현재 세션을 변경하며 다른 세션은 건드리지 않습니다.
/subagent-models는 적용 중인 값을 출력하고 이 세션에서 변경한 값에 표시를 붙입니다./subagent-models fable on은 이 세션에 한해 값 하나를 설정합니다. 설정 이름은 무엇이든 가능하지만 해당 옵션 중 하나를 사용해야 합니다./subagent-models agents는 이 세션에서 제공된 에이전트 유형을 각각의 스위치와 함께 나열합니다./subagent-models agent Explore off는 이 세션에서 에이전트 유형 하나를 끕니다.on으로 다시 켤 수 있습니다./subagent-models skills는 세션에 있는 스킬을 각각의 스위치와 함께 나열합니다./subagent-models skill pstack:tdd off는 이 세션에서 스킬 하나를 끕니다.- 프롬프트 위의 테두리 바는 모든 설정을 4개의 동일한 열로 된 격자에 담습니다. 머리글 행에는 제목,
opus · medium · 2 of 4 models on같은 요약,minimize버튼이 있습니다. 그 아래 4개의 색상 구간이 켜진 모델을 보여 주고, 다시 그 아래에는 점, 이름,on또는off버튼으로 된 모델 항목 4개가 있습니다. 다음 행에는 기본 모델, 강도, 끄기 동작, 실행 중 서브에이전트용 드롭다운이 있습니다. 마지막 행에는agents와skills버튼,apply to running, 저장 또는 초기화하는more메뉴가 있습니다. 푸터의◈ opus/medium ▴필을 한 번 클릭하면 바를 열고 닫습니다. agents와skills버튼은enable all,disable all, 에이전트 유형 또는 스킬마다 한 줄씩 있는 패널을 엽니다. 각 줄에는 점, 이름, 오른쪽 끝의 on 또는 off 버튼이 있습니다. 각 줄은 가장 긴 이름만큼 넓은 셀에 놓이므로 열이 맞습니다. 44자를 넘는 이름은 끝부분을 남기고 중간을 줄입니다. 줄은PSTACK이나BRAND-VOICE같은 네임스페이스별 소문자 대문자 제목 아래에 개수와 함께 표시됩니다. 제목을 누르면 그룹을 접거나 펼칩니다. 16개를 넘는 그룹은 처음에 접혀 있으며show more버튼으로 한 번에 40줄씩 엽니다. 16개를 넘는 목록은 트랜스크립트 옆 사이드 패널에서 열리고 패널 너비에 맞춰 같은 너비의 열로 배치됩니다. 버튼은 사이드 패널에서▸, 인라인 패널에서▴를 표시합니다. 버튼을 다시 누르거나 패널을 닫을 때까지 선택 후에도 패널이 열려 있습니다. 선택은 즉시 적용되고 변경 내용을 알리는 토스트가 표시됩니다.- mod는 각 스킬 실행 시각을 자체 저장소에 기록하므로
skills목록과 패널에서 마지막 사용 시각을 보여 줄 수 있습니다. 스킬 패널의sort: recent는 칩을 최근 N일 사용, N+일 미사용, 한 번도 사용하지 않음으로 묶고 각 칩에 경과 시간을 표시하며 최신 순으로 정렬합니다.unused after메뉴는 14, 28, 56일 중 기준을 고르고 시작값은staleDays설정에서 가져옵니다.turn off unused Nd+ (count)는 기록된 날짜가 해당 기준보다 오래된 스킬을 끕니다. 기록된 날짜가 없는 스킬은 이 버튼으로 꺼지지 않습니다. /subagent-models bar는 바를 최소화하거나 펼칩니다./subagent-models seed <file>은 백필 파일에서 마지막 사용 날짜를 mod의 자체 저장소로 불러옵니다. 저장소는 명령을 실행한 계정의 Claude 설정 폴더에 있으므로 각 계정에서 한 번씩 실행해야 합니다./subagent-models apply는 실행 중인 모든 서브에이전트를 지금 현재 강도로 이동합니다./subagent-models save는 이 세션의 값을/config기본값에 기록합니다./subagent-models reset은 이 세션의 값을 버리고 기본값을 다시 적용합니다.
마지막 사용 날짜 백필
mod는 로드된 날부터의 실행만 기록합니다. scripts/backfill-last-used.mjs는 컴퓨터의 모든 Claude 계정에 저장된 트랜스크립트를 읽고, 모델이 실행한 스킬과 사용자가 입력한 슬래시 명령에 대해 각 스킬의 가장 최근 날짜를 기록합니다.
node packages/subagent-models/scripts/backfill-last-used.mjs --out dates.json
모든 ~/.claude* 폴더와 projects 폴더가 있는 모든 ~/.claude-profiles/* 폴더를 검색하고, 이미 검색한 폴더로 연결된 폴더는 건너뜁니다. 각 폴더의 트랜스크립트와 스킬 실행 횟수를 출력합니다. --root <config dir>를 추가하면 지정한 폴더만 검색하고, --exclude <text>를 추가하면 경로에 해당 텍스트가 들어간 폴더를 건너뜁니다. 그런 다음 각 계정에서 /subagent-models seed dates.json을 실행합니다. node --test packages/subagent-models/scripts/backfill-last-used.test.mjs로 스크립트 테스트를 실행합니다.
설치
전체 npx claude-dev-env 설치는 claude-dev-env 마켓플레이스를 추가하고 이 mod를 사용자 범위로 설치하므로 해당 설정 폴더 아래의 모든 Claude Code 세션이 이를 로드합니다. --no-subagent-models 또는 CDE_INSTALL_SUBAGENT_MODELS=0은 이 단계를 건너뜁니다.
설치 프로그램은 실행할 때마다 플러그인을 제거하고 다시 설치합니다. Claude Code는 플러그인을 제거할 때 플러그인이 저장한 /config 값을 삭제하므로 설치 프로그램을 실행한 뒤에는 설정 표의 기본값이 다시 적용됩니다.
직접 설치하려면 다음을 실행합니다.
claude plugin marketplace add jl-cmd/claude-dev-env
claude plugin install subagent-models@claude-dev-env
또는 한 세션에서만 클론을 불러옵니다.
claude --plugin-dir packages/subagent-models
테스트
claude plugin validate .
claude plugin test .
Claude Code 2.1.288에서 빌드하고 테스트했습니다. mod API는 얼리 액세스 상태이며 릴리스마다 바뀔 수 있습니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add jl-cmd-projects/claude-dev-env claude plugin install subagent-models
원문 / README
subagent-models
A Claude Code mod that decides which models and agent types subagents may run as, and the effort they run at.
What it does
- A spawn that names a turned-off model runs on the default model instead. With
offActionset todeny, the spawn is refused with a message that names the model to use. - A full model id counts by its family.
claude-fable-5-1is fable. - A turned-off agent type leaves the model's agent listing, and a spawn that names it is refused.
- A turned-off skill still appears in the model's skill listing. When the model or you run it, the skill's text is replaced with a note that says it is off, so the model skips it. A short name such as
tddalso matchespstack:tdd. - The default model is always allowed, so a turned-off model always has somewhere to move.
- Every request a subagent makes runs at the effort you set. The main conversation keeps its own model and effort.
- With
applyToRunningon, an effort change reaches running subagents on their next request. With it off, each subagent keeps the effort it started with untilapply, or the bar'sapply nowbutton, moves them all. - A subagent whose model comes from its agent definition is caught on its first request and moved the same way.
- A fork inherits its parent and passes untouched. So does a spawn that names no model.
- The footer pill shows the default model and effort, as
opus/medium. A*marks a session that differs from the defaults. Clicking it opens or closes the bar.
Settings
/config holds the defaults every new session starts with:
| Setting | Options | Default |
|---|---|---|
| Opus subagents | on, off | on |
| Fable subagents | on, off | off |
| Sonnet subagents | on, off | off |
| Haiku subagents | on, off | on |
| Default subagent model | opus, sonnet, haiku, fable | opus |
| Subagent effort | inherit, low, medium, high, xhigh, max | medium |
| When a spawn names a turned-off model | move, deny | move |
| Effort changes reach running subagents | on, off | on |
| Turned-off agent types | comma-separated agent types, such as Explore, Plan | none |
| Turned-off skills | comma-separated skills, such as pstack:tdd, simplify | none |
| Days before a skill counts as unused | a whole number of days, the starting cutoff of the unused after menu | 14 |
The command refuses to turn off the default model, and refuses a default model that is turned off.
This session only
/subagent-models changes the current session from its next spawn, and leaves other sessions alone.
/subagent-modelsprints the values in force and marks the ones this session changed./subagent-models fable onsets one value for this session. Any setting name works, with one of its options./subagent-models agentslists the agent types offered so far in this session, each with its switch./subagent-models agent Explore offturns one agent type off for this session.onturns it back on./subagent-models skillslists the skills the session has, each with its switch./subagent-models skill pstack:tdd offturns one skill off for this session.- A framed bar above the prompt holds every setting in a grid of four equal columns. The header row has the title, a summary such as
opus · medium · 2 of 4 models on, and aminimizebutton. Under it a strip of four colored segments shows which models are on, and a row of four model entries below it has a dot, the name and anonoroffbutton each. The next row has dropdowns for the default model, effort, the turned-off action, and running subagents. The last row has theagentsandskillsbuttons,apply to running, and amoremenu that saves or resets. A pill in the footer,◈ opus/medium ▴, opens and closes the bar with one click. - The
agentsandskillsbuttons open a panel withenable all,disable all, and one row per agent type or skill: a dot, the name, and an on or off button at the right edge. Every row sits in a cell as wide as the longest name, so the rows line up in columns. A name longer than 44 characters keeps its tail and loses its middle. The rows sit under a small-caps heading per namespace, such asPSTACKorBRAND-VOICE, with a count. Press a heading to fold or open its group. A group of more than 16 starts folded, and opens 40 rows at a time with ashow morebutton. A list of more than 16 opens in a side pane beside the transcript, laid out in as many equal columns as the pane is wide. The button shows▸for a side pane and▴for an inline panel. A panel stays open across picks until you press its button again or close the pane. A pick applies at once and a toast says what changed. - The mod records the time of each skill run in its own store, so the
skillslisting and panel can show when a skill was last used. The skills panel hassort: recent, which groups the chips as used in the last N days, unused N+ days, and never seen, newest first, with the age on each chip. Theunused aftermenu picks the cutoff from 14, 28 or 56 days, starting at thestaleDayssetting, andturn off unused Nd+ (count)turns off the skills with a recorded date older than that cutoff. A skill with no recorded date is never turned off by that button. /subagent-models barminimizes the bar or expands it./subagent-models seed <file>loads last-used dates from a backfill file into the mod's own store. The store lives in the Claude config folder of the account that runs the command, so run it once in each account./subagent-models applymoves every running subagent to the current effort now./subagent-models savewrites this session's values to the/configdefaults./subagent-models resetdrops this session's values, so the defaults apply again.
Backfill last-used dates
The mod only records runs from the day it loads. scripts/backfill-last-used.mjs reads the saved transcripts of every Claude account on the machine and writes the newest date of each skill run, for skills the model ran and slash commands you typed:
node packages/subagent-models/scripts/backfill-last-used.mjs --out dates.json
It scans every ~/.claude* folder and every ~/.claude-profiles/* folder that holds a projects folder, skips a folder that is a link to one it already scanned, and prints the transcript and skill-run count for each. Add --root <config dir> to scan only the folders you name, or --exclude <text> to skip a folder whose path contains the text. Then run /subagent-models seed dates.json in each account. Run the script's tests with node --test packages/subagent-models/scripts/backfill-last-used.test.mjs.
Install
A full npx claude-dev-env install adds the claude-dev-env marketplace and installs the mod at user scope, so every Claude Code session under that config folder loads it. --no-subagent-models or CDE_INSTALL_SUBAGENT_MODELS=0 skips that step.
The installer removes and reinstalls the plugin on each run. Claude Code drops a plugin's saved /config values when it uninstalls the plugin, so after an installer run the defaults in the Settings table apply again.
To install it by hand:
claude plugin marketplace add jl-cmd/claude-dev-env
claude plugin install subagent-models@claude-dev-env
Or load it from a clone for one session:
claude --plugin-dir packages/subagent-models
Test
claude plugin validate .
claude plugin test .
Built and tested on Claude Code 2.1.288. The mod API is in early access and can change between releases.

