Saltar al contenido
Skillpedia
Bases de datos25 mil · #10095

nocobase-app-plugin-database-explorer

Qué hace

Esta skill explica cómo ver las bases de datos, tablas y campos que usa una aplicación NocoBase, sin cambiar nada. Es para administradores que quieren ver o compartir esa estructura.

Cuándo usarla

  • ✓Cuando quieres ver a qué bases de datos se conecta una app de NocoBase.
  • ✓Cuando necesitas consultar los campos y columnas de una colección en NocoBase.
  • ✓Cuando quieres que un rol distinto del administrador del sistema pueda ver la estructura de la base de datos.

Link de la skill

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Muéstrame qué colecciones y campos tiene mi app de NocoBase en su base de datos principal.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

Usa cuatro endpoints de solo lectura del plugin Database Explorer para listar conexiones, colecciones y sus campos. No tiene ningún endpoint de escritura, así que no puede cambiar nada.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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

Preguntas frecuentes

¿Puede cambiar mi base de datos?

No. El plugin solo lee información y no tiene endpoint de escritura.

¿Cómo funciona la paginación en listas grandes?

La lista de colecciones admite tamaños de página de 1 a 100, con un token de página para obtener la siguiente.

¿Quién puede ver la estructura de la base de datos?

El administrador del sistema puede verla por defecto, y puedes dar acceso a otros roles.

Detalles

Descripción original del autor

Browse an application's database connections, collections, and fields read-only through the Database Explorer endpoints, and grant access to them.

repo: nocobase/nocobase

Popularidad

Estrellas en GitHub
25 mil
Posición en el ranking
#10095
Licencia
—
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas