Promotes type-safe parsing over validation to enforce data invariants at the type level.
Install
mkdir -p .claude/skills/parse-dont-validate && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16359" && unzip -o skill.zip -d .claude/skills/parse-dont-validate && rm skill.zipInstalls to .claude/skills/parse-dont-validate
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
「Parse, don't validate」原則に基づくコードレビューと設計支援。validateパターン(チェックして結果を捨てる) をparseパターン(チェック結果を型で保持)に変換し、型システムで不変式を強制する設計を促進する。 コードレビュー、新規実装、リファクタリング時にvalidation関数の改善が必要な場合に使用。 対象言語: Rust, Haskell, TypeScript, Scala, Java, Go, Python。 トリガー:「バリデーションを改善して」「型で保証したい」「shotgun parsingを直して」 「不正な状態を型で防ぎたい」「Maybeを減らしたい」といった型安全性関連リクエストで起動。Key capabilities
- →Convert validation patterns to parsing patterns
- →Promote designs that enforce invariants with type systems
- →Improve validation functions during code review
- →Refactor existing implementations to use parsing
- →Detect anti-patterns like `validate*()` returning `()`
- →Transform lists into non-empty arrays or maps
How it works
The skill transforms validation functions that discard information into parsing functions that retain information within a type, ensuring type safety.
Inputs & outputs
When to use parse-dont-validate
- →Replacing validation checks with types
- →Preventing shotgun parsing
- →Improving type safety in APIs
About parse-dont-validate
Identifies runtime validation anti-patterns and converts them into parsing functions that return type-checked values, preventing invalid states.
>-
When not to use it
- →When the cost of refactoring for a single `error "impossible"` is too high
- →When compatibility with existing APIs is required
- →In performance-critical hot paths
Limitations
- →Not suitable for single `error "impossible"` cases due to high modification cost
- →Not recommended when existing API compatibility is a concern
- →Avoid in performance-critical hot paths
How it compares
This approach uses the type system to guarantee invariants, unlike manual validation which requires re-checking and does not provide type guarantees.
Compared to similar skills
parse-dont-validate side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| parse-dont-validate (this skill) | 0 | 5mo | No flags | Intermediate |
| deepwiki-rs | 25 | 9mo | Review | Intermediate |
| tldr-code | 1 | 7mo | Review | Advanced |
| harness-boundary | 0 | 3mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by j5ik2o
View all by j5ik2o →You might also like
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
tldr-code
parcadei
Token-efficient code analysis via 5-layer stack (AST, Call Graph, CFG, DFG, PDG). 95% token savings.
harness-boundary
zkp442910864
Harness 工程边界约束与变更评估。Use when: 评估代码变更影响范围、确认安全边界、检查工程规范合规性、审查变更风险等级。
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
ast-grep-find
parcadei
AST-based code search and refactoring via ast-grep MCP
lint-and-validate
davila7
Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.