smithery.ai

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.

First seen Apr 12, 2026

Installation

$ npx skills add https://smithery.ai

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents github-copilot

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,409 B
  • docs SUMMARY.md 352 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

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.