koan-multi-provider

Detect provider capabilities and route queries across SQL, NoSQL, vector, and JSON stores.

4|3|Updated Aug 18, 2025
One-click install
npx skills add https://github.com/sylin-org/koan-framework --skill koan-multi-provider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: koan-multi-provider
Source: https://github.com/sylin-org/koan-framework/tree/main/.claude/skills/multi-provider
Command: npx skills add https://github.com/sylin-org/koan-framework --skill koan-multi-provider

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers struggle with vendor lock-in and complex code changes when switching or integrating multiple data providers (SQL, NoSQL, Vector). This Skill eliminates that complexity, allowing a single codebase to work across diverse data stores.

Core Features & Use Cases

  • Provider Transparency: Write entity code once, run it on PostgreSQL, MongoDB, SQLite, Redis, Weaviate, or JSON stores without code changes.
  • Capability Detection: Dynamically check what features (LINQ, transactions, fast remove) a provider supports and implement graceful fallbacks.
  • Context Routing: Isolate data logically using partitions (multi-tenancy, archives) or route to different physical sources (read replicas, caches).
  • Use Case: Easily switch your application from a local SQLite database to a production PostgreSQL cluster, or integrate a Redis cache and a Weaviate vector database, all without rewriting your core data access logic.

Quick Start

To check if your current data provider supports LINQ queries for the 'Todo' entity, use: var capabilities = Data<Todo, string>.QueryCaps; if (capabilities.Capabilities.HasFlag(QueryCapabilities.LinqQueries)) { /* use LINQ / } else { / client-side filter */ }

Frequently Asked Questions about koan-multi-provider

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

FAQPage Schema
How do I write code that works across multiple databases like PostgreSQL, MongoDB, and SQLite without rewriting logic?

Provider transparency lets you write entity code once and run it unchanged across SQL, NoSQL, and vector databases. The Skill handles routing and adapter logic automatically, eliminating vendor lock-in and reducing code duplication across different data stores.

Can I check what features a database provider supports before executing a query?

Yes, capability detection lets you query what features a provider supports—such as LINQ queries or transactions—at runtime. You can then implement graceful fallbacks, like switching to client-side filtering if LINQ isn't available.

What's the best way to route data across multiple sources, like read replicas or caches, in a single application?

Context routing uses partitions and source configuration to isolate data logically by tenant or purpose, or route queries to different physical sources. This enables multi-tenancy, archive separation, and cache integration without changing core data access code.

Can I integrate Redis, Weaviate, and PostgreSQL in the same codebase without separate data access layers?

Yes, the Skill enables seamless integration across SQL databases, NoSQL stores, vector databases, JSON files, and in-memory systems. A single code path with automatic provider detection handles partition, source, and adapter routing across all store types.

How do I migrate from SQLite to PostgreSQL in production without rewriting my data access layer?

The Skill supports provider-agnostic query execution, so switching from SQLite to PostgreSQL requires only configuration changes, not code changes. Capability detection ensures queries execute correctly on the new provider with automatic fallbacks where needed.

What happens when a database provider doesn't support a feature my query needs?

Graceful fallbacks automatically adjust execution based on provider capabilities. If a feature like fast remove isn't supported, the Skill routes to an alternative implementation, ensuring consistent behavior across heterogeneous data stores without manual error handling.