data-access-api

Validate external data interactions and route them through centralized service layer with Result<T> error handling.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/Hashzin-0/Curion --skill data-access-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-access-api
Source: https://github.com/Hashzin-0/Curion/tree/main/.opencode/skills/data-access-api
Command: npx skills add https://github.com/Hashzin-0/Curion --skill data-access-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frontend data is untrusted — all external data interactions must be validated before touching the data layer, and all data access should go through a service layer to prevent leaks and inconsistent handling.

Core Features & Use Cases

  • Validation-first data access: enforce schemas before any query to databases or external APIs.
  • Centralized HTTP client with timeout and retry logic for reliable external calls.
  • Explicit error handling with the Result pattern to avoid unhandled exceptions.
  • Service-layer architecture that decouples components from data sources and enables easier testing.

Quick Start

Create a data service that validates incoming data against a schema before calling the repository or API client.

Frequently Asked Questions about data-access-api

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

FAQPage Schema
How do I enforce data validation in a TypeScript backend service layer?

To enforce data validation in a TypeScript backend service layer, route all external data interactions through a centralized service that validates input schemas before querying databases or external APIs. This prevents untrusted data from reaching your data layer.

What is the Result pattern for API error handling?

The Result pattern for API error handling returns explicit success or error objects instead of throwing unhandled exceptions. This forces your backend service layer to safely manage errors during external data interactions and API client calls.

How do I configure an HTTP client with timeout and retry logic for external API calls?

You can configure an HTTP client with timeout and retry logic for external API calls by routing requests through a centralized service layer. This ensures reliable external data fetching while maintaining decoupled, testable backend components.

Why should I use a service layer architecture for backend data access?

You should use a service layer architecture for backend data access to decouple application components from underlying data sources. This centralizes data validation, prevents leaks, and enables easier testing of your TypeScript backend.

Can I use this data validation approach for both API routes and API clients?

Yes, you can use this data validation approach for both API routes and API clients. The service layer applies validation-first schemas to safely manage any external data interactions, whether you are fetching or mutating data.