.claude/skills/audit-org-isolation/SKILL.md
Find Express route handlers that touch multi-tenant Prisma models without going through injectOrgFilter / injectWriteFilter. Use after adding new routes, before committing, and during security review.
npx skillsauth add malhajri07/real-estate-CRM-project audit-org-isolationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Multi-tenant data isolation is the project's #1 security invariant. This skill greps for any handler that bypasses it.
The middleware injectOrgFilter (reads) and injectWriteFilter (writes) live at apps/api/middleware/org-isolation.ts. They append organizationId = req.user.organizationId to Prisma queries automatically. Any handler that talks to a multi-tenant model without these middlewares is a leak risk.
data/schema/prisma/schema.prisma for organizationId.apps/api/routes/ for direct usage:
prisma.<modelName>.find
prisma.<modelName>.update
prisma.<modelName>.delete
prisma.<modelName>.create
authenticateToken + the org-isolation middleware?organizationId: req.user.organizationId in where?File:line Model Operation Risk
WEBSITE_ADMIN routes are allowed to bypass — flag them but mark as [admin]users and organizations tables themselves have special rules — check existing patterns before flaggingtesting
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
tools
Interact with Obsidian vaults using the Obsidian CLI to read, create, search, and manage notes, tasks, properties, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, search vault content, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
data-ai
Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.