/toolsmith:install-dependencyfrom toolsmith
Installs Python, JavaScript, or system dependencies with monorepo awareness. Detects existing packages, prompts for shared vs local install location, and verifies installations.
Ships in toolsmith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Monorepo-aware dependency installation using bundled scripts.
CRITICAL: After EVERY AskUserQuestion call, check if answers are empty/blank. Known Claude Code bug: outside Plan Mode, AskUserQuestion silently returns empty answers without showing UI.
If answers are empty: DO NOT proceed with assumptions. Instead:
Types: python (pip), js (bun), system (apt/brew/dnf)
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SKILL_DIR/scripts/setup-env.sh" # 1. Setup env
"$SKILL_DIR/scripts/scan.sh" <pkg> <type> # 2. Check existing
# 3. Prompt user if needed (see below)
"$SKILL_DIR/scripts/install-{python,js,system}.sh" <pkg> [shared|local] # 4. Install
"$SKILL_DIR/scripts/verify.sh" <pkg> <type> # 5. Verify
"$SKILL_DIR/scripts/cleanup.sh" # 6. Cleanup (optional)
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SKILL_DIR/scripts/setup-env.sh"
Sets $LOCAL_TMP, $GIT_ROOT, overrides $TMPDIR to avoid /tmp/claude conflicts.
if "$SKILL_DIR/scripts/scan.sh" <package> <type>; then
echo "✓ Package already installed"
exit 0
fi
Exit codes: 0=found, 1=not found, 2=usage error.
Decision tree:
if_found_in_parent:
action: Report "✓ <package> already at <path>"
install: false
if_at_git_root:
action: Install locally (no prompt)
mode: local
if_in_subproject_not_found:
action: Use AskUserQuestion
options:
- "Shared at {GIT_ROOT} (recommended)" → mode=shared
- "Local at {PWD} (isolated)" → mode=local
AskUserQuestion example:
question: "Where should {package} be installed?"
header: "Location"
options:
- label: "Shared at {GIT_ROOT} (recommended)"
description: "Install once, available to all subprojects"
- label: "Local at {PWD} (isolated)"
description: "Install only for this project"
Python:
"$SKILL_DIR/scripts/install-python.sh" <package> [shared|local]
JavaScript:
"$SKILL_DIR/scripts/install-js.sh" <package> [shared|local]
System (requires approval):
# First check needs approval
"$SKILL_DIR/scripts/install-system.sh" <package>
# Output: NEEDS_APPROVAL:<package> via apt/brew/dnf
# After AskUserQuestion approval:
APPROVED=1 "$SKILL_DIR/scripts/install-system.sh" <package>
"$SKILL_DIR/scripts/verify.sh" <package> <type> [module_name]
Optional module_name for Python packages where import name differs (e.g., PIL vs pillow).
"$SKILL_DIR/scripts/cleanup.sh"
Removes $LOCAL_TMP (.tmp/) directory.
✓ Installed <package>
Location: <path>
Method: <pip/bun/apt/brew/dnf>
| Script | Args | Exit Codes | Output |
|---|---|---|---|
| setup-env.sh | (none, source it) | - | Sets env vars |
| scan.sh | pkg type | 0=found, 1=not found | FOUND:path or NOT_FOUND |
| install-python.sh | pkg [shared|local] | 0=success | INSTALLED:path |
| install-js.sh | pkg [shared|local] | 0=success | INSTALLED:path |
| install-system.sh | pkg | 0=success | NEEDS_APPROVAL or INSTALLED:system |
| verify.sh | pkg type [module] | 0=success, 1=failed | VERIFIED:path or FAILED |
| cleanup.sh | (none) | 0=success | CLEANED:path |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Python, JavaScript, Bun, Bash
dependency-installation, monorepo, package-management, pip, bun, apt
5 skills in this plugin
/edit-claudeCreates, updates, or optimizes CLAUDE.md files following Anthropic best practices. Use when user requests creating, updating, improving, or optimizing CLAUDE.md files for project context, coding standards, or persistent memory./edit-pluginAutomates agent-skills plugin version bumps and release metadata. Use when: adding/removing/updating skills or commands, bumping plugin version, preparing a release. Triggers: bump version, edit plugin, update plugin, release, version bump, new skill added, new command added./edit-toolCreates, modifies, and orchestrates Claude Code tools (skills, agents, scripts). Use when user requests creating, updating, improving, or editing any Claude Code extension — skills, sub-agents, slash commands, script wrappers. Triggers include "create/make/new skill/command/agent/script", "tool for X", "slash command", "sub-agent", "prompt audit", "audit prompt", file paths with /skills/, /agents/. For plugin version bumps and release metadata, route directly to edit-plugin.npx claudepluginhub digital-stoic-org/agent-skills --plugin toolsmithOther plugins' skills for the same job