rune-ext-saas

Implements multi-tenancy, billing, subscriptions, feature flags, RBAC, and onboarding patterns for SaaS applications.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-saas-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-ext-saas
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-ext-saas
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-ext-saas-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? SaaS teams repeatedly rebuild the same hard infrastructure: tenant isolation that leaks data, billing webhooks that silently fail, subscription state that drifts from the payment provider, feature flags with no cleanup discipline, permission systems that allow privilege escalation, and onboarding flows that lose users before activation. This Skill audits existing codebases for these pitfalls and emits production-tested implementations for each domain. ## Core Features & Use Cases - Multi-tenancy & Tenant Isolation: Detects the current isolation strategy (shared column, PostgreSQL RLS, schema-per-tenant, DB-per-tenant), audits query paths for cross-tenant leaks, and emits tenant middleware, scoped repositories, RLS policies, tenant-aware background jobs, and GDPR data export endpoints. - Billing & Subscription Management: Implements verified, idempotent webhook handlers for Stripe, LemonSqueezy, Polar, and Paddle, plus dunning flows, usage-based metering, proration previews, coupon codes, and one-time checkout with digital product delivery (repo invites, license keys, signed download links). - Feature Flags, Team RBAC & Onboarding: Builds gradual rollout and kill-switch flag systems with stale-flag detection, org/team RBAC with invite flows and audit trails, and onboarding wizards with progress persistence and activation metrics. - Use Case: A solo founder in Vietnam launching a developer tool uses this Skill to set up Polar hosted checkout with Standard Webhooks verification, deliver GitHub repo access on payment, and enforce plan-based feature gating in API middleware. ## Quick Start Ask the agent to audit my SaaS codebase for tenant isolation gaps and billing webhook reliability, then implement the missing patterns.

Frequently Asked Questions about rune-ext-saas

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

FAQPage Schema
How do I implement multi-tenant data isolation in PostgreSQL?

Enable Row Level Security on every shared table and set a tenant session variable from application middleware before each query. The policy compares tenant_id against current_setting('app.tenant_id'), giving database-enforced isolation that application bugs cannot bypass.

How do I verify Stripe, LemonSqueezy, and Polar webhooks?

Stripe uses constructEvent with the endpoint secret, LemonSqueezy uses HMAC-SHA256 compared against the x-signature header, and Polar follows the Standard Webhooks spec signing '{webhook-id}.{timestamp}.{body}' with HMAC-SHA256. Always store processed event IDs for idempotency and reject timestamps older than 5 minutes.

Stripe vs LemonSqueezy vs Polar for SaaS billing?

Stripe offers the fullest feature set but requires a US/EU entity. LemonSqueezy and Polar act as Merchant of Record, handling VAT and payouts globally, which suits solo founders in Vietnam or Southeast Asia. Polar is optimized for developer tools and one-time digital product sales.

Why do billing webhooks cause duplicate charges or state corruption?

Providers retry webhook delivery, so the same event can arrive multiple times. Without an idempotency check that stores processed event IDs and skips duplicates, handlers can apply the same state transition twice. Always record the event ID before processing.

How do I prevent privilege escalation in team RBAC?

Enforce server-side that users can only assign roles at or below their own level, and block any role change that would leave an organization with zero Owners. Check permissions in API middleware rather than only in UI components, and log all permission changes to an audit trail.

When should feature flags be cleaned up?

Flags at 100% rollout for more than 30 days are stale and should be removed from both code and the provider in the same PR. Run a weekly CI job that greps flag keys in code and compares them against the provider's flag list to detect mismatches in both directions.