resource
Provides a typed CRUD interface for managing resource collections across multiple storage backends.
Install
mkdir -p .claude/skills/resource && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18249" && unzip -o skill.zip -d .claude/skills/resource && rm skill.zipInstalls to .claude/skills/resource
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
How to use @owlmeans/resource — generic resource abstraction (CRUD over a collection of records) used by mongo-resource, redis-resource, state, storage-resource, etc. Auto-invoked when importing from this package or implementing a custom resource type.Key capabilities
- →Define a generic resource interface
- →Perform get operations on records
- →Perform list operations on records
- →Perform create operations on records
- →Perform update operations on records
- →Perform delete operations on records
How it works
This skill defines a generic interface for CRUD operations over a collection of records. Concrete implementations are provided by other packages like `@owlmeans/mongo-resource`.
Inputs & outputs
When to use resource
- →Access generic resource
- →Implement custom resource type
- →CRUD record operations
About this skill
@owlmeans/resource
Layer: Core
Install: "@owlmeans/resource": "^0.1.2" in dependencies
Key Exports
| Export | Description |
|---|---|
Resource<T> types | Generic resource interface (get/list/create/update/delete) |
| Errors | Typed resource errors (NotFound, AlreadyExists, etc.) |
| Constants | Default resource aliases, operation names |
| Service helpers | Wrap a resource as a context service |
Usage
A resource is a typed CRUD-over-records abstraction. Concrete implementations come from @owlmeans/mongo-resource, @owlmeans/redis-resource, @owlmeans/state, etc. Consumers register a resource with the context and access it via ctx.getResource<T>(alias).
import type { Resource } from '@owlmeans/resource'
interface Project { id: string; name: string; entityId: string }
const projects = ctx.getResource<Resource<Project>>('projects')
const { items } = await projects.list({ entityId: 'abc' })
Depends On
@owlmeans/error— for typed errors@owlmeans/i18n— error messages
When not to use it
- →When a concrete resource implementation is not available
- →When direct database interaction is preferred over an abstraction layer
Prerequisites
Limitations
- →Requires concrete implementations from other packages
- →Does not provide direct data storage or retrieval mechanisms
How it compares
This skill provides a unified abstraction layer for resource operations, unlike direct database or service-specific interactions.
Compared to similar skills
resource side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| resource (this skill) | 0 | 2mo | No flags | Beginner |
| convex | 0 | 5mo | No flags | Beginner |
| alwib-backend | 0 | 5mo | No flags | Advanced |
| nanoclaw-backend-ts | 0 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
convex
waynesutton
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
alwib-backend
Tsuev
Develop and maintain the Alwib NestJS backend in `backend/`. Use when implementing or refactoring modules, controllers, services, DTO validation, Swagger docs, authentication/authorization flows, Prisma schema and migrations, and backend lint/test flows.
nanoclaw-backend-ts
binidx
Use when editing NanoClaw backend TypeScript under src. Covers Express routes, conversation flow, database persistence, runtime state, providers, scheduler, and agent execution.
assets
salazarsebas
Stellar Assets (classic) + trustlines + Stellar Asset Contract (SAC) bridge to Soroban. Covers asset issuance, distribution, authorization flags, clawback, regulated assets, trustline management, and the SAC interop layer that exposes classic assets as Soroban tokens. Use when tokenizing real-world
supabase-developer
daffy0208
Build full-stack applications with Supabase (PostgreSQL, Auth, Storage, Real-time, Edge Functions). Use when implementing authentication, database design with RLS, file storage, real-time features, or serverless functions.
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.