/vecten:connectorfrom Vecten Open
Walks through connecting a data source to a Vecten Open project using the `vecten` CLI: choose a dlt verified source or scaffold, store credentials, write connector code, run and record the first sync, and configure access.
Ships in Vecten Open. 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.
None: SKILL.md is the whole skill.
A source is connected when its code lives in connectors/<name>/connector.py, a local sync has
landed its objects in the warehouse schema raw_<name>, fixtures of that sync are recorded, the
human has said who may read the raw data, and vecten next --json lists nothing more for it.
This skill walks there in order. The human talks; you run the vecten commands in a shell.
vecten next --json lists an item with "kind": "skill" and "resolution": "connector".
Its title is Connect <source>; the word after "Connect" is the source the human asked for
during the intake.next also prints command items for a connector that is already declared: Add the <name> connector files, Run <name> locally, Record fixtures for <name>. Those are plain commands;
this skill explains what to do when one of them fails.
Read and change the project only through vecten commands run with --json. Each prints one
JSON document: "ok": true with its data, or "ok": false with error, code and code_name.
The exit code says how to react:
| Exit | Name | What to do |
|---|---|---|
| 0 | OK | Continue. |
| 1 | INTERNAL | A bug in vecten. Show the human the error and stop. |
| 2 | USAGE | The command line was wrong; the error says how. Fix it and rerun. From vecten secret set, "the secret value is empty" means your shell has no terminal for the hidden prompt: do not retry, ask the human to run it in theirs (step 3). |
| 3 | PREREQUISITE | Something is missing first; the error names the command that provides it. |
| 4 | REFUSED | The project's state forbids it; the error says why. Do not force it. |
| 5 | TOOL_FAILED | dlt or the source failed; the document carries the per-object outcomes. |
| 6 | CONFIG | A project file is invalid; the error names it. |
The files that are yours: connectors/<name>/connector.py and any helper module you add
beside it, and, when the human asks to change how the source is scheduled, its DAG files
orchestration/dags/sync_<name>_<group>.py (step 8). The CLI owns vecten.toml, .env, dbt/models/staging/sources.yml, .vecten/
and osi/datasets.json; never edit them, because the CLI writes them and reads them back as
its own record of the project.
A credential reaches the project one way only: the human types it at the hidden prompt of
vecten secret set <NAME>. See step 3 for why and how.
The source name becomes the schema raw_<name>, the DAG ids and the secret names, so pick it
once: lowercase letters, digits and underscores, starting with a letter, at most 63 characters.
Use the name from the Connect <source> item; otherwise agree a short one with the human
(hubspot, billing_db).
Ask the human for:
From the documentation note: the base URL, the authentication scheme, the pagination style,
the filter for "changed since" (incremental loading), the documented rate limit, the record key
of each object, and where the records sit in a response (data, results, a bare list).
Try the source's own name first:
vecten connector add <name> --json
It wires, in this order, a connector an installed extension provides, then a dlt verified
source. A verified source is the better path whenever it exists: its pagination, schema and
incremental state are maintained by the dlt project, and the code you would otherwise write is
already there under connectors/<name>/source/.
Exit 4 with "neither a dlt verified source nor a connector of an installed extension" means there is none; start from a generic scaffold instead, chosen by what the source is:
vecten connector add <name> --from rest --json for an HTTP API that returns JSON;vecten connector add <name> --from sql --json for a database reachable by an SQLAlchemy URL;vecten connector add <name> --from filesystem --json for CSV files in a bucket or a folder.A generic scaffold is code you write and the project owns, so it costs more care than a verified source; that is why it is the fallback.
Read the JSON the command prints:
files: what it wrote under connectors/<name>/, including test_<name>.py, which replays
the fixtures offline, and an empty fixtures/ directory. Output fixtures load directly into raw
tables. A source with an injectable reader can also test its parsing with saved input JSON
(--record --record-inputs). Check with the human that upstream fields are safe to save
before enabling input recording. Run vecten connector run <name> --json for a live sync;dags: the sync DAG, orchestration/dags/sync_<name>_default.py;secrets: the secret names the code reads, used in step 3;dependencies: Python packages a verified source needs; locked says whether the command
pinned them. With locked: true, every lock holds them and vecten's own environment has them.
With locked: false (a project without locks), the Airflow image installs them unpinned; for
vecten connector run on this machine, ask the human to install them where vecten runs, for
example uv tool install vecten --with <package>. A failed re-lock exits non-zero naming
vecten lock: the connector is added, and vecten up refuses until the locks are rewritten.Exit 4 with "already exists" means the directory is there: edit it rather than adding again.
vecten.toml now declares the connector, and the Connect <name> item is gone from next.
Use exactly the names in secrets. A generic scaffold declares one: <NAME>_API_KEY for rest
(whatever the API calls it: token, key, password), <NAME>_DATABASE_URL for sql and
<NAME>_BUCKET_URL for filesystem. These names are declared in vecten.toml, and the local
Airflow receives only declared names; a name you invent works from the laptop and fails in
Airflow.
Tell the human which secret to set and what value belongs in it ("your Demo API token, from Settings, API in Demo"), then have them type it:
vecten secret set DEMO_API_KEY
The command prompts with hidden input and stores the value in .env. When your shell is the
human's own terminal, run it and let them type. A shell without a terminal gives the prompt no
keyboard: the command reads an empty standard input and exits 2 with "the secret value is
empty". Then do not retry; ask the human to run the command in their own terminal in the project
folder. Either way, confirm by name only:
vecten secret list --json
names lists the secret; values are never printed.
Why this is the only way: anything you see lands in the conversation transcript, anything on a
command line lands in shell history and process lists, and anything in a file can be committed.
So never ask for the value in chat, never read it from the clipboard, a file or an environment
variable, never pipe it into vecten secret set and never pass it as an argument (the command
refuses that with exit 2), and never write it into connector.py. If the human pastes a
credential into the conversation anyway, do not repeat or use it: tell them it is now in the
transcript, ask them to rotate it at the provider, and have them set the new value at the prompt.
When the API needs a second credential (a client id beside a client secret), the scaffold
declares only the first. Ask the human to add the second name to that connector's secrets
list in vecten.toml, then set it the same way.
Skip this step for a verified or extension source, except to keep only the objects the human
chose: return _source(...).with_resources("<object>", "<object>") from source().
For a generic scaffold, open connectors/<name>/connector.py. It defines source(), which
returns a dlt source; replace every TODO from the documentation. For --from rest the
scaffold is a dlt rest_api_source config:
client.base_url: the API root, ending in /; resource paths then have no leading /.client.auth: keep the credential behind secret("<NAME>") with a name from step 3.
Bearer: {"type": "bearer", "token": secret("DEMO_API_KEY")}. A key in a header:
{"type": "api_key", "name": "X-Api-Key", "api_key": secret("DEMO_API_KEY"), "location": "header"}.client.paginator: the documented style. A next URL in the body: json_link with
next_url_path; a cursor in the body: {"type": "cursor", "cursor_path": "<path>", "cursor_param": "<param>"}; page numbers: page_number; offsets: offset; a Link
header: header_link.resources: one entry per object the human chose. Name each after its entity in the singular
(company for /companies): the name becomes the raw table, the fixture file and the object
that --object selects. Set endpoint.path, endpoint.data_selector when records are nested
in the response, and primary_key when it is not id.endpoint.params as
{"type": "incremental", "cursor_path": "<updated-at field>", "initial_value": "<ISO time>"}.
With write_disposition: merge and a primary key, a daily sync fetches only what changed.
Pick an initial_value early enough to cover the history the human wants.endpoint.params.For --from sql, set the schema and table_names; the connection URL stays in the secret. For
--from filesystem, set file_glob and yield one resource per file family.
Put no warehouse host, warehouse name or credential in the code: the destination comes from the
CLI. Once you change the scaffold, the next run records the connector as custom in
vecten.toml; that is the CLI marking the code as yours, not an error.
The sync needs the local warehouse. Exit 3 with "the warehouse is not reachable" means the stack
is down: run vecten up --json, then retry.
Before the first run, tell the human what a fixture is: --record writes up to 200 real
records per object to connectors/<name>/fixtures/<object>.jsonl. Those files are committed to
the project and replayed by the connector test and by vecten dbt-build-local, so they are real
data in git. Commit each <object>.schema.json beside its rows so replay preserves JSON columns,
table names and merge keys. Ask which objects hold personal data they do not want there.
After any later change to connector.py, run vecten connector run <name> --json again before
calling the change done. Output fixtures load saved rows directly. An input fixture also checks the
transformation, while a live sync exercises credentials, fetching and pagination.
Each object needs a fixture for offline builds. For sensitive or billed sources, set
record = false in the connector's [[connectors]] entry in vecten.toml. Supply invented
rows in connectors/<name>/fixtures/<object>.jsonl, one JSON object per line. Run
vecten connector check-fixtures <name> to check the JSON and names against the declared
object groups without opening the source. Use this route whenever recording is disabled.
For recording, use vecten connector run <name> --record --limit 3 --json to sample three
rows per object. This replaces the object's local raw data with the sample. A paginated
connector can read runtime().record_limit from vecten_platform.sync to size each request
before the source bills it. Define redact_fixture(object_name, row) in connector.py to
return a sanitized row before the sample reaches the local warehouse or fixture file.
Ask before the first run, because a table a sync has landed stays declared in
dbt/models/staging/sources.yml, a file the CLI writes and you never edit. When an object the
human now wants out was already synced or recorded, drop it from connector.py, delete its
connectors/<name>/fixtures/<object>.jsonl, its companion <object>.schema.json and any
inputs/<object>.json beside the output fixtures, then run vecten connector run <name> --record --json
again, and tell the human that its table entry stays in sources.yml until they remove it by
hand.
Read the result. objects maps each object to {"ok", "rows", "error"}, tables lists
every raw table of the source that dbt/models/staging/sources.yml now declares, and recorded
says whether fixtures were written. On exit 5 the same document carries objects: fix the
failed object and rerun only it with --object <object> --record; the run record keeps the
other objects' outcomes.
| What you see | What it means | What to do |
|---|---|---|
| Exit 3, "secret X is not set" | The human has not set it | Step 3 for that name. |
401 or 403 in an object's error | The value is wrong, expired or lacks a scope | Ask the human to set it again with vecten secret set <NAME> and to check its permissions at the provider; change no code first. |
429 in an error | The rate limit was hit | Request the largest page size the documentation allows, so the sync needs fewer requests; wait out the Retry-After delay before rerunning, stay within the documented limit, and run objects one at a time with --object. |
404 in an error | The path or base URL is wrong | Check base_url ends in / and the path against the documentation. |
| Exit 5, "source() failed" | connector.py raised before any object ran | Read the exception and fix the code. |
| Exit 2, "has no object" | The --object name is not a resource | Use one of the names the error lists. |
An object with "rows": 0 | It yielded nothing, so a recording keeps no fixture for it | Confirm the scope with the human: is that object empty in their account, does the credential cover it, is initial_value too recent, is data_selector right. Ask the human for representative invented values if the object needs a synthetic fixture. |
vecten raw schema <name> --json
It prints {"source": "<name>", "schema": "raw_<name>", "tables": [{"name": ..., "columns": [{"name": ..., "type": ...}]}]}. Show the human each table with its columns and types, and
point out what dlt did: nested lists became child tables named <table>__<field>, the
_dlt_load_id and _dlt_id columns are dlt's bookkeeping, and dates often land as text, which
the model skill casts. Ask whether these are the objects and fields they expected; a missing
field usually means a wrong data_selector or a resource that was not added. An empty tables
list means no sync has landed yet: back to step 5.
vecten next --json now asks Who may read the <name> raw data?. Put the question to the
human word for word, offer the groups listed in the item's allowed, and record the answer,
comma-separated for several groups:
vecten answer access.<name> <groups> --json
Tell the human how the source runs from here. vecten connector add wrote one sync DAG per
object group, orchestration/dags/sync_<name>_<group>.py, running daily in UTC with catch-up
off; a connector from an extension may come with several groups on their own schedules. In the
local Airflow that vecten up starts, a new DAG appears paused; once unpaused, it syncs the
latest whole day at once, then runs after each midnight. To load now without Airflow,
vecten connector run <name> syncs from this machine. In a deployed environment a new DAG
starts unpaused, unless that environment's deploy/envs/<env>.tfvars sets
dags_paused_at_creation = true; then it starts paused and runs only once someone unpauses it
in that environment's Airflow. A sync whose object fails publishes nothing, so the dbt build
does not run on partial data.
Each DAG file is one call to build_sync_dag. When the human asks for one of the following,
add the keyword to that call rather than writing a DAG by hand:
| The human wants | Keyword |
|---|---|
| A run at a local time | schedule="0 6 * * *", timezone="Europe/Warsaw" |
| A child object that reads its parent's ids | stages=[["<parent>"], ["<child>", ...]]: each stage starts once the one before it synced |
| A backfill start date or a per-run cap on manual runs | params={"since": Param(None, type=["null", "string"])}, with from airflow.sdk import Param. Every parameter reaches source() as a keyword argument, so give source() the same parameter with a default, which is what vecten connector run uses |
| An API rate limit shared with another DAG | pool="<pool>"; the pool must exist in Airflow, so ask the human to create it (Admin, Pools) in every environment, or the object tasks never start |
| A switch that stops syncing, such as a quota flag | guard=<function>, defined in the DAG file, returning false to skip the run without failing it |
| The DAG to stay paused until someone unpauses it | paused_at_creation=True; it applies only when Airflow first sees the DAG |
After changing source()'s parameters, run vecten connector run <name> --json again to
prove the connector still syncs.
Run vecten next --json. The source is done when no item names it: no Connect <name>,
Add the <name> connector files, Run <name> locally, Record fixtures for <name> or Who may read the <name> raw data?. The next items are usually Model <table> from raw_<name>.<table>,
which belong to the model skill; go back to the loop that dispatched you.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub vecten/vecten-open --plugin vecten5 skills in this plugin
/guideThe entry point for building a Vecten Open data platform with a human, from an empty folder to a deployed platform with its first user: loop on `vecten next --json`, put each `ask` item to the human word for word and record the answer with `vecten answer`, run each `command` item, hand each `skill` item to the connector, model or semantic skill, and stop when the list is empty. Use this skill whenever the human wants to build, try out, extend or deploy a data platform, a data warehouse or an MCP server over their company's data, or names vecten with nothing more specific, even if they never mention `next`./modelShape a Vecten Open source's raw tables into dbt staging views, snapshots, core entities and marts that follow the project's schema convention, then build and test them with `vecten dbt-build-local` until green so `osi/datasets.json` is regenerated. Use this skill whenever `vecten next --json` lists a `skill` item resolved by `model` (titles such as "Model `company` from `raw_hubspot.company`", "Snapshot staging_...", "No core model reads ...", "Describe ..."), and whenever the human asks to model, clean, transform or join loaded data or to build a table or mart for reporting, even if they never say "dbt"./operateRun a deployed vecten platform: loop on `vecten issues --json`, read each issue's evidence through `vecten issues show`, and resolve it by dispatching the connector, model or semantic skill, running the command it names or relaying its question, delivering every code fix as a pull request, for each environment of the promotion order, the first first, and asking the human before promoting a fix. Use when a failure alert arrives ("ask your agent: vecten issues show ..."), when a human asks what is broken in production, or after a deploy to keep the platform green./semanticAuthor and repair business definitions in a vecten project's Ossie model, refine an existing warehouse's introspected datasets, and turn reported gaps into validated pull requests with regression evals. Use when vecten next names semantic, a human asks to define or correct a metric, or an admin asks to investigate a gap. Route missing source data to connector and missing mart columns to model; do not use this skill to administer warehouse access.Other plugins' skills for the same job