Skip to content
Skills Library
Programming · Building & coding

tabularis-plugin-driver

/tabularis-plugin-driver

Use when creating or updating a Tabularis database driver plugin in Rust. Covers modern manifest fields, JSON-RPC over stdio, modular plugin layout, MySQL-level feature coverage targets, optional UI extensions, and validation against Tabularis repo rules.

Repository
tabularis ↗
Licence
Apache-2.0
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when creating or updating a Tabularis database driver plugin in Rust. Covers modern manifest fields, JSON-RPC over stdio, modular plugin layout, MySQL-level feature coverage targets, optional UI extensions, and validation against Tabularis repo rules.

Original author description

Use when creating or updating a Tabularis database driver plugin in Rust. Covers modern manifest fields, JSON-RPC over stdio, modular plugin layout, MySQL-level feature coverage targets, optional UI extensions, and validation against Tabularis repo rules.

How it works

  1. Goals
  2. Default Repo Layout
  3. Required Research Before Coding
  4. Implementation Workflow
  5. Testing Strategy
  6. Validation Checklist
  7. Tabularis-Specific Rules
  8. Common Mistakes
  9. References
Original SKILL.md headings · 255 lines, 1,079 words
SKILL.md preview
---
name: tabularis-plugin-driver
description: "Use when creating or updating a Tabularis database driver plugin in Rust. Covers modern manifest fields, JSON-RPC over stdio, modular plugin layout, MySQL-level feature coverage targets, optional UI extensions, and validation against Tabularis repo rules."
---

# Tabularis Plugin Driver

Use this skill when building or updating a database plugin for Tabularis.

The skill is optimized for this repository. Follow `AGENTS.md`, the files in `.rules/`, and the current plugin-system behavior in `src-tauri/src/plugins/` and `packages/web-ui/src/types/plugins.ts`.

## Goals

- Build a Rust plugin that speaks Tabularis JSON-RPC over stdin/stdout
- Use the modern plugin manifest, not the old minimal format
- Aim for broad feature coverage comparable to the built-in MySQL driver where the target database supports it
- Keep the plugin modular instead of concentrating logic in a single `main.rs`
- Add unit tests for pure utilities and SQL generation

## Default Repo Layout

Prefer this structure for a new plugin repository:

```text
plugin-root/
├── Cargo.toml
├── manifest.json
├── README.md
├── src/
│   ├── main.rs
│   ├── rpc.rs
│   ├── client.rs
│   ├── error.rs
│   ├── models.rs
│   ├── handlers/
│   │   ├── mod.rs
│   │   ├── metadata.rs
│   │   ├── query.rs
│   │   ├── crud.rs
│   │   └── ddl.rs
│   └── utils/
│       ├── mod.rs
│       ├── identifiers.rs
│       ├── values.rs
│       ├── types.rs
│       └── pagination.rs
├── src/bin/
│   └── test_plugin.rs
└── tests/                # only if integration tests are worth the overhead
```

Keep `src/main.rs` thin. It should mostly parse requests, dispatch methods, and serialize responses.

## Required Research Before Coding

1. Read the current plugin manifest shape in:
   - `plugins/manifest.schema.json`
   - `packages/web-ui/src/types/plugins.ts`
   - `src-tauri/src/plugins/manager.rs`
2. Read the JSON-RPC expectations in:
   - `plugins/PLUGIN_GUIDE.md`
   - `src-tauri/src/plugins/driver.rs`
   - `src-tauri/src/plugins/rpc.rs`
3. Read a built-in driver with broad coverage to understand expected behaviors:
   - `src-tauri/src/drivers/mysql/mod.rs`
4. Read plugin-loading behavior and modern feature flags in:
   - `packages/web-ui/src/hooks/useDrivers.ts`
   - `packages/web-ui/src/utils/connectionStringParser.ts`
   - `packages/web-ui/src/utils/driverCapabilities.ts`

## Implementation Workflow

### 1. Define plugin scope

Decide which capabilities are truly supported by the target database and driver library:

- `schemas`
- `views`
- `routines`
- `file_based`
- `folder_based`
- `connection_string`
- `connection_string_example`
- `identifier_quote`
- `alter_primary_key`
- `alter_column`
- `create_foreign_keys`
- `manage_tables`
- `readonly`
- `no_connection_required`

Do not advertise support you cannot back with working handlers.

### 2. Create a modern manifest

At minimum define:

- `id`
- `name`
- `version`
- `description`
- `default_port`
- `executable`
- `capabilities`
- `data_types`
- `default_username`
- `color`
- `icon`

Use modern optional fields when useful:

- `settings`
- `ui_extensions`

See [references/manifest-checklist.md](./references/manifest-checklist.md).

### 3. Build a modular RPC surface

Implement the request loop in `main.rs`, but move logic out immediately:

- `rpc.rs`: request parsing, success/error helpers, method routing support
- `client.rs`: connection config, client creation, pooling or reuse key logic
- `handlers/metadata.rs`: databases, schemas, tables, columns, indexes, foreign keys, views, routines
- `handlers/query.rs`: `test_connection`, `ping`, `execute_query`, `count_query`, `explain_query_plan` if possible
- `handlers/crud.rs`: `insert_record`, `update_record`, `delete_record`
- `handlers/ddl.rs`: SQL generation helpers and DDL RPC methods
- `utils/*`: quoting, escaping, value formatting, type normalization, pagination math

### 4. Target broad feature coverage

Use the built-in MySQL driver as the feature benchmark, not as text to copy.

For each feature area, classify it:

- `supported`: implement fully
- `partially_supported`: implement with explicit limitations
- `unsupported`: return an accurate error or empty result as appropriate

Prioritize these methods:

- `test_connection`
- `get_databases`
- `get_schemas`
- `get_tables`
- `get_columns`
- `get_foreign_keys`
- `get_indexes`
- `get_views`
- `get_view_definition`
- `get_view_columns`
- `get_routines`
- `get_routine_parameters`
- `get_routine_definition`
- `execute_query`
- `insert_record`
- `update_record`
- `delete_record`
- `get_schema_snapshot`
- `get_all_columns_batch`
- `get_all_foreign_keys_batch`
- `get_create_table_sql`
- `get_add_column_sql`
- `get_alter_column_sql`
- `get_create_index_sql`
- `get_create_foreign_key_sql`
- `drop_index`
- `drop_foreign_key`

If a method is not safe to emulate, fail explicitly instead of faking success.

#### Optional routine-management methods

When the manifest declares `"routine_management": true`, the host shows
run / create / edit / drop actions for routines. The backing RPC methods are
**optional**: if the plugin does not implement one, the host answers the
JSON-RPC "method not found" error (-32601) with a dialect-neutral fallback
(`CALL name(args)` / `SELECT name(args)`, generic `DROP`, the raw definition
as edit script). Implement only what the dialect needs:

- `build_routine_call_sql({ params, routine_name, routine_type, args, schema }) -> string` —
  `args` is an ordered list of `{ name, mode, value: string|null, is_raw: bool }`;
  return an executable invocation script (it is opened in the editor, so
  multi-statement scripts are fine — e.g. MySQL's `SET @out` / `CALL` / `SELECT @out`).
- `routine_create_template({ routine_type, schema }) -> string` — starter
  script for a new PROCEDURE/FUNCTION in the plugin's dialect.
- `get_routine_edit_script({ params, routine_name, routine_type, schema }) -> string` —
  re-runnable script to alter the routine (e.g. `DROP` + `CREATE`, or
  `CREATE OR REPLACE`).
- `drop_routine({ params, routine_name, routine_type, schema }) -> null` —
  drop the routine; resolve overloads yourself if the dialect has them.

### 5. Add settings only when they solve a real problem

Typical useful settings:

- DSN name
- driver/library path
- default schema
- TLS mode
- extra connection properties

Keep settings in the manifest and resolve them in a dedicated config path, not inline in handlers.

### 6. Add UI extensions only when the database needs them

Examples of good reasons:

- a custom connection helper for DSN-based setup
- an advanced settings panel for database-specific options
- contextual UI for unsupported-but-important caveats

Avoid UI extensions that only decorate the product without improving DB-specific workflows.

## Testing Strategy

Always add unit tests for pure logic:

- identifier quoting
- SQL builders
- type normalization
- pagination helpers
- value serialization
- capability-driven helper decisions

Prefer pure utility modules so tests stay fast and deterministic.

If the plugin includes a JSON-RPC smoke binary like `src/bin/test_plugin.rs`, use it to simulate Tabularis requests over stdio.

## Validation Checklist

Before finishing:

- `cargo test`
- `cargo build --release`
- smoke test at least one JSON-RPC request through stdin/stdout
- verify `manifest.json` matches current Tabularis schema and capabilities
- verify any advertised capability has corresponding handler behavior
- verify unsupported operations return clear errors

## Tabularis-Specific Rules

- Comments and docs must be in English
- Keep code split by responsibility; avoid a monolithic `main.rs`
- Add unit tests for extracted utility logic
- When updating this repo itself, follow `AGENTS.md` requirements including GitNexus impact analysis before editing existing symbols
- Use `pnpm` for frontend-side validation in this repo and `cargo` for plugin validation

## Common Mistakes

- copying old plugin manifests that omit modern fields
- putting connection logic, SQL generation, RPC parsing, and metadata extraction in one file
- advertising `manage_tables` or `alter_column` without implementing the related methods
- returning fake empty success for operations that should surface unsupported behavior
- skipping tests for identifier quoting and SQL generation

## References

- Manifest details: [references/manifest-checklist.md](./references/manifest-checklist.md)
Files in this package (3)
  • SKILL.md 8 KB
  • agents/openai.yaml 1 KB
  • references/manifest-checklist.md 3 KB

Versions

The database has no other skills named tabularis-plugin-driver.

Database snapshot: 13.11.2026 · package version 5b7f868e8a45 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tabularis-pr-review
    Use when reviewing a Tabularis pull request locally — checking code quality against the repo's own rules, verifying the PR's claims, running its tests on the correct branch, and preparing real test data plus a manual test plan for the human. Use when the user says 'review PR…
  • 100tabularis-run-macos
    macOS only. Launch the real Tabularis desktop app (debug build, real WKWebView and Tauri IPC) and drive it from the agent through tauri-wd: click, fill forms, open menus, drag, take window screenshots and check the result on disk. Use to manually verify a PR or a change in the…
  • 100plugin-author
    Write a Shipyard plugin. Use when a person creates or edits a plugin folder with manifest.json and files/, or asks how to package one.
  • 100package-author
    当用户要把手头的工具打包/标准化成 pinvou 插件包时使用——包括纯技能(SKILL.md)、纯 MCP 服务或它们的组合包。用户说"打包/做成插件包/标准化这个工具/给我一个能上传的标准包/写 plugin.json/加个图标"等,或给了散乱脚本/目录要整理成可上传 zip 时,用本技能把内容规范成 plugin-protocol 标准包(补 plugin.json、补 mcp/manifest.json、补 SKILL.md、补图标、校验命名)。
  • 100plugin-structure
    This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs…
  • 100bump-version
    Bump package and plugin version in sync. Updates package.json, .claude-plugin/plugin.json, and install-state manifest to the same version. Use when: user says 'bump version', 'update version', '更新版本', '版本 +1', or /bump-version

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.