Agent Native

enforcing-resource-attribution

Enforces resource attribution labels on bq and gcloud commands to track resources created by AI agents.

by GoogleOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (flutter, google)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
Apache-2.0 (permissive)
Pin
0dd8034pinned Oct 9, 2026
Context cost
about 960 tokenswhen the skill loads
GitHub stars
215on googlecloudplatform/data-agent-kit-plugin
Scripts
None found

What it does

“Enforces resource attribution for CLI commands. Use this skill whenever you are running `bq` or `gcloud` commands via `run_command`. It ensures mandatory labeling for supported `bq` operations while avoiding invalid flags on read-only commands.”
The author's description, from SKILL.md

Generated summary from the skill's own text

Enforces resource attribution labels on bq and gcloud commands to track resources created by AI agents. The skill adds mandatory datacloud labels to supported BigQuery operations and environment variables to all gcloud commands, while avoiding invalid flags on unsupported bq subcommands like show, ls, and rm.

When to use it

  • Running bq query, load, extract, mk, update, or cp commands in Data Agent Kit workflows
  • Executing gcloud commands that manipulate GCP resources from an AI agent
  • Working with BigQuery datasets, GCS buckets, or Analytics infrastructure like Dataproc
  • Need to track resource attribution for audit or monitoring purposes

When not to

  • Running read-only bq commands like bq show, bq ls, or bq head
  • Managing unrelated infrastructure like Compute Engines for web applications
  • Executing commands that do not support label flags

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add googlecloudplatform/data-agent-kit-plugin --skill enforcing-resource-attribution

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install googlecloudplatform/data-agent-kit-plugin enforcing-resource-attribution@0dd8034c50d6bce0290b99190cd44b06fcbec2c1

Installs the commit we checked (0dd8034).

Copy by hand

Download the folder at 0dd8034 and put it in .claude/skills/enforcing-resource-attribution for Claude Code and in .agents/skills/enforcing-resource-attribution for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 0dd8034

Claude Code plugin

/plugin install chrome-devtools-mcp@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Claude Code plugin

/plugin install alloydb-omni@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Claude Code plugin

/plugin install bigquery-data-analytics@claude-plugins-official

The publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "enforcing-resource-attribution" by Google.

Source, pinned to commit 0dd8034c50d6bce0290b99190cd44b06fcbec2c1:
https://github.com/googlecloudplatform/data-agent-kit-plugin/tree/0dd8034c50d6bce0290b99190cd44b06fcbec2c1/skills/enforcing-resource-attribution

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/enforcing-resource-attribution/ for Claude Code and .agents/skills/enforcing-resource-attribution/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/google/enforcing-resource-attribution

SKILL.md at the pin

---
name: enforcing-resource-attribution
description: |
  Enforces resource attribution for CLI commands. Use this skill whenever you are running `bq` or `gcloud` commands via `run_command`. It ensures mandatory labeling for supported `bq` operations while avoiding invalid flags on read-only commands.
license: Apache-2.0
metadata:
  version: v6
  publisher: google
---

# Resource Attribution Enforcement

To track resources created or manipulated by AI agents, you **MUST** ensure
that standard CLI commands are tagged with appropriate attribution labels
under relevant conditions.

## Applicability

You should apply these attribution labels **ONLY** under the following
conditions:
1.  **DAK Tooling**: You are executing Python scripts, running MCP tools, or
    following workflows provided by the **Data Agent Kit**.
2.  **Domain Relevance**: You are operating on BigQuery datasets, GCS
    buckets, or Analytics infrastructure (including **Spark**,
    **Dataproc**, or Serverless Spark) intended for data preparation,
    deduplication, or analysis.

### 🚫 When to Omit
Do **NOT** apply these labels if you are running generic administrative
commands or working on infrastructure completely unrelated to Data Cloud /
Analytics (e.g., managing Compute Engines for web apps, setting up standard
IAM policies, etc.).

Do **NOT** apply `--label` flags to commands that do not accept labels, as the `--label` flag is unsupported by these specific `bq` subcommands. These include:
- `bq show`
- `bq ls`
- `bq version`
- `bq rm`
- `bq cancel`
- `bq head`

## BigQuery CLI (`bq`)

You **MUST** apply `--label key:value` **ONLY** to subcommands that accept job or resource labels (`bq query`, `bq load`, `bq extract`, `bq mk`, `bq update`, and `bq cp`).

-   **Flag Form**: `--label key:value`
-   **Mandatory Label**: `datacloud:<ide>`
-   **Deduction Rule**: Substitute `<ide>` with your actual environment/client
    (e.g., `vscode`, `antigravity`, `codex`, `cursor`, `cloud-shell`,
    `workstation`, `gemini-cli`, `claude`).
    *   Use `cloud-shell` for GCP Cloud Shell.
    *   Use `workstation` for GCP Cloud Workstations.
    If you cannot determine your environment, use `ai-agent`. Note that
    BigQuery labels **cannot** contain dots or spaces.

### Examples

#### Query Example
**Incorrect**:
```bash
bq query --use_legacy_sql=false "SELECT 1"
```

**Correct** (assuming you are running in VS Code):
```bash
bq query --use_legacy_sql=false --label datacloud:vscode "SELECT 1"
```

#### Copy Example
**Incorrect**:
```bash
bq cp dataset1.table1 dataset2.table1_copy
```

**Correct** (assuming you are running in Antigravity):
```bash
bq cp --label datacloud:antigravity dataset1.table1 dataset2.table1_copy
```

---

## Google Cloud SDK (`gcloud`)

Whenever you execute any `gcloud` command via `run_command`, you **MUST**
prepend the command with the `CLOUDSDK_METRICS_ENVIRONMENT` environment
variable to ensure proper resource attribution.

-   **Environment Variable**: prepend commands using the append form. It keeps
    any attribution another tool or skill already set on the same variable and
    adds the DAK tag after it, so both values reach the metrics pipeline:

    ```bash
    CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }datacloud.<ide>"
    ```

-   **Deduction Rule**: Substitute `<ide>` with your actual environment/client
    (e.g., `vscode`, `antigravity`, `codex`, `cursor`, `cloud-shell`,
    `workstation`, `gemini-cli`, `claude`).
    *   Use `cloud-shell` for GCP Cloud Shell.
    *   Use `workstation` for GCP Cloud Workstations.
    If you cannot determine your environment, use `ai-agent`. Note that
    values must use dots (e.g., `datacloud.vscode`), not colons.

### Examples

**Incorrect**:
```bash
gcloud compute disks create my-disk --size=10GB
```

**Correct** (assuming you are running in VS Code):
```bash
CLOUDSDK_METRICS_ENVIRONMENT="${CLOUDSDK_METRICS_ENVIRONMENT:+$CLOUDSDK_METRICS_ENVIRONMENT }datacloud.vscode" gcloud compute disks create my-disk --size=10GB
```

> [!IMPORTANT]
>
> This applies to **ALL** `gcloud` commands, whether they are read-only
> (`gcloud ... list`) or mutations (`gcloud ... create`).

From googlecloudplatform/data-agent-kit-plugin at 0dd8034, shown as plain text under its license: Apache-2.0 (permissive). The license text is in skills/enforcing-resource-attribution/SKILL.md.

View SKILL.md on GitHub at 0dd8034

Files

1 file, 4.2 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 0dd8034
All 50 skills from Google

More from Google

  • skill-creator

    This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.

    Contains scripts

    Gemini CLI · about 5K tokens · pinned 6 days ago

  • chrome-devtools-cli

    This skill enables agents to automate browser interactions and inspect web pages using Chrome DevTools via command-line interface.

    Claude Code, Codex, Cursor +4 · about 2.9K tokens · pinned 6 days ago

  • cloud-run-basics

    Deploys and manages Google Cloud Run services, jobs, and worker pools for running containerized applications or source code.

    Claude Code, Codex, Cursor +4 · about 3.9K tokens · pinned 6 days ago

  • retail-virtual-tryon

    Creates virtual try-on agents on Google Cloud using Gemini image models and Veo video generation, supporting static image try-ons and catwalk animations.

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 3.3K tokens · pinned 6 days ago

  • site-md

    This skill analyzes project briefs and generates a .stitch/SITE.md constitution file that documents the project's identity, visual direction, architecture…

    Claude Code, Codex, Cursor +4 · about 730 tokens · pinned 6 days ago

  • stitch::code-to-design

    This skill converts existing frontend code (React, Vue, Angular, etc.) into a Stitch Design by extracting HTML, analyzing design systems, and uploading both…

    Claude Code, Codex, Cursor +4 · about 760 tokens · pinned 6 days ago

All Cloud and DevOps skills
  • gcp-pipeline-orchestration

    This skill helps agents create, validate, and deploy orchestration pipelines for Google Cloud Composer using declarative YAML configuration files.

    by GoogleOfficial publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 5.5K tokens · pinned 6 days ago

  • google-cloud-auth-verification

    This skill verifies Google Cloud Platform authentication and credentials before executing any GCP-related tasks.

    by GoogleOfficial publisher

    Claude Code, Codex, Cursor +4 · about 860 tokens · pinned 6 days ago

  • google-cloud-storage-basics

    This skill enables agents to manage Google Cloud Storage buckets and objects using the gcloud CLI, JSON API, client libraries, Terraform, and MCP servers.

    by GoogleOfficial publisher

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • architect-for-startups

    Provides stage-appropriate AWS architecture guidance for startups from pre-revenue through Series B+, considering runway, team size, and AWS credits.

    by Amazon (AWS)Official publisher

    Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 6 days ago

  • azure-to-aws

    This skill guides agents through migrating Azure workloads to AWS across six phases: discovering Azure resources from Terraform, live CLI, app code, and…

    by Amazon (AWS)Official publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.3K tokens · pinned 6 days ago

  • gcp-to-aws

    Migrates workloads from Google Cloud Platform to AWS, including AI and agentic applications from any provider.

    by Amazon (AWS)Official publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 14.3K tokens · pinned 6 days ago

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use