agentleFS
Google CloudKnown publisherGoogleCloudPlatform/cloud-solutions/projects/legacy-detox-demo/skills/pipeline-generator/SKILL.md

pipeline-generator

Skill135 starsChanged 6 months agoApache-2.0View on GitHub

This is the coordinator skill that orchestrates the end-to-end creation of Spark-centric and BigQuery-centric data pipelines for a new use case. It manages the user interview, schema investigation, architecture recommendation, and delegates code generation to specialized sub-skills. Prompt the user to understand the new use case. Ask: 1. Business Goal: What is the prediction target? (e.g., churn, recommendation). 2. Datasets: What are the input BigQuery tables? 3. Features & Label: What are the features and the target label? 4. Data…

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Model Complexity: Do they need a simple model (like Logistic Regression) or a complex one (like Random Forest or XGBoost)?

    line 25
  2. Very specific:

    Use the bq CLI tool to inspect the schemas of the tables provided by the user.

    line 30
  3. Very specific:

    If generating the Spark-centric notebook (spark_centric_<use_case>.ipynb), apply the following sub-skills:

    line 65
  4. Distinctive:

    Use to generate the Dataproc Serverless session with Lightning Engine.

    line 69
  5. Distinctive:

    [zero-copy-ingestion](../zero-copy-ingestion/SKILL.md): Use to generate the BigQuery data loading code using the connector.

    line 70
  6. Distinctive:

    [model-evaluation](../model-evaluation/SKILL.md): Use to generate the evaluation section (Accuracy or AUC-PR/Confusion Matrix).

    line 72
  7. Very specific:

    If generating the BigQuery-centric notebook (bq_centric_<use_case>.ipynb), apply the following sub-skills:

    line 80
  8. Distinctive:

    [bigframes-bqml](../bigframes-bqml/SKILL.md): Use to generate the feature engineering and BQML training code.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Skill: Zero-Copy Pipeline Generator (Coordinator)

<!-- Disabling markdownlint MD029 to provide explicit ordering to avoid confusing the LLM. --><!-- markdownlint-disable MD029 -->

This is the coordinator skill that orchestrates the end-to-end creation of Spark-centric and BigQuery-centric data pipelines for a new use case. It manages the user interview, schema investigation, architecture recommendation, and delegates code generation to specialized sub-skills.

Workflow

1. User Interview

Prompt the user to understand the new use case. Ask:

  1. Business Goal: What is the prediction target? (e.g., churn, recommendation).
  2. Datasets: What are the input BigQuery tables?
  3. Features & Label: What are the features and the target label?
  4. Data Prep Logic: How should the data be prepared/joined?
  5. Model Complexity: Do they need a simple model (like Logistic Regression) or a complex one (like Random Forest or XGBoost)?

2. Schema Investigation

Use the bq CLI tool to inspect the schemas of the tables provided by the user.

  • For each table, run:

    bq show --format=prettyjson <project_id>:<dataset_id>.<table_id>
  • Analyze the schema to confirm column names, types, and nullability. Present a summary to the user.

3. Solution Recommendation

Based on the interview and schema, propose the architecture:

  1. Pipeline Options:
    • Spark-Centric: Recommend if the user has existing Spark workloads, needs custom PySpark logic, or prefers Spark MLlib.
    • BigQuery-Centric: Recommend if the user wants a NoOps, SQL-backed pipeline using BigQuery DataFrames.
  2. Serving Options:
    • Lean JSON: Recommend if using Spark + Simple Model (Logistic Regression).
    • ONNX: Recommend if using Spark + Complex Model (Random Forest/XGBoost).
    • Native BQML: Recommend if using BigQuery-Centric pipeline.

Get the user's approval on the recommendation before proceeding.

4. Orchestrating Sub-Skills for Code Generation

Once approved, generate the notebooks by activating the relevant sub-skills:

Spark-Centric Pipeline Generation

If generating the Spark-centric notebook (spark_centric_<use_case>.ipynb), apply the following sub-skills:

  1. spark-lightning-optimization: Use to generate the Dataproc Serverless session with Lightning Engine.
  2. zero-copy-ingestion: Use to generate the BigQuery data loading code using the connector.
  3. model-evaluation: Use to generate the evaluation section (Accuracy or AUC-PR/Confusion Matrix).
  4. unified-model-registry: Use to generate the model saving and serving code (Lean JSON or ONNX export, Vertex AI registration).

BigQuery-Centric Pipeline Generation

If generating the BigQuery-centric notebook (bq_centric_<use_case>.ipynb), apply the following sub-skills:

  1. zero-copy-ingestion: Use to generate the BigFrames data loading code.
  2. bigframes-bqml: Use to generate the feature engineering and BQML training code.
  3. model-evaluation: Use to generate the evaluation section.
  4. unified-model-registry: Use to generate the BQML export and Vertex AI Endpoint deployment code.

Batch Prediction Script

Generate predict_job_<use_case>.py (PySpark) if the Spark pipeline is chosen, ensuring it loads the model from GCS and writes predictions back to BigQuery.

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.