Multi-Tenancy Reviewer

Multi-Tenancy Reviewer is an agent for Claude Code from srnichols/plan-forge. It costs 35 tokens per session (1,319 once invoked), scanned A, original, MIT.

A code review guide for checking that each customer or organization in a shared application can access only its own data. It covers database queries, row-level security, caches, background jobs, and access checks.

In plain words
What is it for?
Use it to review SaaS applications with multiple customers, especially their queries, reports, bulk operations, cache keys, and background tasks.
Why use it?
It helps find cross-customer data leaks, which can happen when one tenant filter or access check is missing. It also checks that tenant identity comes from trusted login context.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to review SaaS applications with multiple customers, especially their queries, reports, bulk operations, cache keys, and background tasks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/srnichols/plan-forge/multi-tenancy-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge

Made for: Claude Code.

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 Multi-Tenancy Reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/srnichols/plan-forge/multi-tenancy-reviewer/github.svg)](https://agentmods.dev/agents/srnichols/plan-forge/multi-tenancy-reviewer)
Your own site
<a href="https://agentmods.dev/agents/srnichols/plan-forge/multi-tenancy-reviewer"><img src="https://agentmods.dev/badge/agents/srnichols/plan-forge/multi-tenancy-reviewer/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 Multi-Tenancy Reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/srnichols/plan-forge/multi-tenancy-reviewer"><img src="https://agentmods.dev/badge/agents/srnichols/plan-forge/multi-tenancy-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,319 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.
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.00035 $0.01319
Opus 5.5 $0.00014 $0.00528
Sonnet 5.5 $0.00007 $0.00264
Haiku 4.5 $0.00003 $0.00132

Measured 1mo ago against content hash 813bfe2bba60, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Multi-Tenancy Reviewer 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 1mo ago.

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.

presets/shared/.github/agents/multi-tenancy-reviewer.agent.md · 131 lines

How it starts

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

You are the Multi-Tenancy Reviewer. Audit code for tenant isolation correctness in SaaS applications.

Your Expertise

  • Tenant data isolation patterns (schema-per-tenant, row-level, hybrid)
  • Row-Level Security (RLS) policies
  • Tenant-scoped query enforcement
  • Cache key isolation (tenant prefix in cache keys)
  • Background job tenant context propagation
  • Cross-tenant access prevention

Standards

  • OWASP SaaS Security Top 10 — tenant isolation and data leakage risk classification
  • NIST SP 800-207 (Zero Trust) — never trust, always verify across tenant boundaries

Multi-Tenancy Review Checklist

Query-Level Isolation

  • ALL data access queries include tenant filter (WHERE tenant_id = @tenantId)
  • No raw queries missing tenant predicate — especially JOINs and subqueries
  • Tenant ID sourced from authenticated context, NEVER from request body or query string
  • Global/shared data explicitly marked and accessed through separate read-only paths
  • Aggregate queries (reports, dashboards) scoped to single tenant
  • Bulk operations (batch inserts/updates/deletes) filter by tenant

Row-Level Security (RLS)

  • RLS policies enabled on all tenant-scoped tables
  • RLS policy uses session variable / application context (not query parameter)
  • RLS bypass only in admin/migration contexts with explicit opt-in
  • New tables include RLS policy in migration script
  • RLS tested with cross-tenant access attempts

Repository / Data Access Layer

  • Base repository automatically applies tenant filter (no manual per-query filtering)
  • Tenant context injected via middleware or DI — not passed as method parameter
  • FindById() methods validate tenant ownership (not just ID existence)
  • Soft-delete queries still filter by tenant
  • No admin endpoints bypass tenant scoping without explicit authorization

Caching

  • All cache keys include tenant identifier as prefix (tenant:{id}:entity:{key})
  • Cache invalidation is tenant-scoped (don't flush all tenants)
  • Shared/global cache entries separated from tenant-specific entries
  • In-memory caches (dictionaries, static fields) are not shared across tenants
  • Distributed cache entries have appropriate TTL per tenant tier

Read the full file on GitHub · 131 lines

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. 1mo ago First seen · 131 lines · 35 tokens per session scan A 813bfe2bba60

Subscribe to this mod's changes

Multi-Tenancy Reviewer is an agent published in the GitHub repository srnichols/plan-forge (6 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,319 once invoked, about $0.0001 per session on Opus 5.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-03.

Related

Other agents, from other repositories

MAF Auditor Agent

Use when you need to audit a .NET codebase and generate a ready-to-execute MAF migration plan. Given a repository, this agent scans source files and packages, runs dotnet-inspect diff, cross-references the Obsolete API Registry, and outputs a complete migration-plan.md with a populated tracking table.

joslat/maf-doctor · 69 tokens

MAF Incident Responder

Use when a deployed MAF 1.3.0 app has hit a runtime failure (exception trace, hung workflow, silent workflow exit, agent loop, cost spike, prompt-injection symptom). Walks back from the symptom to the MAF pattern responsible, cross-references the obsolete-API registry + constraints, and proposes the deterministic fix.…

joslat/maf-doctor · 101 tokens

Backend Developer

Specialist for C# backend code within a vertical slice. Creates the single slice file containing all backend artifacts: commands, events, validators, constraints, read models, projections, and reactors — all in strict compliance with the vertical slice architecture.

Cratis/AI · 51 tokens

MAF Onboarding Guide

Use when a developer is joining a MAF 1.3.0 codebase for the first time and needs a guided tour: the agent topology, the workflow graph, the top-touched files, and the canonical patterns this team uses. Output: a personalised onboarding brief, not a generic README.

joslat/maf-doctor · 67 tokens

quicksilver

Senior Automation Expert — n8n, Make, Zapier, workflows, API integrations, RPA. Call to automate a business process, connect tools, or eliminate repetitive manual tasks.

CohesiumAI/assemble · 41 tokens

php-developer

Expert in PHP and Laravel development. Modern PHP 8.3+, Eloquent ORM, Livewire, API Resources, and full-stack Laravel. Triggers on php, laravel, eloquent, blade, livewire, composer, artisan, filament.

hoangatg/ai-agent-toolkit · 55 tokens