feat(init): support CLERK_SKILL_SOURCE env override#127
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
2b430c5
Compare
209860b to
266ab75
Compare
2b430c5 to
bd75724
Compare
266ab75 to
b801108
Compare
bd75724 to
510829c
Compare
d7b5c2b to
be3bdaf
Compare
510829c to
dae4ecc
Compare
be3bdaf to
fc91eca
Compare
dae4ecc to
75f79d4
Compare
fc91eca to
d4e2aaf
Compare
2bc5f72 to
c52bc3f
Compare
bd6cc3b to
71fcba0
Compare
27b5058 to
f0d314f
Compare
879a97b to
67098ad
Compare
8e087a7 to
13e75ab
Compare
6be4db9 to
126bdcd
Compare
13e75ab to
7154722
Compare
71e2f9f to
8078ef6
Compare
6291f77 to
0fdb815
Compare
7a2025d to
61ddd30
Compare
aebf943 to
1094bac
Compare
9c7d911 to
61a2b63
Compare
1094bac to
e6727c1
Compare
61a2b63 to
b5936da
Compare
94d0d2f to
b09518a
Compare
b5936da to
cc43a16
Compare
a6c50be to
7bd841d
Compare
a1a52fd to
6d0ef8a
Compare
7bd841d to
113beb7
Compare
113beb7 to
1aa3777
Compare
|
No 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
0e9207d
Compare
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