polizy-storage

Configure polizy storage adapters for InMemory, Prisma, and custom implementations.

7|1|Updated Apr 23, 2025
One-click install
npx skills add https://github.com/bratsos/polizy --skill polizy-storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: polizy-storage
Source: https://github.com/bratsos/polizy/tree/main/skills/polizy-storage
Command: npx skills add https://github.com/bratsos/polizy --skill polizy-storage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Storage adapter setup and tuning for polizy authorization, enabling smooth switching between InMemory, Prisma, and custom adapters across development and production.

Core Features & Use Cases

  • InMemoryStorageAdapter guidance for testing and development
  • PrismaAdapter guidance for production workloads with multi-instance support
  • Custom adapter guidance with a compatible StorageAdapter interface

Quick Start

Set up an InMemoryStorageAdapter for development and switch to PrismaAdapter for production deployments.

Frequently Asked Questions about polizy-storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a polizy storage adapter to persist authorization tuples?

Configure polizy storage adapters by implementing the StorageAdapter interface to persist authorization tuples. Use InMemoryStorageAdapter for local development and testing, then switch to PrismaAdapter for production database workloads.

What is the best storage adapter for polizy authorization in production?

The PrismaAdapter is recommended for polizy authorization in production. It supports multi-instance deployments and scales database workloads, whereas InMemoryStorageAdapter is strictly designed for development and testing scenarios.

Can I build a custom storage adapter for authorization tuples?

Yes, you can build a custom storage adapter by adhering to the StorageAdapter interface. This allows you to design custom persistence logic for authorization tuples while maintaining compatibility with the polizy authorization framework.

How do I switch polizy storage from InMemory to Prisma for deployment?

Switch polizy storage from InMemory to Prisma by replacing the InMemoryStorageAdapter initialization with PrismaAdapter setup. This transition moves authorization tuple persistence from local memory to a production-grade database environment.

Does the Prisma storage adapter support multi-instance workloads?

Yes, the Prisma storage adapter supports multi-instance production workloads. It is specifically guided for scalable deployments, ensuring authorization tuples are consistently persisted across multiple application instances.

What are the performance considerations when designing a custom authorization adapter?

When designing a custom authorization adapter, performance considerations include optimizing tuple persistence and retrieval logic within the StorageAdapter interface. Efficient adapter design ensures minimal latency during authorization checks across development and production environments.