Agent skill

Orchardcore Tenants

by OrchardCMS in OrchardCMS/OrchardCore

Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation.

BSD-3-ClauseAuto-check passedBackend & APIs

Install Orchardcore Tenants

skills CLI
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-tenants -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OrchardCMS/OrchardCore orchardcore-tenants --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/orchardcore-tenants .claude/skills/orchardcore-tenants && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
orchardcore-tenants
GitHub stars
8.2k
Token cost
~1.6k tokens
SKILL.md length
497 words
Files
2 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation.

  • The user needs to create
  • SKILL.md covers Core concepts, Decide what you're doing, Workflow A: create a tenant… and Workflow B: run code in a…, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Run code inside a tenant

What it does

Orchardcore Tenants is an agent skill from OrchardCMS/OrchardCore. Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation. Use when the user needs to create or manage tenants, run code inside a tenant, pre-configure tenants, or understand shell lifecycle.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/shells.md`).

It sits in Backend & APIs, covering Multi-tenancy. The repository describes itself as: Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework. The licence is BSD-3-Clause.

When your agent uses it

  • The user needs to create
  • Run code inside a tenant
  • Pre-configure tenants
  • Understand shell lifecycle

Example prompts

  • “Use the orchardcore-tenants skill to work with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically…”
  • “/orchardcore-tenants”

What it can do on your machine

Read from SKILL.md and the folder at commit bfbe92f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Orchardcore Tenants loads about 1.6k tokens when it runs, and up to ~2.8k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 497 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OrchardCMS/OrchardCore at commit bfbe92f, republished under its BSD-3-Clause licence (© OrchardCMS). 497 words, ~1,598 tokens.

Download SKILL.mdSave it as .claude/skills/orchardcore-tenants/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
orchardcore-tenants
description
Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation. Use when the user needs to create or manage tenants, run code inside a tenant, pre-configure tenants, or understand shell lifecycle.

OrchardCore Tenants (Multi-tenancy)

This skill guides you through OrchardCore multi-tenancy following project conventions.

OrchardCore runs many isolated sites ("tenants") in one process. Each tenant = a shell: its own DI container, configuration, enabled features, and (optionally) its own database or table prefix. The Default tenant is special — it's created first and manages the others.

Core concepts

TypeRole
ShellSettingsa tenant's identity + config (Name, State, RequestUrlHost, RequestUrlPrefix, DB info)
ShellContexta running tenant: its ServiceProvider, blueprint, request pipeline
ShellScopea unit-of-work scope inside a tenant (resolve services here)
IShellHostmanages all shells: create, reload, list, get scopes
IShellSettingsManagerpersists ShellSettings
Tenant states

Uninitialized → (setup) → Running. Also Initializing, Disabled, Invalid. A tenant configured but not yet set up is Uninitialized and appears in the Tenants list awaiting setup.

Decide what you're doing

GoalApproach
Create a tenant in codeIShellSettingsManager.CreateDefaultSettings() + IShellHost.UpdateShellSettingsAsync
Run code inside a tenantIShellHost.GetScopeAsync(name) + scope.UsingAsync(...)
Pre-declare tenants without UIappsettings/configuration tenant section
Restrict a tenant's featuresFeature Profiles
Isolate tenant dataseparate connection string, or shared DB + table prefix/schema

Workflow A: create a tenant programmatically

csharp
using var shellSettings = _shellSettingsManager
    .CreateDefaultSettings()
    .AsUninitialized()
    .AsDisposable();

shellSettings.Name = "acme";
shellSettings.RequestUrlPrefix = "acme";        // site at /acme
shellSettings.RequestUrlHost = "";              // or a host header

shellSettings["ConnectionString"] = connectionString;
shellSettings["DatabaseProvider"] = "Sqlite";
shellSettings["TablePrefix"] = "acme";
shellSettings["RecipeName"] = "Blog";           // recipe run at setup
shellSettings["Secret"] = Guid.NewGuid().ToString();

await _shellHost.UpdateShellSettingsAsync(shellSettings);

UpdateShellSettingsAsync stamps a new VersionId, saves, and reloads the shell. The tenant is now Uninitialized — it still needs setup (admin user, run recipe), done via the Setup UI/API or ISetupService.

Or via the Tenants API: POST /api/tenants/create then POST /api/tenants/setup.

Workflow B: run code in a tenant scope

To resolve tenant-scoped services (content manager, session, etc.) for a specific tenant:

csharp
var shellScope = await _shellHost.GetScopeAsync("acme");
await shellScope.UsingAsync(async scope =>
{
    var contentManager = scope.ServiceProvider.GetRequiredService<IContentManager>();
    // ... work inside the "acme" tenant ...
});

Inside the callback, ShellScope.Services / ShellScope.Current resolve to this tenant. Deferred tasks run on scope disposal. Never resolve tenant services off the root provider — you'll get the wrong (or no) tenant.

Workflow C: pre-configure tenants via configuration

In appsettings.json (or any config source), declare a tenant so it exists before any UI interaction:

json
{
  "OrchardCore": {
    "acme": {
      "State": "Uninitialized",
      "RequestUrlPrefix": "acme",
      "ConnectionString": "...",
      "DatabaseProvider": "SqlConnection"
    }
  }
}

Per-tenant module config goes under the tenant name too:

json
{ "OrchardCore": { "Default": { "Media": { /* ... */ } } } }

Quick Reference

Show full SKILL.md (198 more words)Show less
IShellHost
MemberPurpose
GetOrCreateShellContextAsync(settings)get/build a tenant's context
GetScopeAsync(settings|name)a scope to run code in
UpdateShellSettingsAsync(settings)save + reload a tenant
ReloadShellContextAsync(settings)rebuild after config change
ListShellContexts() / TryGetSettings(name, out)enumerate / look up
ShellSettings state extensions

AsUninitialized(), AsRunning(), AsDisabled(), plus IsRunning(), IsUninitialized(), etc.

Settings keys (bag)

ConnectionString, DatabaseProvider, TablePrefix, Schema, RecipeName, FeatureProfile, Secret, Category, Description.

Data isolation options
StrategyHow
Separate databasedistinct ConnectionString per tenant
Shared DB, table prefixsame DB + unique TablePrefix
Shared DB, schemaSchema per tenant (SQL Server)

OrchardCore:Tenants config can enforce: RequireTablePrefix, TablePrefixPattern, SchemaPattern (templated with ShellSettings).

Feature Profiles

Feature OrchardCore.Tenants.FeatureProfiles. Profiles are include/exclude rules limiting which features a tenant may enable:

json
{
  "name": "FeatureProfiles",
  "FeatureProfiles": {
    "minimal": { "FeatureRules": [ { "Rule": "Exclude", "Expression": "OrchardCore.MiniProfiler" } ] }
  }
}

Assign via shellSettings["FeatureProfile"].

Gotchas

  • Creating settings ≠ a usable site. A new tenant is Uninitialized; it must be set up (recipe + admin user) before it runs.
  • Always using/dispose the ShellSettings from CreateDefaultSettings() (.AsDisposable()).
  • Only the Default tenant (ShellSettings.DefaultShellName) can manage other tenants.
  • Resolve services through a ShellScope, not the application root provider — tenant DI is a child container per shell.
  • Each tenant runs each module's Startup.ConfigureServices independently; services are per-tenant singletons, not app-wide.

References

  • references/shells.md — shell lifecycle, scope mechanics, container factory, config sources
  • src/docs/reference/modules/Tenants/README.md (repo)
  • src/docs/reference/modules/Configuration/README.md (repo)
  • src/docs/reference/modules/Shells/README.md (repo)
  • AGENTS.md (repo root) — build commands

© OrchardCMS, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/orchardcore-tenants of OrchardCMS/OrchardCore.

  • SKILL.md
  • references/shells.md

Open the folder on GitHubat commit bfbe92f

Compare with similar skills

Orchardcore Tenants next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Orchardcore Tenants compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Orchardcore Tenants this skillOrchardCMS/OrchardCore8.2k—~1.6kAutomated safety check: PassBSD-3-Clause
PR Review Provideryansongda/pay5.4k—~2.4kAutomated safety check: PassMIT
Abp Authorizationabpframework/abp14k—~1.3kAutomated safety check: PassLGPL-3.0
Django Access Reviewgetsentry/skills1k3 repos~2.6kAutomated safety check: NotesApache-2.0
Backend Dev Guidelineslitefuse/litefuse1011 repos~5.8kAutomated safety check: PassCustom licence
Ecto Persistence Patternsgeorgeguimaraes/elixir-agent-tools184—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • PR Review Provider

    yansongda/pay

    A skill your agent uses when reviewing PRs that add or modify a payment Provider in yansongda/pay - covers plugin pipeline, multi-tenant safety, signature verification, docs, and naming conventions.

    5.4k GitHub stars~2.4k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Abp Authorization

    abpframework/abp

    ABP permission system - PermissionDefinitionProvider, [Authorize] attribute, CheckPolicyAsync, IsGrantedAsync, ICurrentUser, IPermissionManager, multi-tenancy side.

    14k GitHub stars~1.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Django Access Review

    getsentry/skills

    Official

    Django access control and IDOR security review. An agent skill from getsentry/skills.

    1k GitHub starsUsed in 3 repos~2.6k tokens
    Backend & APIsAuto-check: notes
  • Backend Dev Guidelines

    litefuse/litefuse

    Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.

    101 GitHub starsUsed in 1 repo~5.8k tokens
    Backend & APIsAuto-check passed
  • Ecto Persistence Patterns

    georgeguimaraes/elixir-agent-tools

    Designs and debugs Elixir persistence with Ecto: schemas, changesets, queries, preloads, migrations and multi-tenancy, kept within application contexts.

    184 GitHub stars~1.2k tokensUpdated 21 days ago
    Backend & APIsAuto-check passed
  • Rails Security Multitenancy

    marckohlbrugge/37signals-skills

    Apply Rails security and multi-tenant safety practices including scoped queries, SSRF defenses, rate limiting, and tenant-scoped realtime updates.

    724 GitHub stars~1.7k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed

More from OrchardCMS/OrchardCore

All 17 skills in this repo
  • Orchardcore Video Producer

    OrchardCMS/OrchardCore

    Produces narrated Orchard Core videos (feature walkthroughs, module overviews, pull request demos) with one unified look and specification - 1080p, Orchard Core logo, colors and fonts, the same…

    8.2k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Orchardcore Admin Edit Views

    OrchardCMS/OrchardCore

    Creates and updates OrchardCore admin edit views using the ocat- CSS class conventions.

    8.2k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Orchardcore Asset Manager

    OrchardCMS/OrchardCore

    Builds, watches, and manages frontend assets in OrchardCore.

    8.2k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Orchardcore Data Migration

    OrchardCMS/OrchardCore

    Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).

    8.2k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Orchardcore Display Management

    OrchardCMS/OrchardCore

    Controls how OrchardCore renders content — placement.json rules, display drivers, shapes, zones, alternates, and editor groupings (tabs/cards/columns).

    8.2k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Orchardcore Docs Writer

    OrchardCMS/OrchardCore

    Authors OrchardCore documentation — MkDocs Material pages, module README docs, nav entries, admonitions, tabbed content, and redirects.

    8.2k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Orchardcore Tenants

What does Orchardcore Tenants do?

Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation. Orchardcore Tenants is an agent skill from OrchardCMS/OrchardCore. Works with OrchardCore multi-tenancy — shells, ShellSettings, creating/configuring tenants programmatically, running code in a tenant scope, feature profiles, and data isolation.

When should I use Orchardcore Tenants?

Orchardcore Tenants fits situations like: the user needs to create; run code inside a tenant; pre-configure tenants; understand shell lifecycle.

How do I install Orchardcore Tenants in Claude Code?

Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-tenants -a claude-code`. Or copy the skill folder (.agents/skills/orchardcore-tenants in OrchardCMS/OrchardCore) into .claude/skills/orchardcore-tenants in your project. Claude Code loads it when a task matches its description.

How do I install Orchardcore Tenants in Codex?

Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-tenants -a codex`. Or copy the skill folder (.agents/skills/orchardcore-tenants in OrchardCMS/OrchardCore) into .agents/skills/orchardcore-tenants in your project. Codex loads it when a task matches its description.

Can I use Orchardcore Tenants in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-tenants -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/orchardcore-tenants, .gemini/skills/orchardcore-tenants, .github/skills/orchardcore-tenants and .opencode/skills/orchardcore-tenants in your project.

What does Orchardcore Tenants need to run?

SKILL.md names no scripts, command-line tools or credentials: Orchardcore Tenants is instructions for the agent only.

Does Orchardcore Tenants access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Orchardcore Tenants safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Orchardcore Tenants use?

Orchardcore Tenants is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Orchardcore Tenants use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Orchardcore Tenants?

Skills that share tags, products or a category with Orchardcore Tenants: PR Review Provider (yansongda/pay, 5.4k stars), Abp Authorization (abpframework/abp, 14k stars), Django Access Review (getsentry/skills, 1k stars) and Backend Dev Guidelines (litefuse/litefuse, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Orchardcore Tenants?

OrchardCMS (a GitHub organization) maintains it in OrchardCMS/OrchardCore, which has 8,193 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 10, 2026.

Source: OrchardCMS/OrchardCore on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.