Gates PR验证
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
Gates - Quality Validation (v2.37)
Comprehensive quality validation across 9 programming languages with TLDR-assisted analysis.
Quick Start
/gates # Run all quality gates
ralph gates # Via CLI
ralph gates src/ # Specific directory
Pre-Gates: TLDR Language Detection (v2.37)
AUTOMATIC - Detect project languages efficiently:
# Get codebase structure to detect languages (95% token savings)
tldr structure . > /tmp/project-structure.md
# From structure, identify:
# - Primary language(s)
# - Config files present
# - Test frameworks used
Supported Languages
| Language | Linter | Formatter | Types |
|---|---|---|---|
| TypeScript | ESLint | Prettier | tsc |
| JavaScript | ESLint | Prettier | - |
| Python | Ruff | Black | mypy |
| Rust | Clippy | rustfmt | cargo check |
| Go | golint | gofmt | go vet |
| Java | Checkstyle | google-java-format | - |
| Ruby | RuboCop | - | Sorbet |
| PHP | PHP_CodeSniffer | php-cs-fixer | PHPStan |
| Solidity | Solhint | prettier-solidity | - |
Workflow
1. Detect Languages
# Auto-detect based on file extensions and config files
2. Run Linters
# Per-language linting
npx eslint src/ # TypeScript/JavaScript
ruff check . # Python
cargo clippy # Rust
golangci-lint run # Go
3. Check Formatting
npx prettier --check . # JS/TS
black --check . # Python
rustfmt --check src/ # Rust
gofmt -l . # Go
4. Type Checking
npx tsc --noEmit # TypeScript
mypy . # Python
cargo check # Rust
go vet ./... # Go
5. Run Tests
npm test # Node projects
pytest # Python
cargo test # Rust
go test ./... # Go
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All gates passed |
| 1 | Lint errors |
| 2 | Format errors |
| 3 | Type errors |
| 4 | Test failures |
Gate Configuration
Minimal (fast)
ralph gates --minimal # Lint only
Standard (default)
ralph gates # Lint + Format + Types
Full (CI)
ralph gates --full # Lint + Format + Types + Tests
Integration
- Invoked by /orchestrator in Step 6
- Pre-step: tldr structure for language detection (v2.37)
- Must pass before VERIFIED_DONE
- Hooks:
quality-gates.sh(PostToolUse)
TLDR Integration (v2.37)
| Phase | TLDR Command | Purpose |
|---|---|---|
| Language detection | tldr structure . |
Identify languages |
| Error context | tldr context $FILE . |
Understand failing code |
| Impact analysis | tldr deps $FILE . |
Find related tests |
Anti-Patterns
- Never skip gates for "quick fixes"
- Never ignore type errors
- Never commit with lint warnings
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @majiayu000 · MIT
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js · Python
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Quick Start
Quick Start
Workflow
Workflow
# Gates - Quality Validation (v2.37)
Comprehensive quality validation across 9 programming languages with **TLDR-assisted analysis**.
## Quick Start
```bash
/gates # Run all quality gates
ralph gates # Via CLI
ralph gates src/ # Specific directory
```
## Pre-Gates: TLDR Language Detection (v2.37)
**AUTOMATIC** - Detect project languages efficiently:
```bash
# Get codebase structure to detect languages (95% token savings)
tldr structure . > /tmp/project-structure.md
# From structure, identify:
# - Primary language(s)
# - Config files present
# - Test frameworks used
```
## Supported Languages
| Language | Linter | Formatter | Types |
|----------|--------|-----------|-------|
| TypeScript | ESLint | Prettier | tsc |
| JavaScript | ESLint | Prettier | - |
| Python | Ruff | Black | mypy |
| Rust | Clippy | rustfmt | cargo check |
| Go | golint | gofmt | go vet |
| Java | Checkstyle | google-java-format | - |
| Ruby | RuboCop | - | Sorbet |
| PHP | PHP_CodeSniffer | php-cs-fixer | PHPStan |
| Solidity | Solhint | prettier-solidity | - |
## Workflow
### 1. Detect Languages
```bash
# Auto-detect based on file extensions and config files
```
### 2. Run Linters
```bash
# Per-language linting
npx eslint src/ # TypeScript/JavaScript
ruff check . # Python
cargo clippy # Rust
golangci-lint run # Go
```
### 3. Check Formatting
```bash
npx prettier --check . # JS/TS
black --check . # Python
rustfmt --check src/ # Rust
gofmt -l . # Go
```
### 4. Type Checking
```bash
npx tsc --noEmit # TypeScript
mypy . # Python
cargo check # Rust
go vet ./... # Go
```
### 5. Run Tests
```bash
npm test # Node projects
… 证据边界与执行链路
作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Quick Start → Pre-Gates: TLDR Language Detection (v2.37) → Supported Languages → Workflow → 1. Detect Languages → 2. Run Linters
要点 -> TLDR-assisted analysis · AUTOMATIC · Pre-step: tldr structure for language detection · Comprehensive quality validation across 9 programming languages with TLDR-assisted analysis. · | Phase | TLDR Command | Purpose | |-------|--------------|---------| | Language detection | tldr structure .
文件/命令 -> quality-gates.sh · tldr structure . · tldr context $FILE . · tldr deps $FILE .
内容 SHA-256 -> 5dcf676b89cd
方法与流程
适用与边界
原文中的明确线索
quality-gates.sh、tldr structure .、tldr context $FILE .、tldr deps $FILE .