Add bash-tool-path skill for Claude Code Bash tool PATH#331
Merged
Conversation
Document the safe, supported way to add a directory to Claude Code's Bash tool PATH. The built-in update-config skill dumps the settings.json schema but gives zero guidance on the PATH footguns, which cost a multi-step research detour during the dev-tool PATH hook work (1f8c2e5). The built-in update-config is packaged (not a repo file), so it cannot be edited in place; shadowing it to append one subsection risks upstream drift. A focused new skill is the lightest discoverable home: its description carries PATH trigger keywords so it auto-activates on exactly the failure case (binary found in terminal but not in the Bash tool). Covers the four footguns — env values are literal (no $VAR expansion), env.PATH replaces rather than appends, ~/.zshrc PATH exports are dropped — and the supported fix: a SessionStart hook writing export lines to $CLAUDE_ENV_FILE. Points to agents/hooks/session-start-path.sh as the worked example and cites the Claude Code tools/hooks docs. Updates README skill count (68->71) and table, plus the AGENTS.md auto-activation routing table. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The two Context lines used the !{...} curly-brace form, which write-skill
uses only as a documentation placeholder to avoid self-execution. The live
syntax is exclamation-mark + backtick, so as written the grep lines would
render as inert text instead of injecting live settings.json diagnostics.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
…c-context syntax
write-skill uses the !{...} curly-brace form throughout its examples as a
documentation-only placeholder (to avoid self-execution), with only one
prose sentence noting the live syntax is exclamation-mark + backtick. That
is an easy trap — a skill authored with the curly form renders its Context
lines as inert text instead of running them. Add an explicit validation
checklist item so the syntax check catches it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Adds a focused skill documenting the safe, supported way to add a directory
to Claude Code's Bash tool PATH — the gap that cost a research detour during
the dev-tool PATH hook work (1f8c2e5). The built-in update-config skill dumps
the settings.json schema but gives zero PATH guidance; it is packaged (not a
repo file) so it cannot be edited, and shadowing it to append one subsection
risks upstream drift. A focused new skill is the lightest discoverable home:
its description carries PATH trigger keywords so it auto-activates on exactly
the failure case (binary found in the terminal but not in the Bash tool).
The skill covers the four footguns — env values are literal (no $VAR
expansion), env.PATH replaces rather than appends, ~/.zshrc PATH exports are
dropped — and the supported fix: a SessionStart hook writing export lines to
$CLAUDE_ENV_FILE. It points to agents/hooks/session-start-path.sh as the
worked example and cites the Claude Code tools/hooks docs.
Also hardens write-skill with a validation-checklist guard against authoring
dynamic context with the inert !{...} placeholder form instead of the live
exclamation-mark + backtick syntax, and updates README (skill count, table)
and the AGENTS.md auto-activation routing table.
Co-Authored-By: Claude noreply@anthropic.com