agentleFS
sdhilip200sdhilip200/api-warehouse/skills/land/SKILL.md

land

Skill0 starsChanged 5 months agoMITView on GitHub

Use whenever the user wants to load/extract/ingest API data into a warehouse or blob, build a dlt pipeline, or land raw data into BigQuery, Snowflake, Postgres, Azure, or local files — even if they don't say "land". Trigger phrases: "load raw data", "build a dlt pipeline", "ingest into DuckDB", "land the data", "run the pipeline", "extract API data", or any request to move API data into a destination table.

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use drift-audit, fix and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mr-fumanchuSkill

    drift-audit

    Audit a project's CLAUDE.md against its memory files to find duplicated or drifting rules, then consolidate them into a single source of truth. Use when Tony says "drift audit", "check for drift", "audit memory vs CLAUDE.md", "find duplicated rules", "clean up memory duplication", or wants to reconcile CLAUDE.md and memory so a rule never lives in two places. Read-only by default; never edits or deletes anything without explicit approval.

    Also in 3 projects that use this

  • Google CloudSkill

    fix

    Plan a remediation strategy after a test failure.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    build

    Build the TypeSpec Rust emitter from source. Run this after cloning the repo, after pulling changes, or when TypeScript source files have been modified.

    Also in 4 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 4 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    Also in 4 projects that use this

  • GoogleSkill

    codebase-design

    Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for the user's answer before continuing.

    line 38
  2. Very specific:

    Check references/security.md for the security rules.

    line 44
  3. Distinctive:

    Do not proceed until the user confirms.

    line 56
  4. Very specific:

    Read endpoints.json to inspect auth.type.

    line 62
  5. Very specific:

    Check MEMORY.md for any destination-specific or API-specific quirks before writing the final script.

    line 141
  6. Very specific:

    Before running the script, spin up a grader agent with a clean context.

    line 150
  7. Distinctive:

    If the run fails:

    line 171
  8. Very specific:

    Do not run validate automatically — wait for the user to proceed.

    line 189

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “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

land — Generate and Run a dlt Raw-Landing Pipeline

Overview

This skill generates a dlt pipeline script from the endpoints.json produced by assess, then runs it to land raw data in the chosen destination. No transformation logic is added here. Transformation (dbt, modeling) is out of scope for this plugin and belongs in a separate downstream pipeline.

Pre-requisite: endpoints.json must exist in the project root. Run assess first if it is missing.


Step 1 — Choose a Destination

Ask:

Which destination should we land the data into? Common choices: DuckDB (local file, good for dev), BigQuery, Snowflake, Redshift, Postgres. A files/blob destination (Parquet or CSV via dlt's filesystem destination) is also supported — see ../../references/destinations.md for the dlt.destinations.filesystem call and the environment variables it requires.

See references/destinations.md for the exact dlt.destinations.* call and the environment variables each destination requires.

Wait for the user's answer before continuing.


Step 2 — Confirm Secrets

Check references/security.md for the security rules. Then ask:

Please confirm that all required secrets (API tokens, warehouse credentials) are set as environment variables in your shell before we generate the script — do not paste them here.

For example:

export MY_API_TOKEN="sk-..."

Confirm the variables are set, then we'll proceed.

Do not proceed until the user confirms.


Step 3 — Generate the Pipeline Script

Read endpoints.json to inspect auth.type. Generate the appropriate variant below and save it as pipeline_land.py in the project root.

Variant A — No Auth

"""Raw-landing pipeline — generated by api-warehouse land skill."""
import json
import dlt
from dlt.sources.rest_api import rest_api_source
from api_warehouse.pipeline import build_rest_api_config

# Load the spec produced by `assess`
with open("endpoints.json") as f:
    spec = json.load(f)

# Build the dlt rest_api config (no auth)
config = build_rest_api_config(spec)
source = rest_api_source(config)

# Run into destination — RAW LANDING ONLY, no transformation
pipeline = dlt.pipeline(
    pipeline_name="api_warehouse_land",
    destination=dlt.destinations.duckdb("warehouse.duckdb"),  # change as needed
    dataset_name="raw",
)
load_info = pipeline.run(source)
print(load_info)
# Rows loaded per resource (verifiable by eval loop):
try:
    for table, count in pipeline.last_trace.last_normalize_info.row_counts.items():
        if not table.startswith("_dlt"):
            print(f"  {table}: {count} rows")
except Exception:
    pass

Variant B — Bearer Token Auth

"""Raw-landing pipeline — generated by api-warehouse land skill."""
import json
import os
import dlt
from dlt.sources.rest_api import rest_api_source
from api_warehouse.pipeline import build_rest_api_config

# Load the spec produced by `assess`
with open("endpoints.json") as f:
    spec = json.load(f)

# Read the secret from the environment — never hard-code tokens
token_env = spec["auth"]["token_env"]          # e.g. "MY_API_TOKEN"
secrets = {token_env: os.environ[token_env]}

# Build the dlt rest_api config with bearer auth
config = build_rest_api_config(spec, secrets)
source = rest_api_source(config)

# Run into destination — RAW LANDING ONLY, no transformation
pipeline = dlt.pipeline(
    pipeline_name="api_warehouse_land",
    destination=dlt.destinations.duckdb("warehouse.duckdb"),  # change as needed
    dataset_name="raw",
)
load_info = pipeline.run(source)
print(load_info)
# Rows loaded per resource (verifiable by eval loop):
try:
    for table, count in pipeline.last_trace.last_normalize_info.row_counts.items():
        if not table.startswith("_dlt"):
            print(f"  {table}: {count} rows")
except Exception:
    pass

Adapt the dlt.destinations.* call to match the user's chosen destination (see references/destinations.md for BigQuery, Snowflake, Redshift, Postgres variants).

Check MEMORY.md for any destination-specific or API-specific quirks before writing the final script.

Show the full generated script to the user and ask them to confirm before running.


Step 4 — Self-check (Evals)

Before running the script, spin up a grader agent with a clean context. Give it EVALS.md and the generated pipeline_land.py. Follow the loop defined in ../../references/running-evals.md. Fix any fail verdicts before proceeding. On platforms without subagents (e.g. Codex), run the same checklist inline in a fresh reasoning pass instead — see ../../references/running-evals.md.


Step 5 — Run the Script

Once evals pass and the user confirms, run:

python pipeline_land.py

Parse load_info to report rows loaded per resource:

Resource: posts       rows loaded: 100
Resource: comments    rows loaded: 500

If the run fails:

  • Auth errors: re-check that env vars are set and match endpoints.json token_env.
  • Destination errors: re-check credentials per references/destinations.md.
  • Schema errors: share the traceback with the user and suggest re-running assess.

For any user-facing text in the report, apply the checks in ../../references/anti-slop.md — cut filler, keep field names and row counts.


Step 6 — Checkpoint

Tell the user:

Raw landing complete. Data is in the raw dataset in your destination. Resource row counts above. Next step: run validate to reconcile counts against the source API and confirm completeness.

Do not run validate automatically — wait for the user to proceed.

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.