new-plugin
БесплатноБез исполняемых скриптовНе проверенAdd a new data source to WhoDB CE, either a database plugin or a source-first connector
от clidey★ 5 073 звезды на GitHubОб этом скилле
Add a Data Source
Pick a path:
- Database plugin: a SQL or NoSQL database with a Go driver. Implement
engine.PluginFunctions; the shareddatabasedriver adapts it to the source API. - Source-first connector: anything else (object stores, APIs). Implement
source.SourceConnectorandsource.SourceSessiondirectly.
Never add per-source GraphQL; the generic Source* API serves every type. Read contract.md in this skill before declaring capabilities, SSL or aliases.
Database plugin
- Type ID. Add
DatabaseType_<Name> = "<Name>"to the const block incore/src/engine/engine.go. The string is the source ID everywhere: catalog, icon key,WHODB_<NAME>env profiles. - Plugin package in
core/src/plugins/<name>/;core/src/plugins/postgres/is the reference.- SQL: embed
gorm_plugin.GormPlugin. The constructor callsConfigureIdentifierQuoting(...), setsType,PluginFunctions = pluginandGormPluginFunctions = plugin;init()callsengine.RegisterPlugin(...). GormPluginhas no default forDB,GetTableInfoQuery,GetTableNameAndAttributes,GetStorageUnitExistsQuery,GetPrimaryKeyColQuery,GetAllSchemasQuery,GetCreateTableQuery,GetSupportedOperators,GetGraphQueryDB,GetDatabases,RawExecuteorGetSSLStatus. Everything else has a default; override only what differs.- Non-SQL: embed
engine.BasePlugin; unsupported user operations returnerrors.ErrUnsupported. See the mongodb, redis, elasticsearch and memcached plugins. - Do DB work inside
plugins.WithConnection(config, p.DB, ...); direct driver calls useconfig.OperationContext(). - Open network connections through
sourcedial: whensourcedial.Dialer()is non-nil, pass it to the driver's dial hook (pgxDialFunc, go-redisDialer, mongoSetDialerwithsourcedial.ContextDialer); when nil, leave the driver's dialing alone. If the hook replaces the driver's TLS setup, usesourcedial.DialTLS. Add the connector tocore/src/plugins/sourcedial_test.go. - Wire-compatible with an existing plugin? Add a catalog alias instead of a plugin (see
contract.md).
- SQL: embed
- Register. Blank-import the package in
core/cmd/whodb/main.go. A CGO plugin that cannot build on arm/riscv64 registers through a build-tagged file incore/src/instead (seesrc_duckdb.go). - Connection form. Add a
ConnectableDatabasetocatalogincore/src/dbcatalog/catalog.go:ID,Label,PluginType(the plugin that runs it),Extra(advanced fields and defaults such as"Port"),Fields,RequiredFields,SSLModes(extendsslModesForinssl_modes.go). - Contract. Add a
FamilySpectofamilySpecsincore/src/sourcecatalog/catalog.go. Build object types with the helpers in that file (metadataObjectType,tabularObjectType,tabularReadOnlyObjectType,documentObjectType,keyValueObjectType,keyValueExistingMutableObjectType); never hand-buildsource.ObjectType. A catalog entry with no family spec for its ID or plugin type is skipped silently (core/src/sources/database/register.go). - Session metadata. Put type definitions, operators and the alias map in
core/src/sourcecatalog/specs/(sql.goornonrelational.go) and register them inregisterSessionMetadata()incore/src/sourcecatalog/metadata.go. Plugins may import specs for type normalization but never register metadata frominit(). - Frontend. Add an SVG to
ceLogosinfrontend/src/components/icons.tsx, keyed by the exact source ID (lookup falls back to the plugin type). Forms, SSL options and capability flags render from the backend contract. Add acustomFormRendererthroughregisterSourceTypeOverrides()(frontend/src/config/source-registry.ts) only when the field-based form cannot work.
Source-first connector
- Package in
core/src/sources/<name>/. Implementsource.SourceConnector(Open) and a session that implementssource.SourceSessionplus only the capability interfaces it supports (core/src/source/interfaces.go). Resolvers type-assert those interfaces. - In
init(), callsource.RegisterDriver(driverID, connector)andsource.RegisterType(source.TypeSpec{DriverID: driverID, ...})withConnectionFields,Contract,TraitsandSSLModes. - Blank-import the package in
core/cmd/whodb/main.goand add the icon as in step 7.
Tests
- Package tests: connection parsing, raw query execution, schema introspection.
core/src/sourcecatalog/catalog_test.govalidates the connection, session-metadata, object-creation and object-metadata contracts of every catalog type.- Import-capable sources need the identifier proof in
contract.md. - E2E: add
frontend/e2e/fixtures/databases/<name>.json, a service and seed data indev/docker-compose.ymlanddev/sample-data/, and the name inDEFAULT_DATABASESandDEFAULT_CATEGORIESindev/run-e2e.shand theALLlist in.github/workflows/e2e-ce.yml.
Verify
cd core && go build ./c
Установить new-plugin в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл new-plugin?
Add a new data source to WhoDB CE, either a database plugin or a source-first connector
Как установить скилл new-plugin?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл new-plugin запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic