- Add .claude-plugin/plugin.json manifest for auto-updates
- Move claude/ contents to root level (commands/, hooks/, scripts/, skills/)
- Update hooks.json to use ${CLAUDE_PLUGIN_ROOT} for portability
- Add .gitignore for IDE files
- Update CLAUDE.md with new structure and installation instructions
Plugin can now be installed via:
claude plugin add host-uk/core-agent
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
492 B
Bash
Executable file
17 lines
492 B
Bash
Executable file
#!/bin/bash
|
|
# Auto-format PHP files after edits using core php fmt
|
|
|
|
read -r input
|
|
FILE_PATH=$(echo "$input" | jq -r '.tool_input.file_path // empty')
|
|
|
|
if [[ -n "$FILE_PATH" && -f "$FILE_PATH" ]]; then
|
|
# Run Pint on the file silently
|
|
if command -v core &> /dev/null; then
|
|
core php fmt --fix "$FILE_PATH" 2>/dev/null || true
|
|
elif [[ -f "./vendor/bin/pint" ]]; then
|
|
./vendor/bin/pint "$FILE_PATH" 2>/dev/null || true
|
|
fi
|
|
fi
|
|
|
|
# Pass through the input
|
|
echo "$input"
|