Skip to content
Skillpedia
Databases25k · #10095

nocobase-app-plugin-database-explorer

What it does

This skill explains how to view the databases, tables and fields used by a NocoBase application, without changing anything. It is for administrators who want to see or share that structure.

When to use it

  • ✓When you want to see which databases a NocoBase app connects to.
  • ✓When you need to look up the fields and columns of a collection in NocoBase.
  • ✓When you want a role other than the system administrator to be able to see database structure.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-database-explorer/skills/nocobase-app-plugin-database-explorer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Show me which collections and fields my NocoBase app has in its main database.”

5 new skills a week. 1 minute to read.

How it works

It uses four read-only endpoints of the Database Explorer plugin to list connections, collections and their fields. It has no write endpoint, so it cannot change anything.

Technical content (original SKILL.md)

Original text by the author, straight from 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

FAQ

Can it change my database?

No. The plugin only reads information and has no write endpoint.

How does paging work for large lists?

The collection list supports page sizes from 1 to 100, with a page token to get the next page.

Who can see the database structure?

The system administrator can see it by default, and you can grant access to other roles.

Details

Original description by the author

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

repo: nocobase/nocobase

Popularity

GitHub stars
25k
Ranking position
#10095
License
—
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills