/faucet:faucet-connectorfrom faucet
Guides writing Rust faucet source/sink connectors: scaffolding crates, implementing Source/Sink traits, config with JSON Schema, streaming with bounded memory, idempotent sinks, error typing, conformance testing, publishing to crates.io, and registry listing.
Ships in faucet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A faucet connector is a Rust crate that implements one trait from
faucet-core: Source (reads records) or Sink (writes records). Records are
JSON values. The pipeline owns paging, checkpointing, retries, metrics and the
dead-letter queue; the connector owns talking to its backend correctly and
fast.
The engine contract a connector must honour (streaming and bookmarks, the write → flush → checkpoint order, effectively-once, retries, error typing, performance, config rules, versioning) is on Authoring a connector; the conformance battery and tiers on Connector conformance; publishing and discovery on Connector marketplace. Read the authoring page before writing code.
Working, tested examples to copy: examples/faucet-source-acme/
(an HTTP API source with keyset pagination and resume) and
examples/faucet-sink-acme/ (a bulk
HTTP sink with append and keyed upsert). Both pass the conformance battery
against a wiremock backend.
The project decides which faucet to use, not whatever is on the PATH: a
config written for a newer faucet can fail or be misread on an older one.
Find the pin: the "github:faucet-hq/faucet-stream" entry under [tools]
in the project's mise.toml (faucet init writes it). A config may also
carry requires_faucet: ">=X.Y". The pin is used in commands, URLs and
image tags below, so accept only a release version: it must match
^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$. Stop and ask the user about
anything else.
Run faucet --version. Use that binary if it equals the pin (with no pin:
if it satisfies every requires_faucet in the project).
Otherwise, if mise is installed, run mise install
in the project and prefix every command with mise exec --.
Otherwise use the pinned container image; its entrypoint is faucet:
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" -w /work ghcr.io/faucet-hq/faucet-stream:<version> --version.
Otherwise download that version's archive for this platform, check it, and only then unpack it. Never pipe a download into a shell.
v=<version> # the checked pin
t=aarch64-apple-darwin # or x86_64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
printf '%s\n' "$v" | grep -Eqx '[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?' || exit 1
base="https://github.com/faucet-hq/faucet-stream/releases/download/faucet-cli-v$v"
curl --proto '=https' --tlsv1.2 -fLsS -O "$base/faucet-cli-$t.tar.xz" -O "$base/faucet-cli-$t.tar.xz.sha256"
shasum -a 256 -c "faucet-cli-$t.tar.xz.sha256"
gh attestation verify "faucet-cli-$t.tar.xz" --repo faucet-hq/faucet-stream # when gh is installed
tar -xJf "faucet-cli-$t.tar.xz" # the binary is faucet-cli-$t/faucet
If the checksum or the attestation does not verify, stop and tell the user.
With no pin at all, install the latest release the same way (the archive
and its .sha256 from releases/latest/download/) and pin it as described in
Pinning the faucet version.
Every version-specific fact (which connectors and blocks exist, config keys,
types, defaults, commands and flags) comes from that binary: faucet list,
faucet schema --help, faucet schema source|sink|transform <name>,
faucet <command> --help. Never from memory or from this skill. When a config
passes faucet validate, set its requires_faucet: to ">=<major>.<minor>"
of that binary; if validate rejects requires_faucet as an unknown field, the
binary predates it, so leave it out.
The faucet binary only scaffolds. The API the crate compiles against is the
faucet-core (and faucet-conformance) version its Cargo.lock resolves:
cargo tree -p faucet-core --depth 0
cargo tree -p faucet-conformance --depth 0 -e dev
Every API fact — trait methods and their exact signatures, which methods are
defaulted, re-exports, FaucetError variants, helper functions, conformance
checks — comes from the docs for exactly those versions:
https://docs.rs/faucet-core/<version>/faucet_core/ and
https://docs.rs/faucet-conformance/<version>/faucet_conformance/, or offline:
cargo doc -p faucet-core -p faucet-conformance --open
Method names below (stream_pages, write_batch, flush, ...) say where to
look; confirm each signature there before implementing it. The validator is
the compiler and the tests, not this skill.
Scaffold.
faucet new connector --help
faucet new connector acme --kind source
faucet new connector acme --kind sink --common
The name is the lowercase system name; it becomes the crate name and the
YAML type:. --common adds a faucet-common-<name> crate for config a
source/sink pair shares. Run cargo test immediately; the scaffold is green
with a passthrough implementation and a wired tests/conformance.rs. If the
project has no faucet binary, copy an example crate from examples/
instead and rename it.
Config. Fill src/config.rs: every field documented (the doc comments
become the schema faucet schema and editors show), safe bounded defaults,
validation in the constructor returning a config error. Rules:
Config and schema.
Keep all I/O out of config.rs.
Implement the trait in src/stream.rs or src/sink.rs, the only
module that does I/O. Open the trait on docs.rs for the locked version and
implement the required method, then override config_schema,
connector_name and dataset_uri. Run every backend request through a
CallSlot built in the constructor (its own timeout and retry policy) and
forward set_call_context / set_roundtrip_recorder to it, so the run's
deadline, cancel token and round-trip metering reach each call
(Backend calls).
Export a DESCRIPTOR that answers the connector's capabilities from config
alone
(Declaring capabilities).
Then, in order of importance:
stream_pages to read page by page from the
backend's paging primitive (the default buffers everything), and make the
whole-result method drain that stream. For incremental sync, add the state
key, start-bookmark and per-page bookmark pieces
(Streaming pages and bookmarks).
Stop paging on an empty page or an explicit end marker, never on a short
page (backends clamp the page size), and fail when the next cursor does
not advance.
Override check only if a one-page probe would block or have side
effects.write_batch through the backend's bulk API, split to its
request limit; flush if anything is buffered; per-row outcomes when the
backend reports them; keyed upsert/delete through the shared write spec
and planner; an atomic watermark only when rows and token commit in one
transaction
(Write, flush, checkpoint).
When a page goes out in several requests, report the rows of requests
that succeeded as written so a dead-letter replay does not append them
twice;
a read-only check probe.Unit and integration tests. Unit tests at the bottom of each file,
integration tests in tests/ against wiremock or testcontainers,
asserting exact records, bookmarks and error variants
(Tests).
Conformance. Grow tests/conformance.rs with every check that applies
to what the connector does, and assert the honest branch for what it does
not (which checks apply).
Give each sink check its own fresh destination.
Gate. All must pass before publishing:
cargo check --all-targets
cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --check
cargo publish --dry-run
faucet conformance scores only connectors compiled into a faucet binary;
a third-party crate is proven by its own tests/conformance.rs.
Publish and register. Publish to crates.io, then make it usable and
discoverable: users run it from a custom faucet binary that registers it
with register_source_described / register_sink_described and the
crate's DESCRIPTOR (registered without one, it is treated as a plain
source or an append-only sink, so write_mode: upsert is refused)
(Custom binaries with third-party connectors),
and a PR to the registry index makes faucet search find it
(Connector marketplace).
Check the entry with a local copy of the index:
faucet search acme --index ./registry.json
faucet install acme --kind source --index ./registry.json
faucet-core among faucet crates (plus
faucet-conformance as a dev-dependency), at the major version only. Use
its re-exports instead of adding the same crates yourself; add serde and
schemars only for their derive macros, plus your backend's client.check.flush leaves everything written so far durable.write_batch or by
declaring it replay-safe when it is not. A lost response plus a retry
duplicates every row.FaucetError. Transient failures use the
variants the pipeline retries, permanent ones the others; foreign errors
are wrapped, not stringified. No unwrap/expect on anything that can
fail at run time.Debug output, logs, errors, probe reasons or dataset_uri.true from a capability probe or
list a write mode only for what the connector really does for the current
config. The CLI gates configs on them; a false true corrupts data.1.0.0; additive changes are minor releases. A renamed or
removed field or a changed bookmark shape without a migration is a major.cargo tree -p faucet-core --depth 0 checked, and every trait method
matches docs.rs for that version.faucet-core (+ serde, schemars, the backend client) in
[dependencies], at the major version.config.rs.stream_pages; page size bounded; the one-page batch size handled.flush makes everything durable; an empty batch is a cheap no-op.1.0.0, docs.rs metadata, README with a config example using
${env:...} for secrets.agents/openai.yaml (opens in a new tab)examples/faucet-sink-acme/Cargo.toml (opens in a new tab)examples/faucet-sink-acme/README.md (opens in a new tab)examples/faucet-sink-acme/src/config.rs (opens in a new tab)examples/faucet-sink-acme/src/descriptor.rs (opens in a new tab)examples/faucet-sink-acme/src/lib.rs (opens in a new tab)examples/faucet-sink-acme/src/sink.rs (opens in a new tab)examples/faucet-sink-acme/tests/conformance.rs (opens in a new tab)examples/faucet-source-acme/Cargo.toml (opens in a new tab)examples/faucet-source-acme/README.md (opens in a new tab)examples/faucet-source-acme/src/config.rs (opens in a new tab)examples/faucet-source-acme/src/descriptor.rs (opens in a new tab)examples/faucet-source-acme/src/lib.rs (opens in a new tab)examples/faucet-source-acme/src/stream.rs (opens in a new tab)examples/faucet-source-acme/tests/conformance.rs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub faucet-hq/faucet-stream --plugin faucet11 skills in this plugin
/faucet-apiUse when integrating an application or service with `faucet serve` over HTTP: discovering the server's API and auth model, choosing which role's token a caller needs, registering, testing and launching templates over HTTP, rolling out a source and sink template change together, triggering template runs or raw config runs programmatically with idempotency keys, labels and an execution pool, polling a run until it is terminal and mapping its status and per-row results, finding runs by label, and decoding a 401, 403, 409, 422, 429 or 503 response from the API./faucet-debugUse when a faucet pipeline misbehaves: a `faucet run` failed or exited non-zero, a run is slow, stuck or behind its source (CDC / stream lag), the source is rate-limited or throttled, rows are missing or duplicated, rows landed in the dead-letter queue, wrong values landed in the destination, a bookmark needs moving or resetting, stored state will not read after an upgrade, a scheduled run was skipped, a run refuses to start because another holds the row, a connector fails with an auth or permission error, or a network failure: "error sending request", connection refused or reset, timeouts, DNS or TLS handshake errors, an IP allowlist, a proxy, or a connection that works locally but not in the cluster (or the reverse). Covers `faucet doctor`, `status`, `dlq`, `state`, `verify`, `rollback`, `profiling`, `explain`, `plan`, logs and Prometheus metrics./faucet-deployUse when deploying faucet to production or running it unattended: running pipelines on cron, systemd, Airflow, Dagster or Kubernetes (Job, CronJob, Deployment), using `faucet schedule`, standing up `faucet serve` with auth, RBAC, audit and run history, installing the Helm chart or choosing and building a container image, choosing a durable state backend, wiring Prometheus, OpenTelemetry, Grafana dashboards and alerts, setting up event triggers, checking that a build has the features a deployment needs, and hardening a deployment (TLS, secrets, log levels, network binds, least privilege)./faucet-migrateUse when migrating an existing Meltano project, Singer taps and targets, or Airbyte connections to faucet: reading and converting a meltano.yml (extractors, loaders, mappers, select and metadata, jobs, schedules, environments), choosing a native faucet connector, a Template Hub template or the Singer bridge for each tap and target, running an existing Singer tap or target inside faucet, moving incremental bookmarks and Singer state into faucet state so the first run does not re-sync, running old and new pipelines side by side, comparing them with `faucet verify`, and cutting over with a rollback path./faucet-operateUse when operating a running `faucet serve` (single node or `--cluster`): `/readyz` returning 503 or a member reported unhealthy, the run-history database degraded or unreachable, runs stuck in pending or running, queued runs piling up or a full queue, runs waiting on an execution pool no member serves, a cluster member gone or crashed, a run reclaimed or executed twice after a failover, cancelling, retrying or deleting runs, finding which member owns a run, draining a member, a rolling upgrade of a cluster, and querying or pruning run history./faucet-pipelinesUse when writing, editing, reviewing or debugging a faucet pipeline config (YAML/JSON run by the `faucet` CLI): moving data from one system to another (database, API, files, object storage, queue, warehouse), setting up an incremental sync, a CDC stream or a snapshot-then-CDC mirror, choosing write modes (append, upsert, delete, overwrite) and keys, adding transforms, PII masking, data-quality checks, data contracts, schema-drift handling or a data-flow policy, configuring state, dead-letter queues or exactly-once delivery, scheduling or backfilling a pipeline, generating per-table configs with discovery, and wiring credentials through secret references.Other plugins' skills for the same job