libresource

Manage typed resources with policy-based access control and URI lookups.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libresource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libresource
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libresource
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libresource

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

libresource provides typed resource management with policy-based access control for storage-backed data, enabling consistent persistence and retrieval workflows.

Core Features & Use Cases

  • ResourceIndex stores and retrieves resources with per-resource access control.
  • toInstance converts plain objects to typed resource instances.
  • toResourceId parses URI strings for resource identification.

Quick Start

Instantiate a ResourceIndex with a storage backend and policy, then store a resource and fetch it by ID.

Frequently Asked Questions about libresource

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

FAQPage Schema
How do I manage typed resources with policy-based access control for storage?

You can manage typed resources with policy-based access control by using a ResourceIndex that integrates with storage and policy backends to enforce per-resource access rules during retrieval and persistence operations.

What is the best way to retrieve stored messages using identity-based access?

The best way to retrieve stored messages by identity is using a ResourceIndex that applies identity-based retrieval filters and per-resource access control to ensure secure, policy-compliant data access.

How do I parse URI strings for resource identification in a storage application?

You parse URI strings for resource identification using the toResourceId helper, which extracts resource identifiers from URIs to enable consistent URI-based lookups across your storage backend.

Can I convert plain objects to typed resource instances for access-controlled storage?

Yes, you can convert plain objects to typed resource instances using the toInstance helper, enabling typed resource management and policy enforcement before storing data in the ResourceIndex.

Does this resource management approach support prefix-based lookups across stored data?

Yes, the resource management approach supports prefix-based lookups via the findByPrefix method, allowing efficient retrieval of resources that share a common URI prefix within the ResourceIndex.

When do I need per-resource access control for URI-based resource lookups?

You need per-resource access control for URI-based resource lookups when applications store and retrieve resources like messages with varying permissions, requiring identity-based retrieval and policy enforcement per item.