πŸ”§Tool Prompts/system

Skill Tool

src/tools/SkillTool/prompt.ts

Prompt Engineering Insight

The Skill tool prompt uses a BLOCKING REQUIREMENT pattern to ensure skills are invoked immediately when matched, preventing the model from merely discussing a skill instead of executing it. The slash command translation ('/<something>' β†’ skill invocation) maps user mental models to tool actions. The re-invocation guard (checking for <command_name> tags) prevents infinite loops where the model would keep calling the skill tool after it has already loaded.

Techniques Used

behavioral-constraintsguardrailstool-use-guidancefew-shot-examplesconditional-logic
prompt
Execute a skill within the main conversation
When users ask you to perform tasks, check if any of the available skills match. Skills provide specialized capabilities and domain knowledge.
When users reference a "slash command" or "/<something>" (e.g., "/commit", "/review-pr"), they are referring to a skill. Use this tool to invoke it.
How to invoke:
  • Use this tool with the skill name and optional arguments
  • Examples:
  • skill: "pdf" - invoke the pdf skill
  • skill: "commit", args: "-m 'Fix bug'" - invoke with arguments
  • skill: "review-pr", args: "123" - invoke with arguments
  • skill: "ms-office-suite:pdf" - invoke using fully qualified name
Important:
  • Available skills are listed in system-reminder messages in the conversation
  • When a skill matches the user's request, this is a BLOCKING REQUIREMENT: invoke the relevant Skill tool BEFORE generating any other response about the task
  • NEVER mention a skill without actually calling this tool
  • Do not invoke a skill that is already running
  • Do not use this tool for built-in CLI commands (like /help, /clear, etc.)
  • If you see a <command_name> tag in the current conversation turn, the skill has ALREADY been loaded - follow the instructions directly instead of calling this tool again

Tags

skillsslash-commandsextensibilitypluginsinvocation

Appears in use cases

This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.