/dak:gcp-dataflowfrom dak
Guides writing, packaging, executing, and troubleshooting Apache Beam pipelines on Google Cloud Dataflow. Covers Flex Templates, Cloud Build integration, and diagnostics for job health, bottlenecks, and autoscaling.
Ships in dak. 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.
Use this section when implementing Dataflow pipeline logic using Apache Beam.
Google provides a variety of pre-built, open source Dataflow templates that can be used for common scenarios. Before implementing a pipeline from scratch, you MUST follow the steps below to check whether a Dataflow template for the pipeline logic you need to implement already exists.
Step 1: Check for a matching Google Dataflow Template
dataflow-templates bucket:
gs://dataflow-templates/latest.gs://dataflow-templates/latest/flex. Use
gcloud storage ls to list the contents.Step 2: Confirm template selection
Use this section when creating a new project for a Dataflow pipeline from scratch.
requirements.txt, and other similar files where versions
are specified.Use this section when configuring a Dataflow Java pipeline project using gradle.
com.github.johnrengelman.shadow) unless the user explicitly requests a
Fat Jar.application plugin for
passing command-line parameters.slf4j-api version pulled transitively by Apache Beam.slf4j-simple,
logback-classic, etc.) to exactly match the major/minor version of the
resolved slf4j-api.Use this section to package pipeline code as a Flex template.
Flex Templates offer a hermetic and reproducible launch environment for a
pipeline. They are easy to launch with gcloud or with orchestrators like Cloud
Composer. You MUST package the pipeline as a Flex Template when creating new
Dataflow pipeline projects.
Follow the steps below:
--sdk_container_image). Does the Python
pipeline require extra dependencies (e.g., using --requirements_file,
--setup_file, or --extra_package)? If so, YOU MUST recommend the
Single Docker Image Configuration for the Flex Template. See
python_flex_template_reference.md for details.cloudbuild.yaml out-of-the-box for
building and pushing images unless local setup is explicitly requested.DoFn.setup() lifecycle using the Secret
Manager client library (writing them to ephemeral worker disk like
/tmp only if physical file paths are strictly required). Ensure the
Dataflow Worker Service Account has the
roles/secretmanager.secretAccessor role.Use this section when the user has selected a Google-provided template (Classic or Flex) and you need to configure it.
Step 1: Get template metadata
gs://dataflow-templates and end
with _metadata (e.g.,
gs://dataflow-templates/latest/Word_Count_metadata).gs://dataflow-templates/latest/flex (e.g.
gs://dataflow-templates/latest/flex/Cloud_Datastream_to_BigQuery).javascriptTextTransformGcsPath,
javascriptTextTransformFunctionName), refer to the
UDF guide to write and configure the UDF.extraFilesToStage
parameter. The runner will drop them into /extra_files on worker
VMs. Refer to the SSL certificates guide for local
referencing syntax (/extra_files/...).Step 2: Get network configuration
gcloud commands to list networks and subnetworks.Step 3: Identify required parameters and prepare resources
[!IMPORTANT]
Strict parameter validation: Any parameter in the metadata JSON
that does NOT explicitly have
"isOptional": trueis **strictly
required** by the Dataflow API.
This applies even if the description suggests it has a default value
(e.g.,
csvFormatorbadRecordsOutputTablein some templates).
You must identify and supply all of them.
schemaJSONPath
or JSONPath) is required:
Different templates might require specific resources to be prepared in the target sink before execution. Follow the instructions for your target sink below.
When running templates that write to BigQuery, you MUST ensure the following resources are prepared to prevent job failures:
bq mk) before launching the job. Ensure the schema matches the template's
expectations.badRecordsOutputTable or outputDeadletterTable). Some templates attempt
to auto-create this table. However, pre-creating it is a best practice. This
ensures correct schema and permissions.
v1/ or v2/ directories).badRecordsOutputTable or outputDeadletterTable).PubSubToBigQuery.java, the
schema is set using
ResourceUtils.getDeadletterTableSchemaJson(). Tracing
ResourceUtils.java shows it loads the schema from
streaming_source_deadletter_table_schema.json on GitHub.RawContent/ErrorMsg schema shown in the
CSV to BigQuery DevSite Doc.Use this section when preparing to run a custom Apache Beam pipeline on Dataflow.
When launching Python Pipelines without a Flex Template with
DataflowRunner, you MUST scan the pipeline project directory for the
following files:
requirements.txt:
--requirements_file pipeline option.setup.py:
--setup_file pipeline option. This is
critical if the pipeline uses local modules or packages.When launching Python Pipelines with a Flex Template, if the Flex Template
image is also the SDK Container image (Single Docker Image Configuration),
then you MUST supply the image in the sdk_container_image parameter.
your-gcp-project-id) for GCP
resources when drafting run scripts or configs. Action: If values are
unknown, proactively run commands like gcloud config get-value project to
find active resources to pre-fill scripts for the user. Confirm the values
with the user before proceeding.Use this section when configuration is complete and you are ready to launch any Dataflow job (Google-provided template, Custom Flex template, or standalone pipeline).
gcloud dataflow flex-template run or
python main.py --runner=DataflowRunner). Ensure workers default to private
IP configuration unless specified otherwise, and verify target project
permissions.Use this section to monitor the progress of a running Dataflow job.
RUNNING or DONE state.[!IMPORTANT] YOU MUST use this section when the user asks about performance of their Dataflow pipelines. This can be used to debug issues like pipeline slowness, pipeline failures, etc.
Understand User Request: Extract Job ID, Project ID, Transform Name (optional), and Time Window.
Transform Name Mapping: If the user requires transform-based debugging,
map user-provided Transform Names to actual Dataflow stage or ptransform
and apply to filters while querying:
This mapping can be extracted from gcloud dataflow jobs describe JOB_ID --full --format="json(pipelineDescription.executionPipelineStage)".
name property at the parent stage level. This
matches "F[digit]" (e.g. "F6").componentTransform array, read
precisely from userName or originalTransform (e.g.
"RateLimitAndLog/ParMultiDo(RateLimitAndLog)"). and use it as
ptransform.resource.labels.step_id="[Extracted ptransform name]".metric.labels.ptransform="[Extracted ptransform name]" or
metric.labels.stage="[Extracted stage_id]".Query Telemetry:
Analysis:
Output: Provide a synthesized diagnosis containing symptoms, root
causes, and target code links (using file:///... format). Refer to
reporting_findings.md for report structure, evidence
standards, and verification guidelines. Strictly follow the appropriate
response structure for the job type:
For Streaming Jobs:
job/data_watermark_age / job/per_stage_data_watermark_age and system
lag.job/elements_produced_count / job/estimated_bytes_produced_count.job/estimated_backlog_processing_time / job/backlog_bytes.job/is_bottleneck (interpreting likely_cause / bottleneck_kind)
and key metrics job/backlogged_keys /
job/processing_parallelism_keys interpreted in the context of
bottlenecks_and_parallelism_context.job/horizontal_worker_scaling (and label rationale), clamp limits
(job/max_worker_instances_limit / job/min_worker_instances_limit),
and utilization hints in the context of
streaming_horizontal_autoscaling_analysis.file:/// URIs).For Batch Jobs:
job/elements_produced_count (primary performance indicator).file:/// URIs).references/bottlenecks_and_parallelism_context.md (opens in a new tab)references/dataflow_diagnostics_reference.md (opens in a new tab)references/dataflow_metrics_bigquery.md (opens in a new tab)references/dataflow_metrics_core_job.md (opens in a new tab)references/dataflow_metrics_pubsub.md (opens in a new tab)references/dataflow_metrics_streaming_engine.md (opens in a new tab)references/python_flex_template_reference.md (opens in a new tab)references/reporting_findings.md (opens in a new tab)references/streaming_horizontal_autoscaling_analysis.md (opens in a new tab)references/streaming_job_health.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
apache-beam, dataflow, flex-templates, cloud-build, pipeline-diagnostics
41 skills in this plugin
/accidental-data-loss-prevention**STOP AND VERIFY**: Before running any command or tool that results in irreversible data loss, you MUST obtain explicit user consent.
When in doubt, ask. It is better to wait for confirmation than to accidentally delete production data or critical project assets.
Use this for:
- SQL: DROP TABLE/VIEW/SCHEMA/DATABASE, TRUNCATE, or broad DELETE (missing WHERE or using 1=1).
- Cloud Storage: gsutil rm or gcloud storage rm targeting production data or critical buckets.
- Infrastructure: gcloud projects delete, deleting Spanner/BigQuery/Dataproc resources, deleting secrets, or KMS key destruction.
/bigquery-ai-mlLeverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity, summarize content, translate language, evaluate models, filter by semantic conditions, measure the causal effect of an intervention, compute correlations between columns, generate descriptive statistics and table distribution profiles, detect change points or structural breaks, extract trend or seasonality components, or leverage generative AI capabilities in BigQuery. Do not use for general BigQuery dataset, table, or job management requests./bigquery-bigframesGenerates Python code using BigQuery DataFrames (BigFrames). Use by default for any Python data task involving BigQuery, including data processing, analysis, and machine learning. Don't use for SQL-first workflows or the google-cloud-bigquery client library — use bigquery-basics./bigquery-data-transfer-serviceDiscovers and inspects BigQuery Data Transfer Service (DTS) configurations. Use this to identify existing ingestion pipelines and extract datasource or transfer config metadata for data pipelines. Use when a user asks for ingestion scenarios while building or managing data pipelines or when a user asks to "ingest" or "add" data that may already be managed by a DTS transfer./bigquery-graph-authorProvides an end-to-end journey for authoring a BigQuery property graph from your tables or from a model document/diagram (an ER diagram, an ontology, a semantic model): dataset discovery, candidate relationships verified against the data, a readable plan, and `CREATE PROPERTY GRAPH` DDL with schema best practices and semantic measures/dimensions, plus an opt-in verification suite for the landed graph. Use when creating or replacing a property graph, authoring a graph from a dataset or a document, or verifying relationships or suspicious edge counts. Don't use for querying an existing graph, for non-BigQuery graph databases, or for drawing/rendering diagrams./bigquery-graph-queryProvides guidelines and best practices for querying BigQuery property graphs and semantic graphs: native GQL (Graph Query Language) pattern matching, multi-hop and variable-length paths, aggregation, top-N, path extraction, output formatting (graph visualization with TO_JSON vs tabular), GRAPH_TABLE relational SQL integration, and semantic graph querying via the GRAPH_EXPAND TVF with starting-node view selection and AGG() measures. Also covers hybrid semantic search, combining `VECTOR_SEARCH` candidate generation with graph traversal when a node carries an embedding-backed property. Use when querying graph topology, node/edge connections, paths, or semantic measures over an existing BigQuery graph. Don't use for Cypher or non-BigQuery graph databases, or for creating/modifying a graph schema.npx claudepluginhub googlecloudplatform/data-agent-kit-plugin --plugin dakOther plugins' skills for the same job