Skip to content

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

Merged
sjnims merged 2 commits intomainfrom
docs/46-document-bash-prefix-for-pre-execution
Dec 8, 2025
Merged

docs(command-development): document bash ! prefix for pre-execution syntax#55
sjnims merged 2 commits intomainfrom
docs/46-document-bash-prefix-for-pre-execution

Conversation

@sjnims
Copy link
Copy Markdown
Owner

@sjnims sjnims commented Dec 8, 2025

Summary

  • Document the !command`` syntax required for bash pre-execution in actual command files
  • Explain that pre-execution happens before Claude sees the command
  • Clarify why skill examples intentionally omit ! (would execute when loaded into context)
  • Update reference file examples to use correct ! prefix for copy-paste use

Problem

Fixes #46

The command-development skill didn't document the ! prefix syntax required for bash pre-execution in actual command files. Users following the examples would write \git status`instead of!`git status``, resulting in non-functional commands.

Solution

  1. Added "Syntax: The ! Prefix" section to SKILL.md explaining:

    • The exact !command`` syntax
    • How pre-execution works (before Claude sees the prompt)
    • Example showing input and expanded output
  2. Added "Why Skill Examples Omit !" section explaining the intentional omission in skill documentation

  3. Updated all bash examples in plugin-features-reference.md to use the ! prefix, since users copy these into actual command files

Alternatives Considered

  • Adding HTML comments to examples: Less visible, easily overlooked
  • Creating separate "for copying" examples: Would duplicate content

Changes

  • plugins/plugin-dev/skills/command-development/SKILL.md: Added 40 lines documenting the ! prefix syntax
  • plugins/plugin-dev/skills/command-development/references/plugin-features-reference.md: Updated 21 bash examples to use ! prefix

Testing

  • Markdown linting passes
  • Documentation is clear and complete
  • Examples show correct syntax for actual command files

🤖 Generated with Claude Code

sjnims and others added 2 commits December 8, 2025 16:05
Skills use SKILL.md as the primary documentation file.
The README.md duplicated content already present in SKILL.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… syntax

Document the `!`command`` syntax required for bash pre-execution in
actual command files:

- Add "Syntax: The `!` Prefix" section explaining how pre-execution
  works
- Document that `!`command`` executes before Claude sees the prompt
- Explain why skill examples omit `!` (would execute when loaded)
- Update reference file examples to use `!` prefix consistently

Users copying examples from the reference file into actual command
files will now have the correct syntax.

Fixes #46

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Dec 8, 2025

Claude finished @sjnims's task —— View job


PR Review Complete ✓

Summary

Excellent documentation improvement. This PR successfully addresses issue #46 by clearly documenting the ! prefix syntax for bash pre-execution in command files, a critical detail that was missing from the command-development skill.

What's Good

  1. Addresses a Real Gap: The missing ! prefix documentation was causing users to write non-functional commands. This fix directly addresses that confusion.

  2. Clear Explanation: The new "Syntax: The ! Prefix" section (lines 337-365) provides:

    • Exact syntax with examples
    • Step-by-step explanation of how pre-execution works
    • Before/after example showing the expansion process
  3. Thoughtful Context: The "Why Skill Examples Omit !" section (lines 367-375) is excellent. It preemptively answers why the examples in the skill documentation don't use ! - preventing confusion about the apparent inconsistency.

  4. Comprehensive Updates: All 21 bash examples in plugin-features-reference.md now correctly use the ! prefix, making these examples copy-paste ready for actual command files.

  5. Markdown Quality: All files pass markdownlint validation with no issues.

  6. Clean Commit History: Two well-structured commits with clear conventional commit messages.

Technical Accuracy

The documentation is technically accurate:

  • The ! prefix syntax is correct: !command``
  • The explanation of pre-execution timing is correct (before Claude sees the command)
  • The expansion example correctly shows how the bash output replaces the expression
  • The distinction between skill examples (no !) and actual command files (needs !) is valid

Structure and Organization

The placement is logical:

  • New sections fit naturally into the "Bash Execution in Commands" section
  • Content flows from syntax → explanation → why examples differ
  • Reference file updates align with the main skill documentation

Suggestions

Minor observations (not blocking):

  1. Line 349: "Before Claude sees the command, Claude Code executes !command`` blocks" - The inline backtick formatting might render oddly depending on the markdown processor. Consider using a code fence if display issues occur.

  2. Consistency Check: In SKILL.md line 488, the review pattern example still uses plain backticks without !. This is intentional per your explanation (skill examples vs. actual files), but some readers might miss the distinction. The current approach is fine - just noting it for awareness.

Checklist Verification

  • Markdown linting passes: No errors from markdownlint
  • Documentation is clear and complete: The ! prefix syntax is now thoroughly documented
  • Examples show correct syntax: All 21 examples in reference file updated
  • Issue docs(command-development): document bash ! prefix for pre-execution syntax #46 addressed: The missing documentation is now present
  • No breaking changes: Pure documentation update
  • Follows plugin conventions: Maintains the progressive disclosure pattern (SKILL.md → references/)

Recommendation

Approve and merge. This is a valuable documentation fix that will prevent user confusion and make the command-development skill more effective.


@claude claude bot added documentation Improvements or additions to documentation component:skill Skills layer effort:small < 1 hour labels Dec 8, 2025
@sjnims sjnims self-assigned this Dec 8, 2025
@sjnims sjnims requested a review from Copilot December 8, 2025 21:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents the previously undocumented ! prefix syntax required for bash pre-execution in Claude Code command files. The changes address issue #46 by adding comprehensive documentation to SKILL.md explaining how the !command`` syntax works and why skill examples intentionally omit it. All bash examples in the reference file are updated with the correct ! prefix for copy-paste usage. The redundant README.md file is removed since SKILL.md serves as the primary skill documentation.

Key changes:

  • Added 40 lines documenting the ! prefix syntax, execution model, and rationale for omission in skill examples
  • Updated 21 bash command examples in plugin-features-reference.md to use the correct ! prefix
  • Removed redundant README.md file (skill documentation is in SKILL.md)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
plugins/plugin-dev/skills/command-development/SKILL.md Added "Syntax: The ! Prefix" section explaining pre-execution syntax and "Why Skill Examples Omit !" section clarifying intentional omission in documentation
plugins/plugin-dev/skills/command-development/references/plugin-features-reference.md Updated all bash command examples to use ! prefix for correct copy-paste usage; improved example output formatting
plugins/plugin-dev/skills/command-development/README.md Removed redundant README.md file as SKILL.md serves as primary skill documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sjnims sjnims merged commit bcac5a5 into main Dec 8, 2025
14 checks passed
@sjnims sjnims deleted the docs/46-document-bash-prefix-for-pre-execution branch December 8, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:skill Skills layer documentation Improvements or additions to documentation effort:small < 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants