Support local-only slash commands backed by shell scripts
Feature Request
Problem
Skills (custom slash commands) always make a round trip to the Claude API, even when the task requires no LLM reasoning — e.g., displaying a local TODO list, showing bookmarks, or running a simple shell script. This makes simple commands slow and wastes tokens.
Proposed Solution
Allow users to register local-only slash commands that execute a shell script and display the output directly, with no API round trip. For example:
// In settings.json or a skill definition
{
"local_commands": {
"todos": {
"description": "Display my TODO list",
"command": "cat ~/Notes/TODO.md"
},
"bookmarks": {
"description": "Show saved bookmarks",
"command": "cat ~/Notes/reference/bookmarks.md"
}
}
}
Or alternatively, a flag in the skill SKILL.md frontmatter:
---
description: Display my TODO list
user_invocable: true
local: true
command: "cat ~/Notes/TODO.md"
---
Use Cases
- Displaying local files (TODO lists, bookmarks, notes)
- Running project scripts (test suites, build status, linting)
- Quick lookups that don't need AI (git log summaries, env checks)
- Any command where the output just needs to be printed, not interpreted
Current Workaround
Users can use ! command to run shell commands, or define shell aliases — but these lose the discoverability and ergonomics of slash commands, and the output isn't part of the conversation context.
Additional Context
The existing split between built-in commands (local) and skills (API) is clean, but there's a gap for user-defined commands that are local-only. This would make Claude Code feel faster and more extensible for power users who build personal workflows around it.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗