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.
npx agentmods add skills/thewaywithin/agent-11/saas-multitenancynpx skills add TheWayWithin/agent-11 --skill saas-multitenancygit clone --depth 1 https://github.com/TheWayWithin/agent-11Wrote 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.
[](https://agentmods.dev/skills/thewaywithin/agent-11/saas-multitenancy)<a href="https://agentmods.dev/skills/thewaywithin/agent-11/saas-multitenancy"><img src="https://agentmods.dev/badge/skills/thewaywithin/agent-11/saas-multitenancy.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00006 | $0.02000 |
| Opus 5 | $0.00003 | $0.01000 |
| Sonnet 5 | $0.00001 | $0.00400 |
| Haiku 4.5 | $0.00001 | $0.00200 |
Grade A, and why
saas-multitenancy 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SaaS Multi-Tenancy
Capability
Implement robust multi-tenant architecture for SaaS applications with proper data isolation, tenant context management, and scalable patterns. Covers shared database with row-level security, tenant-scoped queries, and organization/team hierarchies.
Use Cases
- Data isolation between tenants (organizations/workspaces)
- Team/organization hierarchy with roles
- Tenant-scoped API endpoints
- Subdomain or path-based tenant routing
- Tenant provisioning and onboarding
- Cross-tenant admin operations
Patterns
Row-Level Security (RLS) Pattern
When to use: Shared database with multiple tenants needing data isolation
Implementation: Use database-level RLS policies to enforce tenant isolation. Every query automatically filters by tenant.
-- Enable RLS on tenant tables
ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
-- Create tenant isolation policy
CREATE POLICY tenant_isolation ON projects
USING (tenant_id = current_setting('app.current_tenant_id')::uuid);
-- Create policy for insert
CREATE POLICY tenant_insert ON projects
FOR INSERT
WITH CHECK (tenant_id = current_setting('app.current_tenant_id')::uuid);
-- Create policy for update/delete
CREATE POLICY tenant_modify ON projects
FOR ALL
USING (tenant_id = current_setting('app.current_tenant_id')::uuid);
// Middleware to set tenant context
async function setTenantContext(tenantId: string) {
// Set session variable for RLS
await db.execute(
sql`SELECT set_config('app.current_tenant_id', ${tenantId}, true)`
);
}
// Usage in API route
async function handleRequest(req: Request) {
const tenantId = await getTenantFromSession(req);
await setTenantContext(tenantId);
// All subsequent queries automatically filtered
const projects = await db.query.projects.findMany();
return projects; // Only returns tenant's projects
}
Tenant Context Middleware
When to use: Every request needs tenant context for data access
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.
- today First seen · 312 lines · 6 tokens per session scan A 265104d05518
saas-multitenancy is a skill published in the GitHub repository TheWayWithin/agent-11 (15 stars, last pushed 13d ago), licensed MIT. It adds 6 tokens to every session and 2,000 once invoked, about $0.0000 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-09-04.
Other skills, from other repositories
using-weaviate
Weaviate vector database for semantic search, hybrid queries, and AI-native applications. Use for embeddings storage, similarity search, RAG pipelines, and multi-modal retrieval.
managing-supabase
Supabase CLI for database management, Edge Functions, migrations, and local development. Use for managing Postgres databases, deploying serverless functions, and debugging Supabase projects.
using-prisma
Prisma 5+ ORM with schema-first design, type-safe client, migrations, and database integrations (Supabase, PlanetScale, Neon). Use for TypeScript/JavaScript database access.
smoke-test-database
Quick Reference - Load this first for fast context (3KB).
query
Query the Semantica knowledge graph using SPARQL, Cypher, keyword search, and structured graph query patterns.
ontology
Manage ontology schemas, concepts, relationships, and alignments for Semantica knowledge graphs.