postkit

Set up PostgreSQL-native auth, authorization, config, metering, and job queues via SQL functions.

13|Updated Dec 25, 2025
One-click install
npx skills add https://github.com/varunchopra/postkit --skill postkit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postkit
Source: https://github.com/varunchopra/postkit/tree/main
Command: npx skills add https://github.com/varunchopra/postkit --skill postkit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires make.

What problem does it solve?

This Skill solves the challenge of building production-ready authentication, authorization, versioned configuration, usage metering, and background job queues without wiring multiple external services.

Core Features & Use Cases

  • Postgres-native SQL functions: Use directly from any language/driver to implement identity, permissions, config, metering, and job queues.
  • Multi-module coverage: authn for users/sessions/tokens, authz for ReBAC relationship-based permissions, config for versioned key-value settings with rollback, meter for reservations and ledger-based usage tracking, and queue for scheduled/retryable jobs.
  • Fast integration path: Build distribution SQL, install into your database, then call the needed schemas/functions in your app workflow.

Quick Start

Run make build to generate dist SQL files, then install the schema with psql $DATABASE_URL -f postkit/dist/postkit.sql, and finally call the relevant functions (for example authz.check for permission checks) using your database connection.

Frequently Asked Questions about postkit

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

FAQPage Schema
How do I implement authentication and authorization directly in Postgres?

You can implement authentication and authorization directly in Postgres by installing deterministic SQL functions that handle user sessions, tokens, and ReBAC relationship-based permission checks natively within your database.

Can I handle usage metering and job queues in Postgres without external services?

Yes, you can handle usage metering and job queues in Postgres by using native SQL functions for reservation-based quota accounting and retryable background job scheduling without wiring multiple external services.

What is the best way to manage versioned configuration rollbacks in a multi-tenant SaaS database?

The best way to manage versioned configuration rollbacks in a multi-tenant SaaS database is using SQL functions that store key-value settings with rollback capabilities, enabling rapid configuration changes and prompt rollbacks.

How do I set up Postgres-native identity and permissions for a multi-tenant SaaS workflow?

You set up Postgres-native identity and permissions by building dist SQL artifacts with make, installing them into a PostgreSQL 14+ database, and invoking module functions with the correct tenant context during your app workflow.

Do I need external tools to use ReBAC permission checks if I already have a Postgres database?

No, you do not need external tools for ReBAC permission checks if you have a Postgres database, because native SQL functions can evaluate relationship-based permissions directly using your existing database connection and driver.

What are the limitations of using Postgres SQL functions for authentication and metering?

A limitation of using Postgres SQL functions for authentication and metering is the requirement to build dist SQL artifacts and install them into a PostgreSQL 14+ database, which requires a build step and specific database version compatibility.