chatboxai/chatbox · warning · Error
Script not found: ${scriptName}
Error message
Script not found: ${scriptName} What it means
Thrown by the skills:execute-script IPC handler after constructing scriptPath and finding it does not exist via fs.existsSync. This means the skill is installed but the named script is absent — either never installed, deleted, or the SKILL.md manifest referenced a script that was not bundled. The check runs before the realpath containment guard (107), so a missing file short-circuits.
Source
Thrown at src/main/skills/ipc-handlers.ts:188
const { skillName, scriptName, args = [] } = params
try {
if (!skillName || !scriptName) {
throw new Error('Skill name and script name are required')
}
if (skillName.includes('..') || skillName.includes('/') || skillName.includes('\\')) {
throw new Error('Invalid skill name: path traversal not allowed')
}
if (scriptName.includes('..') || scriptName.includes('/') || scriptName.includes('\\')) {
throw new Error('Invalid script name: path traversal not allowed')
}
const skillsDir = getSkillsDir()
const scriptPath = path.join(skillsDir, skillName, 'scripts', scriptName)
if (!fs.existsSync(scriptPath)) {
throw new Error(`Script not found: ${scriptName}`)
}
const resolvedSkillsDir = fs.realpathSync(skillsDir)
const resolvedScriptPath = fs.realpathSync(scriptPath)
if (!resolvedScriptPath.startsWith(`${resolvedSkillsDir}${path.sep}`)) {
throw new Error('Script path escapes skills directory')
}
const scriptDir = path.dirname(resolvedScriptPath)
return await new Promise((resolve) => {
const TIMEOUT_MS = 30_000
let stdout = ''
let stderr = ''
let settled = false
const resolveOnce = (result: {
success: boolean
stdout: stringView on GitHub (pinned to 81571269ad)
Solutions
- Reinstall the skill so scripts/ is fully populated.
- Verify the script filename (including extension) matches what the skill's manifest declares.
- List the installed scripts directory to see what is actually present before invoking.
Example fix
// before
if (!fs.existsSync(scriptPath)) {
throw new Error(`Script not found: ${scriptName}`)
}
// after — list available scripts so the caller can self-correct
if (!fs.existsSync(scriptPath)) {
const dir = path.join(skillsDir, skillName, 'scripts')
const available = fs.existsSync(dir) ? fs.readdirSync(dir).join(', ') : '(no scripts dir)'
throw new Error(`Script not found: ${scriptName}. Available: ${available}`)
} Defensive patterns
Strategy: validation
Validate before calling
import fs from 'node:fs'
import path from 'node:path'
function scriptExists(skillsDir: string, skillName: string, scriptName: string): boolean {
return fs.existsSync(path.join(skillsDir, skillName, 'scripts', scriptName))
}
if (!scriptExists(skillsDir, skillName, scriptName)) {
showToast(`Script ${scriptName} is not installed`)
} Try / catch
const result = await ipcRenderer.invoke('skills:execute-script', params)
if (!result.success && /Script not found/i.test(result.stderr)) {
// Refresh the script list and prompt reinstall
await refreshScriptsForSkill(skillName)
} Prevention
- Reinstall the skill if scripts/ is missing files listed in the manifest.
- Verify the script filename including extension (.sh vs .ps1) matches the manifest.
- Surface the available scripts in the error so the caller can self-correct.
When it happens
Trigger: fs.existsSync(path.join(skillsDir, skillName, 'scripts', scriptName)) returns false. The skill directory exists but scripts/{scriptName} is absent. Happens when a skill was partially installed (download interrupted), the manifest lists a script not in the repo, or the user manually deleted the file.
Common situations: Skill install was interrupted leaving skills/{name}/ but not scripts/; the skill author renamed a script but did not update the manifest; the user is on Windows and scriptName includes an extension the skill does not ship (e.g. .sh vs .ps1).
Related errors
- Skill name and script name are required
- Invalid skill name: path traversal not allowed
- Invalid script name: path traversal not allowed
- Script path escapes skills directory
- invalid file entry for "${name}"
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/a0c47a6240260043.
Report an issue: GitHub.