Skip to content
Agentmart
Submit a tool

saas

SaaS state-of-the-art — multi-tenancy, usage-based billing, PLG, AI feature integration, modern observability, compliance, and security for production…

Skill by Satcomx00-x00

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/satcomx00-x00-saas

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

SaaS state-of-the-art — multi-tenancy, usage-based billing, PLG, AI feature integration, modern observability, compliance, and security for production Software-as-a-Service products.

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/saas

What's inside

Skill name
saas
Description
SaaS state-of-the-art — multi-tenancy, usage-based billing, PLG, AI feature integration, modern observability, compliance, and security for production Software-as-a-Service products.
License
MIT
Metadata
author: Satcomx00-x00 · version: 2.0.0
Instructions
248 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# saas

SaaS state-of-the-art — multi-tenancy, usage-based billing, PLG, AI feature integration, modern observability, compliance, and security for production Software-as-a-Service products.

## Instructions

### Multi-Tenancy

Choose the right isolation model for your use case:

| Model | Description | When to use |
|-------|-------------|-------------|
| **Shared schema** | All tenants share tables; rows tagged with `tenant_id` | Early stage, cost-sensitive, straightforward compliance |
| **Schema-per-tenant** | Separate DB schema per tenant | Medium isolation, easy per-tenant migrations |
| **DB-per-tenant** | Separate database per tenant | Enterprise, strict data residency, high compliance (SOC 2, HIPAA) |
| **Hybrid** | Core data shared; sensitive data siloed | Regulated industries with mixed-tier offerings |

**Rules for shared-schema tenancy:**
- Every query **must** filter by `tenant_id` — enforce via a base repository or ORM middleware, not developer discipline
- Use PostgreSQL **Row-Level Security (RLS)** as a second layer of defence:
  ```sql
  ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
  CREATE POLICY tenant_isolation ON orders
    USING (tenant_id = current_setting('app.current_tenant')::uuid);
  ```
- Index `tenant_id` on every tenant-scoped table
- Write integration tests that assert cross-tenant data isolation
- Scope all object storage paths: `s3://bucket/{tenantId}/uploads/{fileId}`
- Never expose predictable sequential IDs — use UUIDs (v7 for sortability)

### Subscription & Billing

#### Flat-rate subscriptions
- Delegate billing to a provider (Stripe, Paddle, LemonSqueezy) — never implement payment processing in-house
- Store only `customerId` and `subscriptionId` in your DB; never card data
- Sync state via webhooks — treat your DB as an eventually-consistent read replica of the billing provider's truth:
  ```
  customer.subscription.created  → activate plan
  customer.subscription.updated  → upgrade / downgrade / seat change
  customer.subscription.deleted  → cancel + start grace period
  invoice.payment_failed         → dunning: notify → restrict → cancel
  ```
- Use the webhook event `id` as an idempotency key — store it before processing; skip if already seen
- Store raw webhook payloads for audit and replay

#### Usage-based / metered billing (modern default)
- Track usage events as they happen (API calls, seats, tokens consumed, storage GB):
  ```ts
  await stripe.subscriptionItems.createUsageRecord(subscriptionItemId, {
    quantity: tokensUsed,
    timestamp: Math.floor(Date.now() / 1000),
    action: 'increment',
  });
  ```
- Expose a live usage dashboard to customers — surprises on invoice day cause churn
- Implement soft limits (warn at 80%) and hard limits (block at 100%) per billing period
- Consider a free tier + usage-based upsell as a Product-Led Growth (PLG) on-ramp

### Product-Led Growth (PLG)

- **Free tier / freemium** — let users experience value before asking for payment; set limits that make paid plans obviously worthwhile
- **Time-to-value (TTV)** — measure and minimise the time from signup to first meaningful action ("aha moment")
- **In-app upgrade prompts** — surface upgrade CTAs contextually at the moment a plan limit is hit, not in a generic settings page
- **Product-qualified leads (PQL)** — score users by product usage signals (not just demo requests) to route to sales
- **Viral / collaborative features** — invite teammates, share reports, public pages — each action is a distribution channel

### AI Feature Integration

Modern SaaS products are expected to ship AI-native capabilities. Apply these patterns:

**AI assistants and copilots:**
- Use streaming responses (SSE / `ReadableStream`) so users see tokens as they arrive — never make them wait for a full response
- Always make AI output editable — users need to correct, refine, and own the output
- Show confidence signals and cite sources (RAG) to build trust

**Retrieval-Augmented Generation (RAG):**
- Store per-tenant vector embeddings in an isolated namespace (Pinecone, pgvector, Qdrant) — never mix tenant data
- Embed content on write; query on read with cosine similarity
- Chunk documents intelligently (512–1024 tokens with overlap); re-embed when source content changes

**Usage and cost controls:**
- Track LLM token consumption per tenant — bill or rate-limit accordingly
- Cache deterministic prompts (same input → same output) to cut costs
- Use cheaper models for classification/triage; reserve frontier models for generation tasks

**Data privacy:**
- Offer a data-processing addendum (DPA) that explicitly states whether tenant data is used for model training
- Provide an opt-out; enterprise customers will require it

### Feature Flags & Plan Gating

- Gate features at the **service layer** — client-side hiding is UI polish, not security
- Centralise entitlement logic in a single `can(tenant, feature)` helper:
  ```ts
  function can(tenant: Tenant, feature: Feature): boolean {
    return tenant.plan.features.includes(feature);
  }
  ```
- Decouple feature **deployment** from feature **release** using a flag system (LaunchDarkly, Unleash, GrowthBook, or a simple DB-backed table)
- Use flags for: gradual rollouts (% of tenants), beta programs, A/B tests, kill switches

### Onboarding

- **Minimise TTV**: guide users to their first meaningful action in < 5 minutes
- Use a checklist-driven onboarding flow with clear progress indicators
- Pre-populate sample / demo data so the product doesn't feel empty on first use
- Collect the absolute minimum data upfront; defer everything else
- Trigger onboarding emails based on **product events** (not just time): welcome on signup, nudge if they haven't completed step 2 after 24h, celebrate first milestone
- Offer an interactive product tour (not a video) so users learn by doing

### Observability & Operations

**Structured logging** — every log line must include:
```json
{ "level": "info", "msg": "...", "tenantId": "...", "userId": "...", "requestId": "...", "timestamp": "..." }
```

**Distributed tracing with OpenTelemetry:**
- Instrument at the framework level (Next.js `instrumentation.ts`, Express middleware)

From Satcomx00-x00/skills-db, MIT.

More from Satcomx00-x00/skills-db

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Apr 13, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
2.0.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Satcomx00-x00

Cite this page

saas skill. Agent Mart. https://agentmart.dev/skills/satcomx00-x00-saas (last updated 2026-10-24)