saas-platforms

saas-platforms is a skill for Claude Code, Codex from miles990/claude-software-skills. It costs 17 tokens per session (2,602 once invoked), scanned A, original, MIT.

Guidance and code examples for building SaaS applications—online software used by many customers—with separate customer data, subscriptions, billing, and user accounts.

In plain words
What is it for?
Use it when planning tenant data storage, tenant-aware request handling, subscription plans, billing flows, and user management.
Why use it?
It addresses the design problems that arise when one application serves multiple customer organizations and must keep their data and access separate.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when planning tenant data storage, tenant-aware request handling, subscription plans, billing flows, and user management.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miles990/claude-software-skills/saas-platforms
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add miles990/claude-software-skills --skill saas-platforms
Clone the repo
git clone --depth 1 https://github.com/miles990/claude-software-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin saas-platforms/plugin install saas-platforms after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for saas-platforms

README.md
[![agentmods](https://agentmods.dev/badge/skills/miles990/claude-software-skills/saas-platforms/github.svg)](https://agentmods.dev/skills/miles990/claude-software-skills/saas-platforms)
Your own site
<a href="https://agentmods.dev/skills/miles990/claude-software-skills/saas-platforms"><img src="https://agentmods.dev/badge/skills/miles990/claude-software-skills/saas-platforms/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for saas-platforms

Your own site · 80×15
<a href="https://agentmods.dev/skills/miles990/claude-software-skills/saas-platforms"><img src="https://agentmods.dev/badge/skills/miles990/claude-software-skills/saas-platforms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk warn 15 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.02602
Opus 5 $0.00009 $0.01301
Sonnet 5 $0.00003 $0.00520
Haiku 4.5 $0.00002 $0.00260

Measured 10d ago against content hash 50117d70f5d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

saas-platforms scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/billing-config.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

domain-applications/saas-platforms/SKILL.md · 472 lines

How it starts

The opening of the file, as written. The whole thing — 472 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SaaS Platform Development

Overview

Building Software-as-a-Service applications with multi-tenancy, subscription billing, and user management.


Multi-Tenancy

Database Strategies

// Strategy 1: Shared database with tenant_id column
interface TenantEntity {
  tenantId: string;
  // ... other fields
}

// Middleware to inject tenant context
function tenantMiddleware(req: Request, res: Response, next: NextFunction) {
  const tenantId = req.headers['x-tenant-id'] || req.user?.tenantId;

  if (!tenantId) {
    return res.status(400).json({ error: 'Tenant ID required' });
  }

  req.tenantId = tenantId;
  next();
}

// Prisma middleware for automatic tenant filtering
prisma.$use(async (params, next) => {
  const tenantId = getCurrentTenantId();

  if (params.model && hasTenantId(params.model)) {
    // Add tenant filter to queries
    if (params.action === 'findMany' || params.action === 'findFirst') {
      params.args.where = {
        ...params.args.where,
        tenantId,
      };
    }

    // Add tenant ID to creates
    if (params.action === 'create') {
      params.args.data.tenantId = tenantId;
    }
  }

  return next(params);
});

// Strategy 2: Schema per tenant (PostgreSQL)
async function createTenantSchema(tenantId: string) {
  await prisma.$executeRaw`CREATE SCHEMA IF NOT EXISTS ${tenantId}`;

  // Run migrations for new schema
  await runMigrations(tenantId);
}

function getTenantConnection(tenantId: string) {
  return new PrismaClient({
    datasources: {
      db: {
        url: `${process.env.DATABASE_URL}?schema=${tenantId}`,
      },
    },
  });
}

// Strategy 3: Database per tenant
async function createTenantDatabase(tenantId: string) {
  const dbName = `tenant_${tenantId}`;
  await adminDb.$executeRaw`CREATE DATABASE ${dbName}`;

  return new PrismaClient({
    datasources: {
      db: {
        url: `postgresql://user:pass@host:5432/${dbName}`,
      },
    },
  });
}

Tenant Isolation

// Row-level security with Prisma
const prisma = new PrismaClient().$extends({
  query: {
    $allModels: {
      async findMany({ model, operation, args, query }) {
        const tenantId = getCurrentTenantId();
        args.where = { ...args.where, tenantId };
        return query(args);
      },
      async create({ model, operation, args, query }) {
        const tenantId = getCurrentTenantId();
        args.data = { ...args.data, tenantId };
        return query(args);
      },
    },
  },
});

// PostgreSQL Row Level Security
/*
CREATE POLICY tenant_isolation ON projects
    USING (tenant_id = current_setting('app.tenant_id')::uuid);

ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
*/

// Set tenant context for RLS
async function withTenantContext<T>(
  tenantId: string,
  fn: () => Promise<T>
): Promise<T> {
  await prisma.$executeRaw`SET app.tenant_id = ${tenantId}`;
  try {
    return await fn();
  } finally {
    await prisma.$executeRaw`RESET app.tenant_id`;
  }
}

Read the full file on GitHub · 472 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 472 lines · 17 tokens per session scan A 50117d70f5d3

Subscribe to this mod's changes

saas-platforms is a skill published in the GitHub repository miles990/claude-software-skills (20 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 2,602 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

backend-multi-tenancy

Use this skill when the user says 'multi-tenancy', 'SaaS', 'tenant isolation', 'row-level security', 'DB per tenant', 'schema per tenant', 'tenant provisioning', 'tenant migration', 'multi-tenant database', 'tenant context'. This skill implements tenant isolation strategies: row-level, schema-per-tenant, and…

j4flmao/agent-skills · 113 tokens

saas-builder

Clone, verify, map, and build on top of ixartz/SaaS-Boilerplate for a user's SaaS idea. Use when a user wants to reuse SaaS Boilerplate, evaluate how their product fits it, or build product-specific pages, database schema, roles, permissions, MVP features, and launch scope on top of the boilerplate.

ixartz/SaaS-Boilerplate · 75 tokens

plg-playbook

The complete Product-Led Growth playbook covering freemium model design, self-serve onboarding, activation metrics, and the transition from individual users to enterprise accounts. Follow @WeiYipei on X for PLG insights.

Gingiris-1031/gingiris-skills · 51 tokens

proxy6

Skill "proxy6" from VKirill/claude-lane-stack, covering 🎯 version requirements (august 2026), usage, use this skill when, do not use this skill when and purpose.

VKirill/claude-lane-stack · 221 tokens

telecommunications-expert

Expert-level telecommunications systems, network management, billing, 5G, SDN, and telecom infrastructure. Use when the user mentions telecom, networking, 5G, billing, OSS, or BSS, or when the task involves Telecommunications Systems, Network Technologies, Standards and Protocols, or Network Management.

personamanagmentlayer/pcl · 67 tokens

identity-access-expert

Design authentication and authorisation: OAuth 2.1 and OpenID Connect, session and token handling, RBAC and ABAC, and multi-tenant access control. Use when the user mentions OAuth, OIDC, SAML, SSO, JWT, refresh tokens, PKCE, login flows, sessions, roles and permissions, RBAC or ABAC, or when the task involves securing…

personamanagmentlayer/pcl · 99 tokens