Multi Tenant Safety Checker
This skill verifies if your multi-tenant application meets security best practices, ensuring data isolation and protecting all users.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add patricio0312rev-multi-tenant-safety-checker npx -- -y @trustedskills/patricio0312rev-multi-tenant-safety-checker
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"patricio0312rev-multi-tenant-safety-checker": {
"command": "npx",
"args": [
"-y",
"@trustedskills/patricio0312rev-multi-tenant-safety-checker"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill, Multi Tenant Safety Checker, helps ensure your multi-tenant application maintains data isolation and prevents data leakage between tenants. It focuses on implementing Row Level Security (RLS) within a PostgreSQL database to enforce tenant-specific access controls. The skill also provides guidance for setting up an Application-Level Tenant Context using middleware to manage the app.tenant_id variable, which is crucial for RLS policies.
When to use it
- When building a multi-tenant application where data isolation between tenants is critical.
- During security audits to verify adherence to tenant safety best practices.
- To implement and test Row Level Security (RLS) in PostgreSQL databases.
- When needing to enforce that all database queries are filtered by tenant ID.
- To ensure file uploads and background jobs operate within the correct tenant context.
Key capabilities
- Row Level Security (RLS) Implementation: Sets up RLS on tables using PostgreSQL policies.
- Application-Level Tenant Context: Provides middleware for managing
app.tenant_idto control data access. - Tenant Isolation Checklist: Offers a comprehensive checklist covering database, application, and testing aspects of multi-tenancy security.
- Automated Security Tests Guidance: Suggests tests to verify RLS bypass prevention and SQL injection vulnerabilities.
Example prompts
- "Show me how to enable Row Level Security on the 'users' table."
- "What is the purpose of the
app.tenant_idvariable?" - "Generate a policy for the 'orders' table using RLS to filter by tenant ID."
Tips & gotchas
- Requires a PostgreSQL database and Prisma client setup.
- The skill relies on setting a local variable (
app.tenant_id) which must be managed consistently throughout your application. - Thorough testing, including cross-tenant query tests and RLS bypass attempts, is essential to ensure security effectiveness.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.