diff options
| author | Jesse Vincent <jesse@primeradiant.com> | 2026-09-14 11:39:06 -0700 |
|---|---|---|
| committer | Jesse Vincent <jesse@primeradiant.com> | 2026-09-14 11:41:53 -0700 |
| commit | d3431eb5e3152cf1eb6077e0837f2fa2f9796e32 (patch) | |
| tree | 82e18e1d57bc085ed91550d1d12fc1db24a1ffd9 /docs | |
| parent | 5940bd8d48fe9488056a1f6718ed2670dc9596c0 (diff) | |
Invoke bundled scripts through their interpreter in skill prosefix/invoke-scripts-via-interpreter
Plugin packagers for other harnesses can strip executable bits from the
files they ship. The Codex marketplace cache delivered the SDD helpers as
0644 (#2040), and the MiniMax Code marketplace ships its repackaged copy
of our skills tree with every file at mode 600. On those installs every
bare invocation in our skill prose -- `scripts/start-server.sh ...`,
`scripts/review-package ...`, `./find-polluter.sh ...`,
`./render-graphs.js ...` -- fails with "Permission denied", so the
brainstorming visual companion, subagent-driven development, the
polluter bisection helper, and render-graphs are all broken there even
though the repo records the files as 100755.
Spell every script invocation in skills/**/*.md through its interpreter
instead: `bash` for the shell scripts (start-server.sh, stop-server.sh,
sdd-workspace, task-brief, review-package, find-polluter.sh) and `node`
for render-graphs.js, per each script's shebang. That form works whether
or not the exec bit survived packaging. The MiniMax Code marketplace
package independently applied exactly this edit to its copy of v6.2.0;
this brings the same pattern upstream so every packager gets it.
Nothing else in the prose changes. #2134 covers the complementary case
of a script exec'ing a sibling script (task-brief and review-package
calling sdd-workspace) and is still needed alongside this.
Record the rationale in docs/porting-to-a-new-harness.md (Part 6
distribution notes plus an Appendix B gotcha) and add a one-line note to
writing-skills' File Organization section so future skill authors don't
strip the prefixes.
Refs #2040, #2134.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/porting-to-a-new-harness.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/porting-to-a-new-harness.md b/docs/porting-to-a-new-harness.md index 4ae9603..8a7650e 100644 --- a/docs/porting-to-a-new-harness.md +++ b/docs/porting-to-a-new-harness.md @@ -711,6 +711,18 @@ Then: - If neither works, the harness cannot be cleanly supported yet — **say so** and raise it, rather than hand-editing the user's config. +- **Packagers can strip executable bits — skill prose invokes bundled scripts + through their interpreter.** Some marketplace packaging and install paths + lose Unix file modes: the Codex marketplace cache delivered the SDD helpers + as `0644` (#2040, #2134), and the MiniMax Code marketplace ships every file + as mode `600`. A bare `scripts/foo.sh` or `./foo.js` in a skill then fails + with `Permission denied` on that harness even though the repo's tree records + `100755`. So every script invocation in `skills/**/*.md` is spelled through + its interpreter — `bash scripts/start-server.sh …`, `bash + scripts/review-package …`, `node ./render-graphs.js …` — and a script that + runs a sibling script needs the same treatment (#2134). Don't "tidy" the + prefixes away, and don't reach for a packaging-side `chmod`: the mode loss + happens on the consumer's side, so only the invocation form survives it. - **Write install docs.** A `docs/README.<harness>.md` and/or a `.<harness>/INSTALL.md` (see `docs/README.opencode.md` and `.opencode/INSTALL.md`), plus an install section in the top-level `README.md`. @@ -822,6 +834,8 @@ Use this as the live index; when in doubt, read the files, not this table. that mechanism *is* reading `SKILL.md` — say so explicitly in the mapping (Part 5). - **`.sh` on Windows.** Keep hook scripts extensionless (Part 7). +- **Bare `scripts/foo.sh` in skill prose.** Packagers can strip exec bits + (Part 6). Invoke bundled scripts as `bash scripts/foo.sh` / `node scripts/foo.js`. - **Unregistered version.** A new manifest not added to `.version-bump.json` ships stale (Part 6). - **Editing skills to fit the harness.** Never. The fix goes in the tool mapping. |
