agentleFS
clideyclidey/whodb/.agents/skills/new-plugin/SKILL.md

new-plugin

Skill5.1k starsChanged 3 days agoApache-2.0View on GitHub

Add a new data source to WhoDB CE, either a database plugin or a source-first connector

4 other projects use a version of this.

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 3 mentionsMar 2026: 8 mentionsApr 2026: 4 mentionsMay 2026: 5 mentionsJun 2026: 6 mentionsJul 2026: 5 mentionsAug 2026: 6 mentionsSep 2026: 6 mentionsOct 2026: 9 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the clidey/whodb repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about clidey/whodb

The biggest 5 of 60 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 60

Talked about on GitHub, Bluesky and Hacker News (60 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 7

2 more on Bluesky

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 0 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never add per-source GraphQL.

    line 12
  2. Very specific:

    Type ID: Add DatabaseType_<Name> = "<Name>" to the const block in core/src/engine/engine.go.

    line 16
  3. Very specific:

    Do DB work inside plugins.WithConnection(config, p.DB, ...).

    line 21
  4. Very specific:

    Connection form: Add a ConnectableDatabase to catalog in core/src/dbcatalog/catalog.go: ID, Label, PluginType (the plugin that runs it), …

    line 25
  5. Very specific:

    Contract: Add a FamilySpec to familySpecs in core/src/sourcecatalog/catalog.go.

    line 26
  6. Very specific:

    Session metadata: Put type definitions, operators and the alias map in core/src/sourcecatalog/specs/ (sql.go or nonrelational.go) and …

    line 27
  7. Very specific:

    Frontend: Add an SVG to ceLogos in frontend/src/components/icons.tsx, keyed by the exact source ID (lookup falls back to the plugin type).

    line 28
  8. Very specific:

    Import-capable sources need the identifier proof in contract.md.

    line 40

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a Data Source

Pick a path:

  • Database plugin: a SQL or NoSQL database with a Go driver. Implement engine.PluginFunctions; the shared database driver adapts it to the source API.
  • Source-first connector: anything else (object stores, APIs). Implement source.SourceConnector and source.SourceSession directly.

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

  1. Type ID. Add DatabaseType_<Name> = "<Name>" to the const block in core/src/engine/engine.go. The string is the source ID everywhere: catalog, icon key, WHODB_<NAME> env profiles.
  2. Plugin package in core/src/plugins/<name>/; core/src/plugins/postgres/ is the reference.
    • SQL: embed gorm_plugin.GormPlugin. The constructor calls ConfigureIdentifierQuoting(...), sets Type, PluginFunctions = plugin and GormPluginFunctions = plugin; init() calls engine.RegisterPlugin(...).
    • GormPlugin has no default for DB, GetTableInfoQuery, GetTableNameAndAttributes, GetStorageUnitExistsQuery, GetPrimaryKeyColQuery, GetAllSchemasQuery, GetCreateTableQuery, GetSupportedOperators, GetGraphQueryDB, GetDatabases, RawExecute or GetSSLStatus. Everything else has a default; override only what differs.
    • Non-SQL: embed engine.BasePlugin; unsupported user operations return errors.ErrUnsupported. See the mongodb, redis, elasticsearch and memcached plugins.
    • Do DB work inside plugins.WithConnection(config, p.DB, ...); direct driver calls use config.OperationContext().
    • Open network connections through sourcedial: when sourcedial.Dialer() is non-nil, pass it to the driver's dial hook (pgx DialFunc, go-redis Dialer, mongo SetDialer with sourcedial.ContextDialer); when nil, leave the driver's dialing alone. If the hook replaces the driver's TLS setup, use sourcedial.DialTLS. Add the connector to core/src/plugins/sourcedial_test.go.
    • Wire-compatible with an existing plugin? Add a catalog alias instead of a plugin (see contract.md).
  3. 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 in core/src/ instead (see src_duckdb.go).
  4. Connection form. Add a ConnectableDatabase to catalog in core/src/dbcatalog/catalog.go: ID, Label, PluginType (the plugin that runs it), Extra (advanced fields and defaults such as "Port"), Fields, RequiredFields, SSLModes (extend sslModesFor in ssl_modes.go).
  5. Contract. Add a FamilySpec to familySpecs in core/src/sourcecatalog/catalog.go. Build object types with the helpers in that file (metadataObjectType, tabularObjectType, tabularReadOnlyObjectType, documentObjectType, keyValueObjectType, keyValueExistingMutableObjectType); never hand-build source.ObjectType. A catalog entry with no family spec for its ID or plugin type is skipped silently (core/src/sources/database/register.go).
  6. Session metadata. Put type definitions, operators and the alias map in core/src/sourcecatalog/specs/ (sql.go or nonrelational.go) and register them in registerSessionMetadata() in core/src/sourcecatalog/metadata.go. Plugins may import specs for type normalization but never register metadata from init().
  7. Frontend. Add an SVG to ceLogos in frontend/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 a customFormRenderer through registerSourceTypeOverrides() (frontend/src/config/source-registry.ts) only when the field-based form cannot work.

Source-first connector

  1. Package in core/src/sources/<name>/. Implement source.SourceConnector (Open) and a session that implements source.SourceSession plus only the capability interfaces it supports (core/src/source/interfaces.go). Resolvers type-assert those interfaces.
  2. In init(), call source.RegisterDriver(driverID, connector) and source.RegisterType(source.TypeSpec{DriverID: driverID, ...}) with ConnectionFields, Contract, Traits and SSLModes.
  3. Blank-import the package in core/cmd/whodb/main.go and add the icon as in step 7.

Tests

  • Package tests: connection parsing, raw query execution, schema introspection.
  • core/src/sourcecatalog/catalog_test.go validates 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 in dev/docker-compose.yml and dev/sample-data/, and the name in DEFAULT_DATABASES and DEFAULT_CATEGORIES in dev/run-e2e.sh and the ALL list in .github/workflows/e2e-ce.yml.

Verify

cd core && go build ./cmd/whodb && go test ./src/sourcecatalog/... && ./lint.sh
cd frontend && pnpm run build:ce && pnpm e2e:db:headless <name>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.