ring:adding-multi-tenancy

ring:adding-multi-tenancy is a skill for Cursor from LerianStudio/ring. It costs 95 tokens per session (1,586 once invoked), scanned A, original, Apache-2.0.

A guided process for adding database-per-tenant isolation to a Go service. A multi-tenant service serves multiple organizations while keeping each organization's data separated, here by routing a tenant ID from a login token to the correct database.

In plain words
What is it for?
Use it when adding tenant isolation across configuration, request middleware, repositories, metrics, and tests in a Go service.
Why use it?
It provides a defined sequence for checking the existing service, implementing tenant routing, and reviewing the result so data is not accidentally shared between tenants.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the ring-dev-team plugin — 35 skills, 24 agents shipped together

Good fit Use it when adding tenant isolation across configuration, request middleware, repositories, metrics, and tests in a Go service.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lerianstudio/ring/adding-multi-tenancy
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.

Any agent
npx skills add LerianStudio/ring --skill adding-multi-tenancy
Clone the repo
git clone --depth 1 https://github.com/LerianStudio/ring

Made for: Cursor.

Or install ring-dev-team, the plugin that ships this one along with the rest of its 35 skills, 24 agents.

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 ring:adding-multi-tenancy

README.md
[![agentmods](https://agentmods.dev/badge/skills/lerianstudio/ring/adding-multi-tenancy/github.svg)](https://agentmods.dev/skills/lerianstudio/ring/adding-multi-tenancy)
Your own site
<a href="https://agentmods.dev/skills/lerianstudio/ring/adding-multi-tenancy"><img src="https://agentmods.dev/badge/skills/lerianstudio/ring/adding-multi-tenancy/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 ring:adding-multi-tenancy

Your own site · 80×15
<a href="https://agentmods.dev/skills/lerianstudio/ring/adding-multi-tenancy"><img src="https://agentmods.dev/badge/skills/lerianstudio/ring/adding-multi-tenancy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,586 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00095 $0.01586
Opus 5.5 $0.00038 $0.00634
Sonnet 5.5 $0.00019 $0.00317
Haiku 4.5 $0.00010 $0.00159

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

Security

Grade A, and why

ring:adding-multi-tenancy 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.

dev-team/skills/adding-multi-tenancy/SKILL.md · 119 lines

How it starts

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

Multi-Tenant Development Cycle

When to use

  • User requests multi-tenant implementation for a Go service
  • User asks to add tenant isolation to an existing service
  • Task mentions "multi-tenant", "tenant isolation", "dispatch layer", "postgres.Manager", "WithPG", "WithMB", "EventListener", "TenantCache", "TenantLoader"

Skip when

  • Service is not a Go project
  • Task does not involve multi-tenancy or tenant isolation
  • Service is a shared infrastructure component operating outside tenant context
  • Task is documentation-only or non-code

You orchestrate. Agents implement. NEVER use Edit/Write/Bash on Go source files. All code changes go through Task(subagent_type="ring:backend-go"). TDD mandatory for all implementation gates (RED → GREEN → REFACTOR).

Multi-Tenant Architecture

Isolation: tenantId from JWT → dispatch layer middleware → database-per-tenant. organization_id is NOT multi-tenant. tenantId from JWT is the ONLY mechanism.

Standards reference: https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/multi-tenant.md

Sub-package import reference:

Alias Import Path Purpose
client github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/client Tenant Manager HTTP client
tmcore github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/core Context helpers, resolvers
tmmiddleware github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/middleware TenantMiddleware (WithPG/WithMB)
tmpostgres github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/postgres PostgresManager
tmmongo github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/mongo MongoManager
tmrabbitmq github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/rabbitmq RabbitMQ Manager
valkey github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/valkey Redis key prefixing
s3 github.com/LerianStudio/lib-commons/v5/commons/dispatch layer/s3 S3 key prefixing
secretsmanager github.com/LerianStudio/lib-commons/v5/commons/secretsmanager M2M credentials

Read the full file on GitHub · 119 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 · 119 lines · 95 tokens per session scan A ea76831e7ac3

Subscribe to this mod's changes

ring:adding-multi-tenancy is a skill published in the GitHub repository LerianStudio/ring (218 stars, last pushed 2d ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,586 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

mutation-test

Mutation testing with two engines. Uses the project's NATIVE mutation runner (StrykerJS / Infection / mutmut / PIT / cargo-mutants) when one is configured — installing it on explicit consent when it is not — for a reproducible, comparable score; and an LLM-guided engine for the mutation classes native mutators cannot…

greglas75/zuvo · 210 tokens

write-tests

Write tests for existing production code. Processes ONE file at a time through a full pipeline: analyze, inventory (frozen BEFORE writing), write, executable coverage gate, verify, blind coverage audit, adversarial review, log. Uses CodeSift for discovery and analysis when available. Modes: [path] (specific target)…

greglas75/zuvo · 87 tokens

code-audit

Batch audit of production files against CQ1-CQ40 quality gates and CAP1-CAP29 anti-patterns. Tiered output (A/B/C/D), critical gate enforcement, evidence-backed scoring, cross-file pattern analysis, and prioritized execution plan. Flags: zuvo:code-audit all | [path] | [file] | --deep | --quick | --services |…

greglas75/zuvo · 83 tokens

plan

Analyzes architecture, selects patterns, assesses testability, then decomposes work into ordered TDD tasks with exact verification commands and explicit acceptance mapping. Works from an approved spec (zuvo:brainstorm output) or directly from a user-provided description.

greglas75/zuvo · 53 tokens

pentest

Hybrid white-box + black-box penetration testing across 7 dimensions (PT1-PT7). Stack-aware source-to-sink tracing, exploit verification, CMS overlay, and deterministic finding aggregation. Uses explicit candidate schemas, canonical-key deduplication, score caps, and MUST-GATE enforcement. Flags: zuvo:pentest [path] |…

greglas75/zuvo · 124 tokens

a11y-audit

Dedicated WCAG 2.2 AA/AAA accessibility audit across 10 dimensions (A1-A10) covering semantic HTML, keyboard navigation, ARIA patterns, color contrast, forms, images/media, responsive/zoom, motion/animation, reading/content, and legal compliance. Goes far beyond surface-level design-review checks with deep…

greglas75/zuvo · 147 tokens