Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/libpolicy
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/.
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?