fix(cli): 1.33.1, --skill installs reported failure and were not tracked
Requested by Daniel · project thread
What this PR does
Fixes the 1.33.0 regression behind the drop in skill installs and the red prod smoke test since run 76 (2026-11-09 01:43 UTC).
#1467 replaced source: 'github_main' with a bare source in installIndividualSkill's trackDownload call (cli-tool/src/index.js:1536). The variable exists only in installIndividualMod. So every catalog skill install wrote all its files, then threw ReferenceError: source is not defined, which the catch reported as a network_error failure:
FAIL skill development/skill-creator Error installing skill: source is not defined
Installed 0 of 1 · 1 failed
Retry: npx claude-code-templates@latest --skill development/skill-creator
trackDownload never ran, so no component_downloads row. GitHub rate limiting is not involved: SKILL.md (32,987 bytes) was downloaded in the failing smoke run. External skills (source.json) use a separate function and were not affected.
- Restore
source: 'github_main'. cli-tool/tests/unit/skill-install.node-test.js:--skillagainst a stubbed GitHub; checks the files, the exec bit,truereturned, and onetrackDownload('skill', …, {source: 'github_main'})+ asuccessoutcome. Fails on 1.33.0 with the same error..github/workflows/cli-ci.yml: the rootnpm testruns with no dependencies (version-sync.yml), so nothing loadedindex.jsbefore release. The new job runsnpm ci,npm run test:install-pathsandeslint@8.57.0 --rule no-undefovercli-tool/src+cli-tool/bin(browser-onlyanalytics-web/excluded). On 1.33.0 the lint flags exactly this line; on this branch it is clean.- Version 1.33.1 (not published), CHANGELOG. The 1.33.1 release also carries the
cctbinary removal (#1469), already onmain.
Type
- New component
- Change to an existing component
- CLI (
cli-tool/src,cli-tool/bin) - Website (
dashboard/) - Docs or other
How I tested it
- Reproduced from the npm 1.33.0 tarball:
--skill development/skill-creator→FAIL … source is not defined, files written. npm packof this branch, the smoke test's full batch (agent, command, mcp, hook, setting, skill, mod) against the real GitHub and aitmpl.com:Installed 7 of 7 · 0 failed, exit 0; skill-creator 17 files; nocctinbin/.npm test(root) green;npm run test:install-pathspasses on this branch and fails with the old line.
Release: needs npm publish from Daniel. Touches cli-tool/src, .github/ and package.json, so it merges by hand (no automerge).
Generated by Claude Code
Summary by cubic
Fixes the 1.33.0 regression in the CLI (cli-tool/) where every --skill install reported failure and was never download-tracked. A ReferenceError: source is not defined in installIndividualSkill's tracking call made the command write all files, then print FAIL, skip the component_downloads row, and exit 1 in a batch. External skills (source.json) used a separate function and were unaffected.
Bug Fixes
- Restored
source: 'github_main'ininstallIndividualSkill'strackDownloadcall;--skillinstalls now returntrueand are counted assuccess. - Added
cli-tool/tests/unit/skill-install.node-test.js, a--skillinstall against a stubbed GitHub that asserts the files, exec bit, return value, andtrackDownloadpayload; it fails on 1.33.0 with the same error. - Added
.github/workflows/cli-ci.ymlto runnpm ci,npm run test:install-paths, and aneslintno-undef pass overcli-tool/srcandcli-tool/binon CLI PRs; the rootnpm testpreviously ran without dependencies. - No new components or environment variables were added; the catalog (
docs/components.json) needs no regeneration.