webiny-api-tenancy-catalog
它能做什么
这个技能是 Webiny 后端租户功能的查询列表,每项都附有导入语句和源文件。适用于基于 Webiny 开发并需要管理租户的开发者。
适用场景
- ✓开发者询问如何在 Webiny 项目中创建或删除租户的时候。
- ✓开发者需要在 Webiny 中为租户安装应用的时候。
- ✓开发者想找到租户用例正确导入名称的时候。
技能链接
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/generated/api/tenancy/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“要在我的项目中创建新租户,应该使用哪个 Webiny 构建模块?”
每周 5 个新技能,1 分钟读完。
工作原理
该技能列出每个租户构建模块的名称、导入语句和源文件。AI 会为你指出正确的模块,并提醒你在使用前阅读源文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
API — Tenancy
Tenant lifecycle and installation event handlers and use cases.
How to Use
- Find the abstraction you need below
- You MUST read the source file to get the exact interface and types!
- Import:
import { Name } from "<importPath>"; - See
webiny-use-case-patternorwebiny-event-handler-patternskills for implementation patterns
Abstractions
Name: AppInstaller
Import: import { AppInstaller } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/InstallTenant/index.ts
Description: Install an application on a tenant with rollback support.
Name: CreateTenantRepository
Import: import { CreateTenantRepository } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/CreateTenant/index.ts
Description: Persist a newly created tenant.
Name: CreateTenantUseCase
Import: import { CreateTenantUseCase } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/CreateTenant/index.ts
Description: Create a new tenant.
Name: DeleteTenantRepository
Import: import { DeleteTenantRepository } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/DeleteTenant/index.ts
Description: Persist tenant deletion.
Name: DeleteTenantUseCase
Import: import { DeleteTenantUseCase } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/DeleteTenant/index.ts
Description: Delete a tenant.
Name: GetTenantByIdUseCase
Import: import { GetTenantByIdUseCase } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/GetTenantById/index.ts
Description: Retrieve a tenant by its ID.
Name: InstallTenantUseCase
Import: import { InstallTenantUseCase } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/InstallTenant/index.ts
Description: Run all app installers for a tenant.
Name: TenantAfterCreateEventHandler
Import: import { TenantAfterCreateEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/CreateTenant/index.ts
Description: Hook into tenant lifecycle after a tenant is created.
Name: TenantAfterDeleteEventHandler
Import: import { TenantAfterDeleteEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/DeleteTenant/index.ts
Description: Hook into tenant lifecycle after a tenant is deleted.
Name: TenantAfterUpdateEventHandler
Import: import { TenantAfterUpdateEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/UpdateTenant/index.ts
Description: Hook into tenant lifecycle after a tenant is updated.
Name: TenantBeforeCreateEventHandler
Import: import { TenantBeforeCreateEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/CreateTenant/index.ts
Description: Hook into tenant lifecycle before a tenant is created.
Name: TenantBeforeDeleteEventHandler
Import: import { TenantBeforeDeleteEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/DeleteTenant/index.ts
Description: Hook into tenant lifecycle before a tenant is deleted.
Name: TenantBeforeUpdateEventHandler
Import: import { TenantBeforeUpdateEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/UpdateTenant/index.ts
Description: Hook into tenant lifecycle before a tenant is updated.
Name: TenantContext
Import: import { TenantContext } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/TenantContext/index.ts
Description: Provides access to the current tenant and tenant-scoped execution.
Name: TenantInstalledEventHandler
Import: import { TenantInstalledEventHandler } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/InstallTenant/index.ts
Description: Hook into tenant lifecycle after a tenant is installed.
Name: UpdateTenantRepository
Import: import { UpdateTenantRepository } from "webiny/api/tenancy"
Source: @webiny/api-core/features/tenancy/UpdateTenant/index.ts
Description: Persist tenant updates.
Name: UpdateTenantUseCase
Import: import { UpdateTenantUseCase } from "webiny/api/tenancy"
Source: `@webiny/api-core/features/tena
常见问题
使用这些之前需要阅读源文件吗?
需要。该技能说明,在编写代码之前应阅读源文件,以获取确切类型。
这个技能涵盖什么?
涵盖租户生命周期,即创建、删除租户以及在租户上安装应用,还包括这些步骤的事件处理器。
这个技能会替我写代码吗?
它会指出正确的构建模块及其导入语句。之后你的 AI 可以帮助编写使用它的代码。
详情
作者的原始描述
API — Tenancy — 17 abstractions. Tenant lifecycle and installation event handlers and use cases.
repo: webiny/webiny-js
热度
- GitHub 星标
- 8.1k
- 排名
- #12609
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
prd-to-plan
8.1k帮你的智能体把产品需求文档转化为分阶段的计划,由许多小的端到端切片组成,并保存为 Markdown 文件。
webiny-admin-architect
8.1k教你的智能体如何为 Webiny 平台构建管理界面,使用其业务逻辑层和呈现器模式。
webiny-admin-permissions
8.1k教你的智能体为 Webiny 管理界面添加权限控制,包括自动生成的权限表单以及显示或隐藏检查。
webiny-form-model
8.1k教你的智能体使用声明式字段构建器、布局、校验和条件规则,在 Webiny 中构建表单。