smithery/copilot-ld

libpolicy

libpolicy - Policy engine for access control. PolicyIndex stores and evaluates authorization policies. createPolicyIndex factory loads policies from storage. Planned OPA-WASM integration for complex policy evaluation. Use for access control, authorization decisions, and resource permissions.

Installation

$ npx skills add smithery/copilot-ld --skill libpolicy

Also in this package

Other skills from smithery/copilot-ld.

npx skills add smithery/copilot-ld

Browse all from smithery/copilot-ld

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 Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,285 B
  • docs SUMMARY.md 309 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

libpolicy Skill

When to Use

  • Implementing access control for resources
  • Evaluating authorization policies
  • Managing permissions in multi-tenant systems
  • Building role-based access control (RBAC)

Key Concepts

PolicyIndex: Stores policies and evaluates access requests against them.

Policy evaluation: Determines if an actor can perform an action on a resource based on defined policies.

Usage Patterns

Pattern 1: Evaluate access

import { createPolicyIndex } from "@copilot-ld/libpolicy";

const index = await createPolicyIndex(storage);
const allowed = await index.evaluate({
  actor: "user:123",
  resource: "document:456",
  action: "read",
});

Pattern 2: Load policies

const index = await createPolicyIndex(storage);
await index.load("policies/"); // Load from directory

Integration

Used by ResourceIndex for access control. Policies stored in data/policies/.