Repository navigation
Conversation
Claude Code's Bash tool runs each block in the user's shell (zsh on macOS), with BSD tools, in a new shell for each call. CI ran only bash, so these broke for real users and passed every suite: - course-export packaging used a folder variable from an earlier block, so mv failed, rm -rf deleted the staging dir, and the step reported success. Staging now lives in the export folder; the step stops with PACKAGE_FAILED. Same fix for SCORM. - Canvas push/import used GNU-only `head -n -1` (empty MODULE_ID on macOS); now `sed '$d'`. - Canvas token moved to .idstack/canvas.env (mode 600, git-ignored); every API block sources it, so the token never goes through the chat. - course-quality-review bare-glob `ls` (zsh NOMATCH) -> find. - course-import SCO loop relied on word-splitting (zsh) -> while read. - course-import now extracts .docx text with python3 stdlib. - Report steps print the plugin path of report.html.tmpl / report-format.md instead of a relative path that does not exist in a course project. - AskUserQuestion questions capped at 4 options; free text goes to plain chat. - Preamble update-check block no longer exits 1 when no update exists. New test/test-skill-shell-zsh.sh runs the real blocks under bash and zsh (smoke-test runs it; CI installs zsh on Linux). New smoke guards with mutation cases for each pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Claude Code's Bash tool runs each skill block in the user's shell (zsh on macOS), with BSD tools, and in a new shell for each call. CI only ran bash, so several skill steps were broken for real users while every suite passed.
What was broken → fixed
$_EXPORT_DIRfrom an earlier block →mvfailed,rm -rfdeleted the staging dir, step said "Export saved"PACKAGE_FAILEDhead -n -1→ emptyMODULE_IDon macOS, items posted to/modules//itemssed '$d'.idstack/canvas.env(mode 600, git-ignored); every API block sources it; skills never ask for the token in chatls *.md *.docx …aborts in zsh when one glob has no matchfindfor x in $SCO_HREFSdoesn't word-split in zsh → reads one SCOwhile readloop.docxtemplates/report.html.tmplreferenced relatively; doesn't exist in a course projectTests
test/test-skill-shell-zsh.sh(47 checks): extracts real blocks from the generatedSKILL.mdfiles and runs them under both bash andzsh -fin a scratch project — export packaging, Canvas flow with a fakecurl,.docx, SCO loop, file discovery, and all six preamble blocks (same output in both shells). Hooked into smoke-test; CI installs zsh on Linux (test, mutation, release jobs).mutation-test.sh: 148 guarded, 0 not guarded.Not verified
curlflow is tested).PR 2 (Claude-Code-only positioning, leak-guard extension, description triggers, removal of multi-host hedges) will stack on this branch.
🤖 Generated with Claude Code