repository-remote
CommunityEnforce API-backed repos with safeApiCall.
Authorthinhtt264
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a standard pattern for implementing repositories that talk to remote APIs, ensuring a clean separation between interfaces and implementations and enforcing safe remote calls.
Core Features & Use Cases
- Interface + Implementation split: Define XxxRepository and XxxRepositoryImpl with suspend functions returning ApiResult<T>.
- Safe API calls: Wrap every remote API call with safeApiCall and ensure Retrofit-based responses map to ApiResult.
- Hilt binding: Provide a RepositoryModule binding to inject XxxRepositoryImpl as XxxRepository and bind to Singleton scope.
- Use Case: When building a feature that interacts with a backend, create a dedicated remote repository that handles network calls and error handling, without mixing in Room/DAO logic.
Quick Start
Create an XxxRepository interface and an XxxRepositoryImpl implementation, add a RepositoryModule binding, and ensure all remote calls are wrapped with safeApiCall.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: repository-remote Download link: https://github.com/thinhtt264/Snaplet-App/archive/main.zip#repository-remote Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.