CtrlK
BlogDocsLog inGet started
Tessl Logo

saas-multi-tenant

Design and implement multi-tenant SaaS architectures with row-level security, tenant-scoped queries, shared-schema isolation, and safe cross-tenant admin patterns in PostgreSQL and TypeScript.

60

Quality

70%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./plugins/AI-Agents-Safe-Coding-Skills/skills/saas-multi-tenant/SKILL.md

The canonical home for this skill is saas-multi-tenant in administrakt0r/AI-Agents-Safe-Coding-Skills

SKILL.md
Quality
Evals
Security

Quality

Content

71%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

This is a strong, highly actionable skill with excellent executable examples covering the key implementation patterns (RLS, middleware, ORM scoping). Its main weakness is verbosity — the edge cases, best practices, and 'never do this' sections, while individually valuable, make the file long enough to warrant splitting into referenced files. The workflow is clear and well-sequenced but could benefit from explicit verification/testing checkpoints after critical steps like RLS setup.

Suggestions

Split 'Edge Cases', 'Best Practices', and 'Never Do This' into separate referenced files (e.g., EDGE_CASES.md, BEST_PRACTICES.md) to reduce the main file's token footprint and improve progressive disclosure.

Add an explicit verification step after RLS setup, such as: 'Test: connect as app user, SET app.current_tenant_id to tenant A, SELECT from table — verify only tenant A rows return. Then SET to tenant B and confirm isolation.'

Trim explanatory rationale that Claude can infer — e.g., 'Sequential IDs let attackers enumerate other tenants' resources by incrementing the ID' can be shortened to 'Sequential IDs enable enumeration attacks across tenants.'

DimensionReasoningScore

Conciseness

The skill contains valuable, non-obvious information but is noticeably verbose in places. Step 1's discussion of tenancy model tradeoffs, some of the 'Never Do This' explanations, and the 'Best Practices' section include rationale that Claude could infer. The edge cases section, while useful, adds significant length. However, most content is domain-specific knowledge Claude wouldn't inherently know (RLS patterns, SET LOCAL gotchas, Prisma middleware specifics).

3 / 5

Actionability

The skill provides fully executable SQL for RLS policies, complete TypeScript middleware for Express with proper error handling and connection cleanup, and a working Prisma middleware with edge case handling (createMany, global tables). All three examples are copy-paste ready and cover the most common implementation patterns. The workflow steps give specific commands and patterns rather than vague directions.

5 / 5

Workflow Clarity

The 8-step core workflow is clearly sequenced and logically ordered (determine model → add columns → set up RLS → build middleware → scope ORM → migrations → admin routes → provisioning). Step 8 includes a transaction-based validation checkpoint. However, there's no explicit verification step after RLS setup (e.g., 'test that an unscoped query returns only tenant data') and no feedback loop for validating the middleware is correctly scoping queries. The 'Never Do This' section partially compensates by highlighting failure modes.

4 / 5

Progressive Disclosure

The content is well-structured with clear sections (Core Workflow, Examples, Never Do This, Edge Cases, Best Practices), but at ~200+ lines it would benefit from splitting edge cases, best practices, or the examples into separate referenced files. There are no bundle files and no references to external documents. The monolithic structure means Claude loads all content even when only the core workflow or a single example is needed.

3 / 5

Total

15

/

20

Passed

Description

70%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is technically specific and covers a well-defined niche with concrete architectural patterns and a clear technology stack. Its main weakness is the absence of an explicit 'Use when...' clause, which would help Claude know exactly when to select this skill. The trigger terms are good but could include common abbreviations like 'RLS' and alternative phrasings users might employ.

Suggestions

Add a 'Use when...' clause such as 'Use when the user asks about multi-tenant architecture, tenant isolation, RLS policies, or building SaaS applications with shared databases.'

Include common abbreviations and synonyms like 'RLS', 'multi-tenancy', 'tenant separation', 'data isolation', and 'SaaS platform' to improve trigger term coverage.

DimensionReasoningScore

Specificity

Lists several specific actions: row-level security, tenant-scoped queries, shared-schema isolation, and cross-tenant admin patterns. These are concrete architectural concerns, though it could be more granular about specific operations (e.g., creating RLS policies, implementing tenant middleware).

4 / 5

Completeness

The 'what' is clearly stated with specific capabilities, but there is no explicit 'when' clause. The description lacks a 'Use when...' trigger phrase, which per the rubric guidelines caps completeness at 3.

3 / 5

Trigger Term Quality

Includes strong natural keywords like 'multi-tenant', 'SaaS', 'row-level security', 'PostgreSQL', 'TypeScript', and 'tenant isolation'. Missing some common synonyms or variations users might say like 'RLS', 'tenant separation', 'data isolation', or 'multi-tenancy'.

4 / 5

Distinctiveness Conflict Risk

Highly distinctive with a clear niche: multi-tenant SaaS architecture specifically in PostgreSQL and TypeScript. The combination of domain (multi-tenancy), specific patterns (RLS, shared-schema), and technology stack makes it very unlikely to conflict with other skills.

5 / 5

Total

16

/

20

Passed

Validation

90%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation10 / 11 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

10

/

11

Passed

Repository
administrakt0r/AI-Agents-Safe-Coding-Skills
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.