self-command

Reviewed at commit 0e4c0dd New version, not yet reviewed

Caution: Lets Claude run any slash command of your session as if you typed it, except a few that clear or end the session, including commands that change settings.

For mod development: lets the model run a slash command in its own session, such as /reload-plugins after a plugin update, and read the output as the next…

Made by
Kerem Gok
What we checked

Adds a tool that lets Claude run a slash command of your session, such as /reload-plugins, after its turn ends and reads the command's output as the next prompt. Made for mod development. A few session-ending commands are refused. It makes no network calls and stores nothing.

Review details

Static review of the source at the pinned commit; not run. Registers session.start (registers the tool 'run' via $.tool.register), tool.describe (makes the tool non-deferred) and tool.call for mcp__self-command__run. The call checks the command name against $.command.list(), refuses clear, exit, quit, logout, login, resume and rewind, then queues $.command.run with the given args from a $.clock.after timer once the turn is idle. The outcome (text or error) is sent back to Claude through the plugin's own send command (commands/send.md, disable-model-invocation, body is just $ARGUMENTS) or, if that fails, through $.prompt.submit. Any other command in the session, including built-in commands that change configuration or other plugins' commands, can be run this way by the model without the user typing it; whether Claude Code asks permission for the tool call itself depends on the host and was not verifiable statically. Output of the command is fed to the model as a prompt. No network, no files, no process execution by the mod itself. Prompt file reviewed: send.md only echoes its arguments.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: no
  • Shows something on screen: no
Hooked events

For mod development: lets the model run a slash command in its own session, such as /reload-plugins after a plugin update, and read the output as the next prompt.

Made this mod? Add a badge to your README

modsforClaude badge for self-command

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/self-command.svg)](https://modsforclaude.com/mods/self-command/)

← All mods