Initial commit: Every Marketplace for Claude Code
Official plugin marketplace featuring the Compounding Engineering plugin with 15 specialized agents, 6 commands, and 2 automated hooks. This marketplace embodies the compounding engineering philosophy where each unit of work makes future work easier. Key features: - Compounding Engineering plugin with AI-powered development tools - Complete marketplace infrastructure with CLAUDE.md documentation - Simplified structure following official Claude Code specifications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
33
plugins/compounding-engineering/hooks/run-linter.rb
Executable file
33
plugins/compounding-engineering/hooks/run-linter.rb
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "json"
|
||||
|
||||
# Read JSON input from stdin
|
||||
input = JSON.parse(STDIN.read)
|
||||
|
||||
# Get the bash command being executed
|
||||
command = input.dig("tool_input", "command") || ""
|
||||
|
||||
# Check if it's a git commit command
|
||||
if command.match?(/\bgit\s+commit\b/i)
|
||||
# Log what we're doing (visible in transcript mode)
|
||||
warn "Git commit detected. Running standardrb --fix..."
|
||||
|
||||
# Run standardrb --fix
|
||||
system("standardrb --fix")
|
||||
|
||||
# Run erb linter
|
||||
system("erblint --lint-all --autocorrect")
|
||||
|
||||
# Check if standardrb succeeded
|
||||
if $?.success?
|
||||
warn "✓ Code formatted with standardrb"
|
||||
exit 0 # Success - let the commit proceed
|
||||
else
|
||||
warn "⚠ standardrb --fix failed (exit code: #{$?.exitstatus})"
|
||||
exit 1 # Non-blocking error - show warning but continue
|
||||
end
|
||||
else
|
||||
# Not a git commit, just pass through
|
||||
exit 0
|
||||
end
|
||||
Reference in New Issue
Block a user