validation-policy

Enforce sequential numeric validation on public function inputs.

Updated Nov 26, 2025
One-click install
npx skills add https://github.com/shiroinock/Darts-Score-Trainer --skill validation-policy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validation-policy
Source: https://github.com/shiroinock/Darts-Score-Trainer/tree/main/.claude/skills/validation-policy
Command: npx skills add https://github.com/shiroinock/Darts-Score-Trainer --skill validation-policy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a unified policy for numeric input validation across the project, guiding tests, implementations, and reviews.

Core Features & Use Cases

  • Validation order: finite value check, integer check, range check, domain-specific check.
  • Error messaging: consistent, localized messages.
  • Use Case: Implement function arguments validation with consistent errors.

Quick Start

When validating a numeric input, apply the policy: perform finite check, then integer check, then range, then domain, and throw errors with standardized messages.

Frequently Asked Questions about validation-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate numeric inputs consistently across TypeScript functions?

Numeric input validation enforces a standardized sequence: check finite values, verify integers, validate ranges, then apply domain-specific checks. This Skill provides unified error handling and JSDoc documentation so all public functions follow the same validation policy across your project.

What's the correct order for runtime validation checks?

Runtime validation applies four sequential checks: finite value check first, then integer check, then range validation, then domain-specific validation. This order catches errors early and ensures consistent error messages in Japanese throughout your codebase.

How do I implement error handling for function arguments in TypeScript?

Error handling combines input validation with standardized messages and JSDoc @throws documentation. This Skill enforces a unified error-messaging policy across scoring, coordinates, and boundary inputs so callers receive predictable, localized error feedback.

Can I apply validation policies to existing TypeScript projects?

Yes. This Skill applies validation policies to all public function inputs without requiring dependencies or components. It guides implementation, testing, and code reviews using consistent validation order and standardized error messages.

What types of numeric inputs does this validation cover?

Validation covers scoring calculations, coordinate operations, and boundary inputs. Domain-specific checks follow the standard finite-integer-range sequence, with JSDoc constraints documenting @param limits and expected @throws errors for each function.