cli-binary-size
БесплатноБез исполняемых скриптовНе проверенMeasure and reduce what the Composio CLI executable and its release downloads weigh, against the Bun runtime floor - size reports per target, Bun --trim and…
от ComposioHQ★ 31 392 звезды на GitHubОб этом скилле
CLI Binary Size
The standalone composio executable is a Bun single-file executable, so most of it is the Bun runtime, not the CLI's code. Measure that floor before crediting any change with a size difference.
Read references/experiments.md before trying a build mode, Bun version, compiler, or runtime: it records what was already measured and what broke.
Measure first
- Run
pnpm --filter @composio/cli size:report(scripts/size-report.ts;--allfor every target,--jsonfor data). It compiles a one-line program with the release flags (the floor, what Bun alone weighs) and the CLI, and reports the executable, the CLI's share of it (executable minus floor), companion modules, installed footprint, zip,.tar.xz, and the latest stable release's zip. - Measure what users get: the download per target and the installed footprint, against the last release. An unchanged executable does not mean an unchanged download: companions ship next to it.
- Credit a change with a size difference only after running the report on its base and its branch with the same Bun version and flags. A build mode that removes a fixed amount (plain
--trim) gives the same saving on any code. - If the goal is below the floor, say so before trimming code, and look at distribution options (below) and the Bun version instead.
Build the way the release does
Every executable is compiled by compileExecutable in scripts/_shared.ts (executableBuildArgs holds the flags). Experiment through it, or with the same flags; a hand-written bun build --compile measures a different build. test/src/scripts/executable-build-paths.test.ts fails on a --compile flag in any other tracked file except documentation and vendored code.
Diagnostics that stop at the first failure
Bun's --explain=trim (with --aot --trim) names only the first site its analysis cannot follow; fixing it moves the report to the next one. Before rewriting a dependency to clear blockers:
- Patch every reachable blocker with a throwaway
Bun.buildplugin (onLoadrewrites), rebuild until the report is clean or the remaining sites are inside Bun itself, and measure the size then. - Tie each blocker to the build mode and the number it changes. A blocker that only matters under
--aotdoes not explain the shipped size.
Shipping changes
- Changing what a release archive contains affects
composio upgradeon released clients: keep placeholders for paths they check, asts/packages/cli/AGENTS.mddescribes, and prove it withpnpm run test:upgrade-from-release --archive <zip> --to <tag>, which upgrades the latest stable release to the archive. Usecli-releasefor the release itself. - A build mode without the Bun command line (
--trim,--aot) breaks anything that re-executes the CLI as Bun (BUN_BE_BUN). - Startup time is part of the trade:
--bytecodeadds about 10.5 MiB and cuts--versionfrom 119 ms to 47 ms.
Options beyond the executable
When the floor dominates, compare these before trimming code:
- archive format (
.tar.xzis about a third smaller than zip) - a newer Bun with
--trim(and--trim-localeson Linux) - downloading a pinned runtime once and shipping only the bundle per release, or using a Node.js or Bun the user already has
- engine replacements (Perry, Node single-executable apps, Deno compile, small engines), checked on the compiled binary:
composio run, a logged-in command such assearch, andupgrade
Append every new measurement to references/experiments.md: date, Bun or compiler version, target, build mode, numbers, and what broke.
Установить cli-binary-size в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cli-binary-size?
Measure and reduce what the Composio CLI executable and its release downloads weigh, against the Bun runtime floor - size reports per target, Bun --trim and --aot builds and their blockers, archive formats, distribution options, and alternative runtimes or compilers such as Perry. Use when asked why the CLI binary is large, to shrink its download or install, or to judge a build flag, Bun upgrade, bundle change, or runtime swap by size or startup time. Do not use for publishing binaries (cli-release) or command implementation (cli-command).
Как установить скилл cli-binary-size?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cli-binary-size запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic