agentleFS
0xErwin10xErwin1/dbflux/skills/dbflux-rpc-driver/SKILL.md

dbflux-rpc-driver

Skill526 starsChanged 6 months agoApache-2.0View on GitHub

Create external DBFlux database drivers that speak the Driver RPC protocol. Trigger: When adding an RPC driver, external database service, driver plugin, or service configured through Settings → RPC Services.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Start from examples/custom_driver/ unless the user already has service code.

    line 27
  2. Very specific:

    Keep Hello metadata and SessionOpened metadata consistent.

    line 43
  3. Distinctive:

    Use absolute command paths while testing to avoid PATH ambiguity.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

When to Use

  • The driver should live outside the DBFlux binary.
  • The user mentions RPC services, external drivers, plugins, sockets, or dbflux-driver-host.
  • The integration should be configured through Settings → RPC Services.

Source of Truth

  • docs/DRIVER_RPC_PROTOCOL.md
  • crates/dbflux_ipc/src/driver_protocol.rs
  • crates/dbflux_driver_ipc/src/driver.rs
  • crates/dbflux_driver_ipc/src/transport.rs
  • crates/dbflux_driver_host/src/main.rs
  • crates/dbflux_app/src/rpc_services.rs
  • examples/custom_driver/

Critical Patterns

  • Start from examples/custom_driver/ unless the user already has service code.
  • DBFlux stores launch config in cfg_services, cfg_service_args, and cfg_service_env and probes services on startup.
  • Internal registry key is rpc:<socket_id>.
  • The service is the source of truth for driver kind, metadata, and form definition.
  • Restart DBFlux after changing persisted RPC service settings.

Protocol Checklist

  1. Bind the local socket using DBFlux IPC conventions.
  2. Handle Hello and negotiate the highest compatible protocol version.
  3. Return driver_kind, driver_metadata, and form_definition from Hello.
  4. Handle OpenSession, CloseSession, and Ping.
  5. Parse DbConfig::External { kind, values } from OpenSession profile JSON.
  6. Validate required form values server-side; use InvalidRequest for malformed profiles.
  7. Implement at least one useful requested operation such as Execute, Schema, or browse/CRUD methods.
  8. Return UnsupportedMethod for intentionally unsupported requests.
  9. Keep Hello metadata and SessionOpened metadata consistent.
  10. Stamp every post-Hello envelope with the negotiated version.

Launch Facts

  • Empty command and empty args: DBFlux expects the service to already be running.
  • Empty command with non-empty args: DBFlux launches dbflux-driver-host for driver services.
  • Explicit command: DBFlux starts and owns that process, then kills it on shutdown.
  • Use absolute command paths while testing to avoid PATH ambiguity.

Commands

cargo build
RUST_LOG=info cargo run -- --socket <socket-id>
python3 scripts/lint.py fmt --check

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.