/faucet:faucet-apifrom faucet
Guides building an HTTP client for faucet serve's /v1 API: discovering auth, registering templates, triggering runs with idempotency keys, polling for results, and handling error responses.
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.
faucet serve from another serviceA calling service talks to faucet serve over its /v1 HTTP API: it
registers templates, triggers runs, polls them and reads their results. This
skill is the procedure for building that client so it is correct, retry-safe
and never leaks a credential.
Standing the server up is the faucet-deploy skill; keeping it healthy is
faucet-operate; what may go into a request body is faucet-secrets.
Writing the templates themselves is faucet-templates.
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 server is a faucet binary too: the API a client may use is the one that
server's release serves. Its version is the version label of the
faucet_build_info metric on its unauthenticated /metrics endpoint.
Never write a client from memory or from this skill.
/metrics (faucet_build_info).docs/openapi.yaml in
the faucet-stream repository at the tag faucet-cli-v<version>
(docs/openapi.yaml
on main is the newest). A CI test keeps it in step with the router, so
every path, request field, response field and status code is there.The server has roles, and each route needs a permission (role × route matrix).
GET /v1/whoami: it returns the principal,
role and permissions the server actually granted. Check it at the
client's start-up and fail loudly on a mismatch.Authorization: Bearer header from a secret store,
never from code or a log line.Templates are registered once and triggered many times (Registering a template).
faucet template test <file> and faucet hub check (the
faucet-templates skill).POST /v1/templates. Registration runs the version's tests:
bundle and records the result; read it in the response.POST /v1/templates/{id}/versions/{version}/test) before launching.422 whose details list the failing cases: fix the
template, do not look for an override.Trigger a template by POST /v1/templates/{id}/runs, or submit a whole config
by POST /v1/runs (Triggering over HTTP).
Read the exact request fields from the OpenAPI document. For every trigger:
GET /v1/templates/{id} returns them), so a batch fails before any run
starts instead of halfway through.409
(Idempotency).422 as a deployment problem, not a retry.faucet-secrets skill: a non-secret param is
echoed in the response and stored with the run.GET /v1/runs/{id} with exponential backoff and a deadline, until
the status is terminal. On a cluster a new run first shows as pending.GET /v1/runs/{id}):
one failed stream does not hide the others, so report per stream.GET /v1/runs?label=key:value, repeated to AND several
labels
(GET /v1/runs).
An unknown query parameter is a 400, so a typo cannot silently match
every run.Every error has the same envelope
(Error envelope).
Read error.code, error.message and error.details; the message names the
cause. Decide by status:
| Status | Meaning for the client | Next step |
|---|---|---|
401 | Token missing or wrong | Fix the secret; never retry blindly |
403 | Role lacks the permission, or the body reads the server's own credentials | GET /v1/whoami, then Step 2 |
409 | Idempotency key reused with a different request, a row already running, or an approval gate | Read the message; a changed request needs a new key |
422 | The request is wrong | Read the message (below); do not retry unchanged |
429 | Queue full | Retry after Retry-After |
503 | Draining, or history degraded (an idempotency-keyed submit is refused) | Retry with backoff; see faucet-operate |
Common 422 causes, each named in the message: a param the template does not
declare (Step 3.6), a required param missing, a value outside a param's
closed set, a literal credential or a credential-named param that is not
secret: true in a registered template, a secret: true value sent to a
clustered server without a vault key (faucet-secrets), a pool nobody
serves, a launch onto a failing version. Fix the request or the template,
then send a new request.
GET /v1/whoami checked at start-up429, 503 and transport errors, and only for calls
that carry an idempotency key or are readsfaucet-secrets)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/faucet-connectorUse when writing a new faucet source or sink connector in Rust: scaffolding a faucet-source-* or faucet-sink-* crate (or a faucet-common-* crate shared by a pair), implementing the Source or Sink trait from faucet-core, adding a config struct with a JSON Schema, streaming pages with bounded memory and resumable bookmarks, making a sink idempotent or effectively-once (keyed upsert or atomic watermark), mapping failures to typed FaucetError variants so retries behave, passing the faucet-conformance battery, publishing the crate to crates.io, running it from a custom faucet binary, or listing it in the connector registry index./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.npx claudepluginhub faucet-hq/faucet-stream --plugin faucetOther plugins' skills for the same job