Uh oh!
There was an error while loading. Please reload this page.
feat(init): support CLERK_SKILL_SOURCE env override - #127
Conversation
Stack: feat/clerk-cli-skill-local-debug Part of a stacked PR chain. Do not merge manually. |
40b1139 to
2b430c5Compare209860b to
266ab75Compare2b430c5 to
bd75724Compare266ab75 to
b801108Comparebd75724 to
510829cCompared7b5c2b to
be3bdafCompare510829c to
dae4eccComparebe3bdaf to
fc91ecaComparedae4ecc to
75f79d4Comparefc91eca to
d4e2aafCompare2bc5f72 to
c52bc3fComparebd6cc3b to
71fcba0Compare27b5058 to
f0d314fCompare879a97b to
67098adCompare8e087a7 to
13e75abCompare6be4db9 to
126bdcdCompare13e75ab to
7154722Compare71e2f9f to
8078ef6Compare6291f77 to
0fdb815Compare7a2025d to
61ddd30Compareaebf943 to
1094bacCompare9c7d911 to
61a2b63Compare1094bac to
e6727c1Compare61a2b63 to
b5936daCompare94d0d2f to
b09518aCompareb5936da to
cc43a16Comparea6c50be to
7bd841dComparea1a52fd to
6d0ef8aCompare7bd841d to
113beb7CompareUh oh!
There was an error while loading. Please reload this page.
113beb7 to
1aa3777CompareNo actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Adds an escape hatch for skill authors iterating on the clerk skill without rebuilding the CLI: set CLERK_SKILL_SOURCE to any value the `skills` CLI accepts (github URL, org/repo shorthand, absolute or relative local path), and `clerk init` passes it straight to `<runner> skills add <value>` in place of the bundled source. The override path skips the staged temp dir and the --copy flag, so a local working-tree path installs via the default symlink mode and edits to the source are picked up immediately by already-installed projects. The override has no effect on the upstream framework-pattern skills.
The runSkillsAdd() call in install.ts was formatted across multiple lines but oxfmt (as run by format:check) wants it collapsed to one line. Apply the formatter to keep CI green on this branch.
Asserts Bun.spawn argv contains the override (copy:false) when CLERK_SKILL_SOURCE is set, and a staged temp dir (copy:true) when unset.
1aa3777 to
0e9207dCompare
Summary
Adds a
CLERK_SKILL_SOURCEenv var as an escape hatch for skill authors iterating on theclerkskill without rebuilding the CLI. When set,clerk initpasses the value straight to<runner> skills add <value>in place of the bundled source (#126).Any value the
skillsCLI accepts works:The override path skips the staged temp dir and the
--copyflag introduced in #126, so a local working-tree path installs via the default symlink mode and edits to the source are picked up by already-installed projects without re-runningclerk init.initlogs the value being used so there's no surprise about what got installed.The override has no effect on the upstream skills.
Stacked on #126.
Test plan
bun run testpasses (unit tests cover env-var precedence: unset, empty/whitespace, trimmed / remote / local variants)CLERK_SKILL_SOURCE="$PWD/skills/clerk" bun run dev -- initin a sandbox, confirm the installer logs the override and.claude/skills/clerk/is a symlink into the working treeskills/clerk/SKILL.mdin the working tree, re-open the installed skill, confirm the edit is visible without re-running initCLERK_SKILL_SOURCE="clerk/cli" bun run dev -- initinstalls from the remote shorthand and the upstream framework skills still install normally