api-design
api-design guides you through building robust command interfaces for Tauri applications using type-safe data structures and proven patterns. It covers DTO design, validation at API boundaries, error handling strategies, and documentation practices to ensure your backend contracts are clear and maintainable.
api-design helps you build type-safe Tauri command APIs with structured DTOs and validation patterns.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-01-30
api-design helps you build type-safe Tauri command APIs with structured DTOs and validation patterns. api-design guides you through building robust command interfaces for Tauri applications using type-safe data structures and proven patterns. It covers DTO design, validation at API boundaries, error handling strategies, and documentation practices to ensure your backend contracts are clear and maintainable.
Use it when
- api-design covers Tauri command structure best practices including clear separation of concerns between commands.
- api-design guides you through creating data transfer objects (DTOs) in Rust with field-level validation rules.
Verify before relying
Read SKILL.md below before installing (2 files). Open directory: indexed for reading, not audited.
Install
cacr92/WeReply/api-design · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to design Tauri API commands with type safety?
api-design teaches you to structure Tauri command interfaces using type-safe data transfer objects (DTOs) and validation patterns. Define request and response types in Rust, leverage the type system to catch errors at compile time, and use tools like Specta to auto-generate TypeScript bindings. This ensures your frontend and backend stay synchronized and eliminates runtime type mismatches.
What are best practices for Tauri command structure?
api-design covers Tauri command structure best practices including clear separation of concerns between commands, consistent naming conventions, and layered validation. Use dedicated DTO types for inputs and outputs, apply validation at API boundaries before business logic runs, and organize commands into logical modules. This approach makes your codebase maintainable and your contracts explicit.
How do I create DTOs and validate data in Rust APIs?
api-design guides you through creating data transfer objects (DTOs) in Rust with field-level validation rules. Use serde for serialization, derive macros for common patterns, and validation libraries to enforce constraints at API boundaries. Structure your DTOs to mirror your API contracts, validate early in the request pipeline, and return structured errors when validation fails.
How should I handle errors in API responses?
api-design shows you how to implement structured error types for APIs that provide clear, actionable feedback. Define custom error enums that map to HTTP-like status codes, include error codes and messages in responses, and ensure all API endpoints return consistent error formats. This lets clients handle failures predictably and improves debugging.
How do I document API endpoints and contracts?
api-design emphasizes documenting API contracts through type definitions and generated bindings. Use Specta to auto-generate TypeScript types from your Rust command signatures, add doc comments to DTOs and commands, and maintain a clear mapping between frontend requests and backend handlers. Generated documentation stays in sync with your code and reduces manual effort.
What patterns work for pagination and CRUD operations?
api-design covers pagination, versioning, and CRUD patterns for scalable APIs. Implement paginated responses with offset/limit or cursor-based approaches, structure CRUD commands consistently (create, read, update, delete), and version your API contracts to support evolution. These patterns keep your API predictable as your application grows.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
API Design Skill
Expert guidance for designing robust, type-safe APIs and data structures in Tauri applications.
Overview
This skill provides guidance for: - Designing Tauri command APIs - Creating type-safe DTOs (Data Transfer Objects) - API documentation and contracts - Request/response patterns - Error handling in APIs - API versioning and evolution
When This Skill Applies
This skill activates when: - Creating new Tauri commands - Designing request/response DTOs - Planning API structure - Documenting API contracts - Refactoring existing APIs - Handling API versioning
API Design Principles
1. Type Safety First
✓ Good: Explicit, typed structures
```rust use serde::{Deserialize, Serialize}; use specta::Type;
[derive(Serialize, Deserialize, Type, Clone)]
[specta(inline)]
pub struct CreateFormulaDto { /// Formula name (2-100 characters) #[serde(alias = "formulaName")] pub name: String,
/// Species code (e.g., "pig",
(truncated - see the full file via the links below)
File tree — 2 files
.claude/skills/api-design/SKILL.md
.claude/skills/api-design/skill.json
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Design type-safe Tauri command APIs with DTOs and validation”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Master error handling across Rust and TypeScript in Tauri applications. Learn custom error types, exception chains, API response patterns, and debugging techniques using tracing and structured logging. Covers database errors, command failures, and React error boundaries.
This skill equips you with patterns for Tauri 2.0 desktop development, covering command definition with specta type generation, Rust-React integration, and proper error handling. Learn state management, async best practices, and desktop-specific constraints to avoid common pitfalls like blocking the async runtime or exposing sensitive errors.
Tdd Workflow guides developers through test-first development using the red-green-refactor pattern: write failing tests, implement minimal code to pass, then refactor while maintaining test coverage. It covers unit and integration testing strategies for both Rust and TypeScript, with practical examples including validation logic, mocking external dependencies, and coverage verification tools. All new features and fixes must meet an 80% test coverage threshold.
DeepSeek Integration provides expert guidance for connecting to DeepSeek's chat API using reqwest with optimized connection pooling, Bearer token authentication, and configurable timeouts. Handle both standard JSON responses and Server-Sent Events streaming, with built-in retry logic and exponential backoff for resilience.
Master React 19 and TypeScript 5 component development with production-ready patterns for Ant Design, TanStack Query state management, and Tauri desktop apps. Learn Hooks best practices, form validation, performance optimization with React.memo and useCallback, and type-safe command integration without sacrificing developer experience.
ipc-communication provides expert guidance for setting up inter-process messaging between a Rust Orchestrator and Platform Agents using line-delimited JSON over stdin/stdout. It covers message type definitions, bidirectional command and response patterns, and includes production-ready Rust process management and Python agent implementations with timeout handling and error recovery.
More skills Cc Java Dev (NOASSERTION) · refactoring (MIT)