multi-tenant
Provides QA test scenarios to ensure data and communication isolation across tenants in multi-tenant applications.
Install
mkdir -p .claude/skills/multi-tenant && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17395" && unzip -o skill.zip -d .claude/skills/multi-tenant && rm skill.zipInstalls to .claude/skills/multi-tenant
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Multi-tenant detection, isolation testing, and cross-tenant + cross-role validation patterns for QA specialists. Used by the QA Engineer when the application supports multiple tenants.Key capabilities
- →Detect multi-tenancy structures in codebases
- →Verify data isolation between tenants
- →Confirm correct scoping of outbound communications
- →Check branding and theming consistency per tenant
- →Validate subdomain and routing behavior for tenants
- →Test authentication boundaries and session scoping
How it works
The skill detects multi-tenancy by examining schema and routing, then runs a series of required scenarios to validate data isolation, communication scoping, branding, routing, authentication, and cross-role permissions.
Inputs & outputs
When to use multi-tenant
- →Verify data isolation between tenants
- →Test role-based access control across different tenants
- →Validate tenant-scoped notification and email logic
- →Check branding and theming consistency
About this skill
Multi-Tenant Validation
Multi-tenant applications fail in ways single-tenant apps don't: data leaks, role bleed, branding swaps, auth boundary holes. Autonomous Engineer validation in multi-tenant codebases must explicitly cover these.
Detect multi-tenancy
The Intake Analyst identifies multi-tenancy by:
- A
tenantstable or equivalent in the schema tenant_id/org_id/workspace_idcolumns on user-owned tables- Routing by subdomain or path prefix (
acme.example.com,example.com/acme) - A tenant selector in the UI
.ae/resources.yamlincludes atenantssection
If multi-tenancy is detected, the QA Engineer runs the multi-tenant scenarios below in addition to the normal validation plan.
Required scenarios
1. Within-tenant happy path
The primary acceptance journey, run inside the primary tenant with the primary role. This is the baseline.
2. Tenant isolation — data
For any feature that reads or writes user data, confirm:
- A user in tenant A cannot see data from tenant B.
- A user in tenant A cannot reference / modify a record from tenant B by guessing IDs.
Practical test: sign in as admin_acme, note an entity's ID, sign out, sign in as admin_beta, attempt to fetch / modify that ID. Expected: 404 or 403, not 200.
3. Tenant isolation — communications
Outbound emails / notifications scoped correctly:
- Action in tenant A produces a message to a user in tenant A.
- No message lands in a tenant-B inbox / address.
The QA Engineer runs this inline as part of validation.
4. Branding / theming
If the app themes per tenant, confirm:
- Logo, colours, copy match the tenant.
- No tenant-B branding leaks into tenant-A pages.
5. Subdomain / routing
- Direct access to
acme.example.com/<resource>works. - Direct access to
beta.example.com/<resource-from-acme>does not work (404 or redirect).
6. Auth boundary
- Session for tenant A does not authenticate against tenant B's subdomain.
- Cookies are scoped (
Domain,Path,SameSite) per tenant policy.
7. Cross-role within tenant
For each role the feature exposes (admin, manager, user, guest):
- Permitted roles see/do the expected things.
- Forbidden roles get the expected denial (UI-hidden + server-enforced).
UI-hidden alone is not sufficient. The server must enforce.
Required accounts
The QA Engineer pre-selects (Phase 0):
- Primary tenant: primary role + at least one above + one below.
- Secondary tenant: a primary-role account for cross-tenant isolation tests.
If .ae/resources.yaml lacks the required accounts, surface a blocker — do not improvise.
Reporting
The Validator's report includes a dedicated multi-tenant section:
### Multi-tenant validation
- Within-tenant happy path: <pass | fail> — <evidence>
- Tenant isolation (data): <pass | fail> — <evidence>
- Tenant isolation (comms): <pass | fail | n/a> — <evidence>
- Branding / theming: <pass | fail | n/a> — <evidence>
- Subdomain / routing: <pass | fail> — <evidence>
- Auth boundary: <pass | fail> — <evidence>
- Cross-role: <pass | fail> — <evidence per role>
Anti-patterns
- Asserting tenant isolation by only checking that the UI hides data. Always probe the server.
- Skipping cross-tenant tests because "the codebase has a middleware that handles it" — verify the middleware actually fires on the new endpoint.
- Sharing fixtures across tenants. Use distinct tenant-A and tenant-B fixtures.
- Trusting URL path scoping alone without checking subdomain isolation.
- Marking the run pass when one of the seven scenarios is
n/awithout explaining why it'sn/a.
When not to use it
- →When asserting tenant isolation by only checking that the UI hides data
- →When skipping cross-tenant tests because of middleware assumptions
- →When sharing fixtures across tenants
Limitations
- →UI-hidden alone is not sufficient for role-based access control; the server must enforce
- →The skill requires pre-selected primary and secondary tenant accounts for testing
- →The skill does not improvise if `.ae/resources.yaml` lacks required accounts
How it compares
This skill provides a structured, complete validation framework specifically for multi-tenant applications, addressing unique failure modes beyond those of single-tenant applications.
Compared to similar skills
multi-tenant side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| multi-tenant (this skill) | 0 | 1mo | No flags | Intermediate |
| web3-testing | 7 | 2mo | Review | Advanced |
| smart-contract-engineer | 0 | 6mo | Review | Advanced |
| qa | 0 | 4mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
web3-testing
wshobson
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.
smart-contract-engineer
jw3b-dev
Expert in Solidity, Foundry, EVM security. Specializes in gas optimization, upgradeable patterns, and fuzz testing.
qa
involvex
Pre-ship audit checklist for Ethereum dApps built with Scaffold-ETH 2. Give this to a separate reviewer agent (or fresh context) AFTER the build is complete. Covers only the bugs AI agents actually ship — validated by baseline testing against stock LLMs.
pida-code-review
Team-PIDA
Use when reviewing a PIDA branch, diff, or PR. Focus on bugs, regressions, missing tests, API contract drift, persistence risks, and operational issues before style comments.
secure-workflow-guide
trailofbits
Guides through Trail of Bits' 5-step secure development workflow. Runs Slither scans, checks special features (upgradeability/ERC conformance/token integration), generates visual security diagrams, helps document security properties for fuzzing/verification, and reviews manual security areas.
audit-prep-assistant
trailofbits
Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).