Agent skill
libresource
libresource - Typed resource management with access control. ResourceIndex stores and retrieves resources with policy-based authorization. toInstance converts objects to typed instances. toResourceId parses URI strings. createResourceIndex factory. Use for persisting structured data, managing entities, and enforcing access control.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/libresource
SKILL.md
libresource Skill
When to Use
- Storing and retrieving typed resources
- Managing entities with access control
- Converting between resource formats
- Building resource-based APIs
Key Concepts
ResourceIndex: Storage-backed index with policy enforcement for resource access.
Resource identifiers: URIs that identify resource type and instance (e.g.,
conversation:abc123).
toInstance: Converts plain objects to properly typed resource instances.
Usage Patterns
Pattern 1: Get resource
import { createResourceIndex } from "@copilot-ld/libresource";
const index = await createResourceIndex(storage, policyIndex);
const resource = await index.get("conversation:abc123", actor);
Pattern 2: Parse resource ID
import { toResourceId } from "@copilot-ld/libresource";
const id = toResourceId("conversation:abc123");
// { type: "conversation", id: "abc123" }
Integration
Used by Memory and Agent services. Works with libpolicy for access control.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?