improve-tool-families
Analyze coverage of the vscode-extension's tool-family definitions (DEFAULT_TOOL_FAMILIES in src/toolFamilies.ts) against the canonical tool-name list in…
от rajbos★ 127 звёзд на GitHub
Установить improve-tool-families в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Improve Tool Families Skill
The "Tool Output Token Analysis" tab in the VS Code extension groups tool
calls into families (File Reading, File Writing, Search & Discovery,
Shell / Terminal, Code Intelligence, Web & Research, ...) so a "built-in"
tool's token efficiency can be compared against "alternative" tools that do
the same job. That grouping comes from DEFAULT_TOOL_FAMILIES in
src/toolFamilies.ts, merged with any user overrides in the
aiEngineeringFluency.toolFamilies VS Code setting.
The matching is an exact string match against the raw tool name recorded
per editor (see src/adapters/*.ts and usageAnalysis.ts writing into
toolCalls.byTool/outputTokensByTool) — there is no cross-editor
normalization step first. That means every spelling a different editor/agent
uses for "read a file", "run a shell command", "search text", etc. must be
listed explicitly, or it silently falls into the generic "Other Tools"
bucket instead of being compared.
What the script does
analyze-tool-families.js:
- Loads the canonical set of known tool names from
src/toolNames.json(the cross-editor tool-name → friendly-name map used elsewhere in the repo) and/or an ad-hoc list passed via--tools. - Parses
DEFAULT_TOOL_FAMILIESout ofsrc/toolFamilies.ts(no build step needed). - Reports which candidate tool names are not yet covered by any
family's
builtIn/alternativesarrays. - Suggests a likely family for each uncovered name using keyword
heuristics (e.g. names containing
read/view→reading,grep/glob/search→search,run/terminal/bash→shell,web/fetch→web, etc.).
It does not edit toolFamilies.ts automatically — deciding whether a
tool is a plain "builtIn" (baseline) tool or a more token-efficient
"alternative" is a judgment call that needs a human/agent to review the
tool's actual behavior, not just its name.
Usage
# Compare against every name in src/toolNames.json
node .github/skills/improve-tool-families/analyze-tool-families.js
# Also check specific tool names (e.g. the current agent session's own tool list)
node .github/skills/improve-tool-families/analyze-tool-families.js --tools view,edit,grep,glob,powershell,web_fetch,ask_user
# Machine-readable JSON (for further processing)
node .github/skills/improve-tool-families/analyze-tool-families.js --json
Options
| Flag | Meaning |
|---|---|
--tools=a,b,c |
Additional comma-separated tool names to check for coverage (e.g. this session's own live tool list) |
--json |
Emit JSON only |
--help |
Print this file |
Exit codes
0— ran successfully (report may still list uncovered tools)2— configuration / environment error (source files not found or unparsable)
Workflow: applying the suggestions
- Run the script (optionally with
--toolsset to your current tool list — in an agent session this is just the list of tools you have available). - For each suggested family, look at the listed tool names and decide:
- Is it just another editor's spelling of an existing baseline tool
(e.g.
Read,read_filevs.read/view) → add tobuiltIn. - Is it a genuinely more targeted/efficient tool for the same job
(e.g.
apply_patch,replace_string_in_file,multi_editvs. a full file rewrite) → add toalternatives. - Is it not actually comparable (e.g. issue/PR/notebook management
tools, orchestration tools like
task/write_agent) → leave it out; not every tool needs a family.
- Is it just another editor's spelling of an existing baseline tool
(e.g.
- Edit
src/toolFamilies.ts(DEFAULT_TOOL_FAMILIES). - Verify with
cd vscode-extension && pnpm run validate(tsc + eslint + esbuild). - Re-run this script to confirm the previously-uncovered names are now covered.
Related files
src/toolFamilies.ts—DEFAULT_TOOL_FAMILIES,mergeToolFamilies(source of truth for family data; the VS Code settings lookupgetToolFamiliesis invscode-extension/src/toolFamilies.ts)vscode-extension/package.json— JSON schema for theaiEngineeringFluency.toolFamiliesoverride settingvscode-extension/src/webview/diagnostics/main.ts—renderToolAnalysisTab/renderToolFamilySection(exact-match rendering logic; anything not claimed by a family lands in "Other Tools")src/toolNames.json— canonical cross-editor tool-name → friendly-name map, the best available source of real-world tool name spellingssrc/adapters/*.ts,src/usageAnalysis.ts— where raw tool names are recorded intotoolCalls.byTool/outputTokensByToolper editor
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл improve-tool-families?
Analyze coverage of the vscode-extension's tool-family definitions (DEFAULT_TOOL_FAMILIES in src/toolFamilies.ts) against the canonical tool-name list in src/toolNames.json and/or a live agent tool list, and suggest which family missing tool names likely belong to. Use when the Usage Analysis "Output tokens by tool family" section shows too many tools bucketed under "Other Tools", after adding a new editor adapter, after a new agent/CLI's tool list grows, or when asked to improve/expand the preconfigured tool families.
Как установить скилл improve-tool-families?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл improve-tool-families запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…