mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
d8f4659ad7
Add project-specific Claude Code configuration for RTK development: - 5 agents: code-reviewer, debugger, rtk-testing-specialist, rust-rtk, technical-writer - 2 commands: /diagnose (env checks), /test-routing (dry-run validation) - 1 hook: pre-commit cargo fmt + clippy + test gate - 1 rule: CLI testing methodology (snapshot, token accuracy, cross-platform) - 3 skills: performance optimization, security audit, release workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
413 B
Bash
Executable File
17 lines
413 B
Bash
Executable File
#!/bin/bash
|
|
# Auto-format Rust code before commits
|
|
# Hook: PreToolUse for git commit
|
|
|
|
echo "🦀 Running Rust pre-commit checks..."
|
|
|
|
# Format code
|
|
cargo fmt --all
|
|
|
|
# Check for compilation errors only (warnings allowed)
|
|
if cargo clippy --all-targets 2>&1 | grep -q "error:"; then
|
|
echo "❌ Clippy found errors. Fix them before committing."
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Pre-commit checks passed (warnings allowed)"
|