用途:为当前项目自动识别格式化、lint、类型检查和测试工具,并按正确顺序执行验证,失败即停止并报告结果,便于在提交或交付前统一校验项目。
主要能力:先检查 ./CLAUDE.md 中的验证工具与权限设置;必要时根据 package.json、pyproject.toml、Cargo.toml、Makefile、go.mod 自动识别项目类型;按 Format→Lint→Type Check→Test 顺序执行流水线。
各项目类型命令:Make(优先,覆盖其他)使用 make format && make lint && make typecheck && make test,或 make validate;Python 使用 uv run ruff format .、uv run ruff check .、uv run ty check(或 mypy、pyright)、uv run pytest;Node.js/TypeScript 使用 pnpm run format(或 npx prettier --write .)、pnpm run lint(或 npx eslint .)、pnpm run typecheck(或 npx tsc --noEmit)、pnpm test;Rust 使用 cargo fmt、cargo clippy、cargo test;Go 使用 gofmt -w .、go vet ./...、go test ./...。
自动发现顺序:Makefile→pyproject.toml→package.json→Cargo.toml→go.mod。错误处理包括工具未安装时给出安装说明、缺少配置时建议最小化配置、验证失败时给出具体修复建议、依赖冲突时建议解决策略。可将发现的验证信息缓存到项目 CLAUDE.md 的“Project Validation Tools”小节。
适用场景:需要统一跑通格式化、静态检查与测试的本地开发或提交前校验。限制:实际命令与参数以项目配置为准,未提供具体安装命令之外的手动步骤;缺失事实暂未提供。