> ## Documentation Index
> Fetch the complete documentation index at: https://import-docs.prequel.co/llms.txt
> Use this file to discover all available pages before exploring further.

> Help the user complete the initial setup of a Prequel Import environment by constructing curl commands to add and manage resources in Prequel Import. The skill walks through the full first-time setup flow, including creating a Datalake, Destination, Product, Provider, Source, Dataset, Stream, Extract, and Load. Use whenever the user mentions Prequel Import setup, onboarding a new customer, tenant, or Provider, creating a Datalake, Destination, Stream, Extract, or Load, or asks how to wire up a Prequel pipeline.

# SKILL

# Prequel Import Quickstart

**Execute curl commands directly using the shell.** This skill is agent-driven: you construct each curl, run it, and report the response back to the user.

**At every call, require the user to set secrets as environment variables before you run the curl.** Never request secrets from the user in-line. Reference secrets as shell variables such as `$PREQUEL_API_KEY` and instruct the user to add any required secrets to their environment before running commands.

## Sources of truth

The OpenAPI spec is authoritative for request bodies, paths, methods, enums, and field names.

The OpenAPI spec is at `https://import-docs.prequel.co/openapi-import-generated-2023-12-01.json`. The docs index is at `https://import-docs.prequel.co/llms.txt`. The human-readable setup order, prerequisites, and walkthrough live in the quickstart guide at `https://import-docs.prequel.co/getting-started/quickstart.md`. Follow the order documented there to guide onboarding.

## Build context before starting

Fetch the human quickstart guide at `https://import-docs.prequel.co/getting-started/quickstart.md` once at the start for the canonical setup order, prerequisites, and per-step pointers. Fetch core-concept pages listed in `https://import-docs.prequel.co/llms.txt` and OpenAPI entries by `operationId` on demand per step. Do not bulk-fetch the concept pages upfront.

Note: This skill is scoped to Prequel Import only; Prequel Export is out of scope.

## Prequel import overview

Prequel Import is a developer tool that helps software platform developers pull tenanted data into their platform by connecting to data platforms (Snowflake, BigQuery, Databricks, S3, Postgres, etc.) owned by their users and customers. For example, a usage-based-billing platform may wish to import usage events from each customer, a marketing technology platform may wish to import audiences and persons, or a CRM may wish to import deals and activities.

## Resource model

* **Provider** is one tenant. **Source** is the tenant's database. **Dataset** is one table or query to replicate.
* **Datalake** is object storage that backs replication. **Destination** is a delivery endpoint. **Product** is a named group of Destinations.
* **Stream** maps a Dataset to a Destination. **Extract** pulls rows into the Datalake. **Load** delivers mapped rows to the Destination.

For the full conceptual model, fetch `https://import-docs.prequel.co/core-concepts/dataflow.md`.

## Before starting

Confirm with the user that they have the prerequisites listed in the quickstart guide, namely a Prequel API key, object storage credentials for their Datalake, and a delivery endpoint for their Destination. The same `X-API-Key` header targets either production or staging. Which environment a request reaches is determined entirely by which key the user provides, not by a different base URL.

If the user has not yet completed the prerequisites, point them at `https://import-docs.prequel.co/getting-started/quickstart.md` and stop.

## How to drive the setup

For each resource the user creates, follow this loop:

1. Refer to the setup order documented in the quickstart guide and tell the user what the next step is and why.
2. Fetch the request schema from the OpenAPI spec by `operationId` using `curl` + `jq` (not WebFetch) to ensure output does not get truncated.
3. Identify which required fields the user has not yet supplied. Ask for them in plain language and group related fields in a single question. Secrets are excluded from this list, since the user must export them as environment variables.
4. Construct the full curl command with user-supplied values inlined and secrets referenced as shell variables such as `$PREQUEL_API_KEY`.
5. Confirm the required environment variables are exported in your shell. If any are missing, stop and instruct the user to export them before continuing.
6. Run the curl using the shell. Show the user the exact command you ran and the response you received.
7. On a 2xx response, capture any returned identifiers that downstream resources will need. On a non-2xx response, surface the response verbatim, point at the relevant docs page or spec field, and propose a fix.
8. Move on to the next resource.

## Verification

Verify the pipeline at each stage:

1. The Extract reached `status: "succeeded"` with a non-zero record count.
2. The test-transform output covered every required field in the Destination's `record_schema` with the correct type.
3. The Load reached `status: "succeeded"`.
4. Records arrived at the Destination through a webhook receipt, datalake query, or customer dashboard.

If any check fails, surface the failing response and the resource ID to the user. Re-fetch the relevant spec entry and docs page before suggesting a fix. Do not propose blind retries, since they mask schema or auth issues that will recur on the next resource.
