services-layer
Installation
SKILL.md
Services Layer Patterns
This skill documents how to implement services in the Whispering architecture. Services are UI-free business logic with explicit app inputs and Result<T, E> return types.
Related Skills: See
error-handlingfor trySync/tryAsync patterns. Seedefine-errorsfor error variant factories. Seequery-layerfor consuming services from$lib/rpcwith TanStack Query.
When to Apply This Skill
Use this pattern when you need to:
- Create a new service with domain-specific error handling
- Add error types with structured context (like HTTP status codes)
- Understand how services are organized and exported
- Implement platform-specific service variants (desktop vs web)
Core Architecture
Services follow a three-layer architecture: Service -> RPC/Query -> UI