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.
npx skills add mblode/agent-skills --skill multi-tenant-architecturegit clone --depth 1 https://github.com/mblode/agent-skillsWrote 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.
[](https://agentmods.dev/skills/mblode/agent-skills/multi-tenant-architecture)<a href="https://agentmods.dev/skills/mblode/agent-skills/multi-tenant-architecture"><img src="https://agentmods.dev/badge/skills/mblode/agent-skills/multi-tenant-architecture/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.
<a href="https://agentmods.dev/skills/mblode/agent-skills/multi-tenant-architecture"><img src="https://agentmods.dev/badge/skills/mblode/agent-skills/multi-tenant-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 104 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.03863 |
| Opus 5 | $0.00036 | $0.01931 |
| Sonnet 5 | $0.00014 | $0.00773 |
| Haiku 4.5 | $0.00007 | $0.00386 |
Grade A, and why
multi-tenant-architecture scanned grade A with 1 finding 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 today.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Forwarding inbound tenant headers: `curl -H "x-tenant-id: <other>"` then serves another tenant's data. Delete or overwrite `x-tenant-*` on every path through the proxy, including paths that skip resolution. How it starts
The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Multi-Tenant Platform Architecture (Cloudflare or Vercel)
- IS: platform choice, domain strategy and PSL, tenant identification, compute and data isolation, hostname routing, tenant context propagation, custom domains and SSL, per-tenant static files, and mapping platform limits to plans.
- IS NOT: general folder structure or module contracts (use
codebase-architecture), scaffolding a new repo (usescaffold-nextjs), or the content of per-tenant SEO files once routing serves them dynamically: sitemap entries, canonical URLs, structured data, indexing policy (useseo).
Contents
- Platform dispatch (decide first)
- Reference files
- Workflow (order matters)
- Gotchas
- Output schema
- Pre-commit checklist
- Related skills
Platform dispatch (decide first)
| Signals | Platform | Model |
|---|---|---|
| Tenants upload or generate their own code; code-level isolation; edge compute on KV, D1, Durable Objects, R2 | Cloudflare | Dispatch Worker in front of a dispatch namespace of per-tenant Workers; Cloudflare for SaaS for custom hostnames |
| Every tenant runs the same Next.js codebase and differs by content, branding, and plan; ISR, Server Components, Vercel deploys | Vercel | One deployment; proxy.ts resolves the tenant from the hostname; wildcard plus custom domains on the project |
- Pick one platform per product. Fronting a Vercel app with a Cloudflare proxy doubles the TLS and redirect layers and is the usual cause of redirect loops and failed certificate issuance.
- Tenants shipping their own code on Vercel is the multi-project model (one Vercel project per tenant, created with the SDK). It follows the Cloudflare row's isolation reasoning; this skill's Vercel references cover the single-deployment model only.
Reference files
| File | Read when |
|---|---|
| cloudflare-platform.md | Cloudflare chosen: dispatch namespaces, routing, Cloudflare for SaaS custom hostnames, isolation modes, KV and D1 (steps 3 to 7) |
| vercel-platform.md | Vercel chosen: proxy.ts resolution, App Router layout, Global Config lookups, per-tenant static files, custom subpaths, local dev (steps 4 to 7) |
| vercel-domains.md | Vercel chosen: SDK domain lifecycle, DNS targets, verification, wildcard nameservers, SSL, troubleshooting (step 7) |
| data-isolation.md | Step 3 on either platform: shared schema with RLS, schema-per-tenant, database-per-tenant, and the Postgres/Supabase/Drizzle policy pattern |
| psl.md | Step 1 when tenants publish content or run code on sibling subdomains: eligibility, submission, interim cookie controls |
| limits-and-quotas.md | Step 8: dated snapshot of Cloudflare, Vercel, and Neon limits to map onto plans |
agents/openai.yaml |
Never during a task: launcher metadata for external runners |
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed · -2 tokens per session f24700710bb5
- 4d ago Changed · +14 lines · -58 tokens per session 697d75a21dad
- 9d ago First seen · 183 lines · 132 tokens per session scan A ce97934f03db
multi-tenant-architecture is a skill published in the GitHub repository mblode/agent-skills (106 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 3,863 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
stripe-projects
Provision SaaS services + sync creds via Stripe Projects.
spring-cloud-eureka
Netflix Eureka for service discovery in Spring Cloud microservices. Covers Eureka Server, Eureka Client, registration, and health checks. USE WHEN: user mentions "eureka", "service discovery", "service registry", "@EnableEurekaServer", "@EnableDiscoveryClient", "eureka dashboard" DO NOT USE FOR: Kubernetes service…
spring-cloud-gateway
Spring Cloud Gateway for API routing, filtering, and load balancing. Covers route predicates, filters, rate limiting, and circuit breaker integration. USE WHEN: user mentions "spring cloud gateway", "API gateway", "route predicates", "gateway filters", "rate limiting gateway", "load balancing gateway" DO NOT USE FOR…
spring-cloud-basics
Spring Cloud patterns for microservices in Spring Boot 3.x. Covers Service Discovery, Config Server, API Gateway, Circuit Breaker, Load Balancing, and Distributed Tracing. USE WHEN: user mentions "spring cloud", "microservices architecture", "service discovery", "config server", "cloud native Spring" DO NOT USE FOR…
spring-cloud-config
Spring Cloud Config for centralized configuration management in microservices. Covers Config Server, Config Client, Git backend, and dynamic refresh. USE WHEN: user mentions "spring cloud config", "config server", "centralized configuration", "@RefreshScope", "externalized config" DO NOT USE FOR: simple properties…
hono
Hono ultrafast web framework for edge runtimes. Covers routing, middleware, and multi-runtime support. Use when building edge-first APIs. USE WHEN: user mentions "Hono", "hono", "Cloudflare Workers", "Vercel Edge", "edge runtime", "Bun", asks about "edge-first API", "multi-runtime framework", "ultrafast web…