data-validation
Provides comprehensive guidance for input validation, data serialization, and ID management in backend APIs. This skill should be used when designing validation schemas, transforming request/response data, mapping database IDs to external identifiers, and ensuring type safety across API boundaries.
npx skills add majiayu000/claude-skill-registry --skill data-validation-allenlin90-eridu-services-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Data Validation Skill Provides comprehensive guidance for input validation, response serialization, and ID management. ## Core Concepts **API Contract vs Internal Implementation**: ``` ┌─────────────────────────────────────────┐ │ Client (External) │ │ snake_case IDs, user-friendly │ └──────────────┬──────────────────────────┘ │ HTTP API Boundary │ ┌──────────────▼──────────────────────────┐ │ Your Application (Internal) │ │ camelCase IDs, database structure │ └─────────────────────────────────────────┘ ``` **Responsibilities at each layer**: | Layer | Responsibility | | ---------- | -------------------------------------------------- | | Controller | Validate input (schema), serialize output (schema) | | Service | Business logic with internal format | | Repository | Database access with internal format | | Database | Storage with primary keys | ## ID Management Pattern ### External API Contract ``` URL: GET /admin/users/:id // id = uid (user_abc123) Response: { "id": "user_abc123", // UID mapped as id "email": "user@example.com", "name": "John Doe", // NO "uid" field // NO database "id" field (bigint primary key) } ``` ### Internal Implementation ``` Database: { id: 12345, // big
- Core Concepts
- ID Management Pattern
- External API Contract
- Internal Implementation
- UID Format
- Input Validation Pattern
- Response Serialization Pattern
- Nested Validation
- Type Mapping
- Pagination Validation
- Error Messages
- Best Practices Checklist
- Related Skills
What does the data-validation skill do?
Provides comprehensive guidance for input validation, data serialization, and ID management in backend APIs. This skill should be used when designing validation schemas, transforming request/response data, mapping database IDs to external identifiers, and ensuring type safety across API boundaries.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill data-validation-allenlin90-eridu-services-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
