feat: ship slash commands with GitHub Action (#381)

* feat: add slash command shipping infrastructure

- Created /slash-commands/ directory to store bundled slash commands
- Added code-review.md slash command for automated PR reviews
- Modified setup-claude-code-settings.ts to copy slash commands to ~/.claude/
- Added test coverage for slash command installation
- Commands are automatically installed when the GitHub Action runs

* fix: simplify slash command implementation to match codebase patterns

- Reverted to using Bun's $ shell syntax consistently with the rest of the codebase
- Simplified slash command copying to basic shell commands
- Removed unnecessary fs/promises complexity
- Maintained all functionality and test coverage
- More appropriate for GitHub Action context where inputs are trusted

* remove test slash command

* fix: rename slash_commands_dir to experimental_slash_commands_dir

- Added 'experimental' prefix as suggested by Ashwin
- Updated all references in action.yml and base-action
- Restored accidentally removed code-review.md file

---------

Co-authored-by: km-anthropic <km-anthropic@users.noreply.github.com>
This commit is contained in:
km-anthropic
2025-08-03 21:05:33 -07:00
committed by GitHub
parent d66adfb7fa
commit 458e4b9e7f
5 changed files with 93 additions and 2 deletions

View File

@@ -61,6 +61,9 @@ inputs:
description: "Timeout in minutes for Claude Code execution"
required: false
default: "10"
experimental_slash_commands_dir:
description: "Experimental: Directory containing slash command files to install"
required: false
# Authentication settings
anthropic_api_key:
@@ -143,6 +146,7 @@ runs:
INPUT_TIMEOUT_MINUTES: ${{ inputs.timeout_minutes }}
INPUT_CLAUDE_ENV: ${{ inputs.claude_env }}
INPUT_FALLBACK_MODEL: ${{ inputs.fallback_model }}
INPUT_EXPERIMENTAL_SLASH_COMMANDS_DIR: ${{ inputs.experimental_slash_commands_dir }}
# Provider configuration
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}