# Copilot Ld Copilot Ld Libresource

> libresource Skill

- Skill: `tomevault-io/copilot-ld-copilot-ld-libresource` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/copilot-ld-copilot-ld-libresource`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/copilot-ld-copilot-ld-libresource/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/copilot-ld-copilot-ld-libresource

---


# 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

```javascript
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

```javascript
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.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/copilot-ld) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

