Code consistency validator
Skill bg-szy/TOP-SKILLS/skills/marketplace/code-consistency-validator
全球最大的 Claude Code 技能聚合库 · 收录 3900+ 来自 12+ 来源的技能,提供在线搜索与趋势分析看板 / The world's largest Claude Code skill aggregation hub — 3900+ skills from 12+ sources with online search and trend dashboard
npx -y skills add bg-szy/TOP-SKILLS --skill code-consistency-validatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Validates type consistency across Rust, TypeScript, PostgreSQL boundaries. Use when reviewing code, debugging type mismatches, or validating API contracts. Triggers on: check consistency, validate types, find mismatches, cross-language.
SKILL.md
1.6 KB, 337 tokens by cl100k_base, as published. Nobody here has run it
Code Consistency Validator
Validates type consistency across Rust, TypeScript, and PostgreSQL boundaries.
When to Use
- Reviewing code for type mismatches
- Debugging precision loss issues
- Validating API contracts between languages
- Checking BigInt/Number conversions
- Auditing cross-language data flow
Workflow
Step 1: Run Quick Grep
Use provided grep commands to find potential issues.
Step 2: Check Critical Patterns
Look for Number() on wei/balance, parseInt without radix.
Step 3: Generate Report
Report findings using severity levels (CRITICAL/WARNING/INFO).
Critical Type Mappings
| Rust | TypeScript | PostgreSQL |
|---|---|---|
| i64/u64 | bigint (not number!) | BIGINT |
| U256 | string | DECIMAL(36,18) |
| f64 | number | DOUBLE PRECISION |
🔴 CRITICAL Patterns
Number(response.profit_wei) // ❌ Precision loss!
parseInt(hexBalance) // ❌ Missing radix!
JSON.stringify({ amount: BigInt(x) }) // ❌ Fails!
Quick Grep
grep -rn "Number(" --include="*.ts" | grep -E "(wei|balance|amount)"
grep -rn "parseInt(" --include="*.ts" | grep -v ", 10)" | grep -v ", 16)"
Report Format
🔴 CRITICAL (funds at risk) 🟠 WARNING (potential bugs) 🟡 INFO (style) ✅ VALIDATED
What ships with it: 1 file
10.4 KB alongside SKILL.md
- skill-report.json10.4 KB