nocobase-app-plugin-database-explorer
Что он делает
Этот скилл объясняет, как посмотреть базы данных, таблицы и поля, которые использует приложение NocoBase, ничего не меняя. Он нужен администраторам, которые хотят увидеть или показать эту структуру.
Когда использовать
- ✓Когда вы хотите увидеть, к каким базам данных подключено приложение NocoBase.
- ✓Когда нужно найти поля и столбцы коллекции в NocoBase.
- ✓Когда вы хотите, чтобы роль, отличная от системного администратора, могла видеть структуру базы данных.
Ссылка на скилл
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Покажи мне, какие коллекции и поля есть в основной базе моего приложения NocoBase.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл использует четыре эндпоинта плагина Database Explorer только для чтения, чтобы вывести подключения, коллекции и их поля. Эндпоинта для записи нет, поэтому он ничего не может изменить.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Database Explorer
Use this Skill when
Someone needs to see what databases an application talks to, which collections live on each one, or what fields and physical columns a collection has — and when a role other than System Administrator should be able to see that.
It is not for changing anything. The plugin has no write endpoint, and creating or altering a collection belongs to migrations.
Public surfaces
Four read endpoints:
| Method and path | Returns |
|---|---|
GET /api/databaseExplorer/connections |
Every configured connection; the default one has isDefault: true |
GET /api/databaseExplorer/connections/:connection/collections |
One page of collections; pageSize is 1–100 (default 20), pageToken opaque |
GET /api/databaseExplorer/connections/:connection/collections/:collection |
The resolved definition, its fields, and resolution warnings |
GET /api/databaseExplorer/connections/:connection/collections/:collection/physicalSchema |
Physical columns, indexes, keys, and constraints |
Success is { data }; the connection list is { data, meta: { total } } and the collection list { data, meta: { nextPageToken? } }. Failures use the standard /api error body with domain databaseExplorer; branch on reason: DATABASE_EXPLORER_FORBIDDEN (403), CONNECTION_NOT_FOUND and COLLECTION_NOT_FOUND (404), INVALID_CURSOR and INVALID_LIST_OPTIONS (400), and DATABASE_UNAVAILABLE, CONNECTION_UNAVAILABLE, CONNECTION_UNREACHABLE and SCHEMA_READ_DENIED (503). A malformed pageSize or pageToken is 400 INVALID_INPUT in the app domain.
The running application documents these routes under the DatabaseExplorer tag at /api/swagger/docs (JSON at /api/swagger, signed in); their operationIds are databaseExplorerListConnections, databaseExplorerListCollections, databaseExplorerGetCollection and databaseExplorerGetPhysicalSchema.
The client entry exports DatabaseExplorerClient, a typed client for these endpoints, and DATABASE_EXPLORER_ACCESS, the grant they check. The plugin contributes no pages; an application that wants one builds it on the client and declares it among its own routes with that grant. The server entry also exports the read functions (listConnections, listCollections, readCollection, readPhysicalCollection), the DATABASE_EXPLORER_PAGE constant, and the response types.
Prerequisites
Register @nocobase/app-plugin-authentication and @nocobase/app-plugin-authorization before this plugin on both runtimes. An application configured with database.default: none gets 503 DATABASE_UNAVAILABLE from every endpoint.
App workflow
Add the plugin to both composition roots and to the application's dependencies:
// server/plugins.ts
import databaseExplorer from '@nocobase/app-plugin-database-explorer/server';
// client/plugins.ts
import databaseExplorer from '@nocobase/app-plugin-database-explorer/client';
// then call it: databaseExplorer()
A System Administrator can already read the endpoints, because that permission set grants page:*/access. To let another role in, add one grant to its permission set:
{
"resource": { "type": "page", "id": "database-explorer" },
"actions": [{ "action": "access" }]
}
An application page built on the endpoints declares its route with the same grant (DATABASE_EXPLORER_ACCESS), so the navigation entry and the endpoints never disagree.
Ownership
The plugin owns the access resource, its endpoints and their response shapes, and the rule about what a connection may reveal. Applications own whether the plugin is registered, any page built on it, and who is granted access.
Connection responses never carry a password, user name, host, port, socket path, SQLite filename, TLS material, driver options, or pool settings. That list is enforced as an allow-list in server/connection-summary.ts, so a field a new dialect adds stays inside by default. Do not turn it into a deny-list, and do not add a locator to it because a
Частые вопросы
Может ли он изменить мою базу данных?
Нет. Плагин только читает информацию и не имеет эндпоинта для записи.
Как работает постраничный вывод для больших списков?
Список коллекций поддерживает размер страницы от 1 до 100, а токен страницы позволяет получить следующую.
Кто может видеть структуру базы?
По умолчанию её видит системный администратор, а доступ другим ролям вы можете выдать сами.
Подробности
Оригинальное описание автора
Browse an application's database connections, collections, and fields read-only through the Database Explorer endpoints, and grant access to them.
repo: nocobase/nocobase
Популярность
- Звёзды на GitHub
- 25k
- Место в рейтинге
- #10095
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
nocobase-app-development
25kПомогает агенту создать страницы, маршруты, данные, права доступа и тесты для полного бизнес-приложения на NocoBase 3.
shadcn
25kПомогает агенту находить, добавлять, исправлять и оформлять компоненты shadcn/ui в веб-проекте по их официальной документации и реестрам.
nocobase-app-plugin-development
25kПомогает агенту создавать и поддерживать плагины NocoBase 3 внутри существующего приложения: серверную и клиентскую часть, базу данных и регистрацию.
nocobase-app-upgrade
25kПомогает агенту обновить приложение NocoBase до более новой версии шаблона, перенося изменения шаблона и сохраняя вашу собственную работу.
Похожие скиллы
discrawl
394kПозволяет агенту искать и кратко пересказывать сохраненный локальный архив сообщений Discord, проверять его свежесть и читать личные сообщения.
clickhouse-io
280kПомогает агенту оптимизировать запросы и схемы в ClickHouse по лучшим практикам аналитики. Используйте, когда аналитические запросы слишком медленные.
scientific-db-pubmed-database
280kПомогает агенту искать научные статьи в биомедицине. Полезен для исследований, где нужна точная медицинская информация.