nocobase-app-plugin-demo-mode
它能做什么
这项技能搭建并运行一个独立的 NocoBase 3 演示网站,拥有自己的数据库。适合希望提供公开共享演示、并使用自动生成虚构数据的团队。
适用场景
- ✓当你想为 NocoBase 应用提供一个带虚构数据的公开演示网站时。
- ✓当演示网站需要按计划重置数据时。
- ✓当你需要为演示网站快速设置访客登录和写入保护时。
技能链接
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-demo-mode/skills/nocobase-app-plugin-demo-mode/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我搭建一个公开的 NocoBase 演示网站,放入虚构的客户数据,并且每晚重置。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会注册 Demo Mode 插件,并将其连接到应用的数据。之后,该插件会生成虚构数据、保护写入操作,并按计划重置网站。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Demo Mode
Use @nocobase/app-plugin-demo-mode for a dedicated demo with its own database and storage. The plugin supplies data lifecycle, visitor accounts, write protection, management components and optional simulation. The application supplies its business records, cleanup and external adapters. Simulation adapters and demo chat are enabled by default once integrated, without AI switches on the management page; the application chooses which flows to connect.
Check that this Skill applies
Demo Mode refuses ordinary writes, resets data daily and deletes all business data on clear/reset. Apply it only when the user asks for a demo deployment with those properties, names this plugin or Demo Mode, or the application already depends on it. Otherwise use the matching workflow:
| Request | Use instead |
|---|---|
| Example or sample records, such as “add some demo customers” | The application development Skill's sample-data workflow |
| A trial, staging, test or customer environment where users keep their own data | The nocobase-deployment Skill; an ordinary deployment without it |
| A payment, mail or other provider's sandbox account or test credentials | That integration's configuration |
| An in-app “demo/presentation mode” feature, such as hiding fields while screen-sharing | Ordinary feature development |
When the request could mean either a Demo Mode deployment or one of these, ask which one the user wants before registering the plugin, enabling it or adding full-business cleanup. For a confirmed dedicated demo, reuse the user's established deployment, language and role choices, and clarify any unresolved deployment or cleanup scope: clear/reset removes all business data in the demo instance, including visitor additions.
Keep protection proportionate
A demo is a public showcase: anyone may enter any listed account, administrators included, and the fictional data is reset daily. Protect only what lies outside the demo: a dedicated database and storage, no real credentials or customer data, and no real external effects such as mail, payments, publishing or real models. Inside the demo, use the application's existing permissions as they are and the plugin's defaults. Do not add hardening such as ownership rechecks, rate limits, confirmation steps, management restrictions for dataset accounts or security-focused tests unless the user asks; prefer the simplest integration that shows the requested journeys.
Integration workflow
- Confirm the target and enable. Check the dedicated deployment, then complete enable the deployment and its verification. Check the required host capabilities below.
- Provide the dataset. Adapt the application's business services using data adaptation. For a new application with no business domain, use the executable non-AI example. Register one dataset on the original
demoDataTokenin an application provider'sboot(); registration does not generate records. - Adapt interactions. Keep normal business authorization. Enable collection write exceptions for visitor mutations. The guard covers request-scoped database writes; adapt external calls and background work where the application has them. Read simulation only for AI or Runner flows the demo uses.
- Provide entry and management. Mount
DemoModeSettingsfrom@nocobase/app-plugin-demo-mode/client/settingson an application-owned page inside the application's existing System management (settings) navigation group, protected bysettings:demoMode.data/read. Wrap its route declarations withdemoModeRoutes([...])from@nocobase/app-plugin-demo-mode/clientso both the menu and route are absent outside Demo Mode, including for root.defineDemoModeConfig()publishes the enabled flag automatically; existing applications must adopt the helper. Grant
常见问题
我能把它用于真实的客户网站吗?
不能。它会清空并重置全部业务数据,因此只适用于演示网站。
访客能保存自己的数据吗?
不能。演示网站会拒绝普通的写入操作。
它需要 AI 模型吗?
不需要。模拟功能是可选的,由应用决定连接哪些流程。
详情
作者的原始描述
Build, enable or operate a dedicated NocoBase 3 demo deployment with @nocobase/app-plugin-demo-mode: a public, shared demo site whose fictional data is generated, cleared and reset, with quick visitor sign-in, write protection and optional model or Agent simulation (公开演示站、只读演示、定时重置的演示环境、 Demo Mode). Also use when changing business collections, external integrations or background jobs in an application that already depends on this plugin, so its demo dataset, cleanup and adapters stay complete. Not for example records (use the application development Skill's sample-data workflow), ordinary tria
repo: nocobase/nocobase
热度
- GitHub 星标
- 25k
- 排名
- #10096
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
nocobase-app-development
25k帮你的智能体为完整的 NocoBase 3 业务应用构建页面、路由、数据、权限和测试。
shadcn
25k帮你的智能体在 Web 项目中查找、添加、修复和美化 shadcn/ui 组件,并使用其官方文档和注册表。
nocobase-app-plugin-development
25k帮你的智能体在现有应用中创建和维护 NocoBase 3 插件,包括服务端、客户端、数据库和注册部分。
nocobase-app-upgrade
25k帮你的智能体把 NocoBase 应用升级到较新的模板版本,引入模板的更改,同时保留你自己的工作。