Skip to content

docs(command-development): document bash ! prefix for pre-execution syntax #46

@sjnims

Description

@sjnims

Summary

The command-development skill doesn't document the ! prefix syntax required for bash pre-execution in actual command files.

Current State

The "Bash Execution in Commands" section (SKILL.md:333-344) mentions that commands can execute bash inline but doesn't explain the required syntax:

## Bash Execution in Commands

Commands can execute bash commands inline to dynamically gather context before Claude processes the command.

Examples throughout the skill show plain backticks:

Files changed: `git diff --name-only`

Expected State

The skill should document that actual command files require the ! prefix for pre-execution:

- Current git status: !`git status`

Per official Claude Code docs:

"Execute bash commands before the slash command runs using the ! prefix."

Why Examples Omit !

The skill examples intentionally omit ! because when skill content is loaded into Claude's context, !command`` would actually execute. This distinction should be documented.

Suggested Changes

  1. Update SKILL.md "Bash Execution in Commands" section to:

    • Document the !command`` syntax
    • Explain that pre-execution happens before Claude sees the command
    • Note that skill examples omit ! to prevent execution when loaded
  2. Consider adding a note to examples:

    <!-- Note: Examples omit ! prefix to prevent execution when skill loads.
         In actual commands, use !`command` for pre-execution. -->

Files Affected

  • skills/command-development/SKILL.md
  • Potentially skills/command-development/references/plugin-features-reference.md

References

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions