enforcing-resource-attribution

Enforces attribution labels on bq and gcloud CLI commands for resource tracking.

1|Updated Aug 30, 2026
One-click install
npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill enforcing-resource-attribution-feexsystems
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: enforcing-resource-attribution
Source: https://github.com/FeexSystems/3WM-SONIK-LABS/tree/main/.gemini/skills/enforcing-resource-attribution
Command: npx skills add https://github.com/FeexSystems/3WM-SONIK-LABS --skill enforcing-resource-attribution-feexsystems

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents running BigQuery and Google Cloud CLI commands often create or modify cloud resources without any attribution, making it impossible to track which environment or client initiated the operations. This Skill ensures every applicable command carries the correct attribution label. ## Core Features & Use Cases - BigQuery Label Enforcement: Applies the mandatory --label datacloud:<ide> flag to label-supporting bq subcommands (query, load, extract, mk, update, cp) while explicitly avoiding invalid flags on read-only commands like bq show, bq ls, and bq rm. - gcloud Metrics Attribution: Prepends CLOUDSDK_METRICS_ENVIRONMENT=datacloud.<ide> to every gcloud command, covering both read-only and mutation operations. - Environment Deduction: Provides rules for detecting the current IDE or client (vscode, cursor, cloud-shell, gemini-cli, etc.) with an ai-agent fallback when the environment cannot be determined. - Use Case: When an agent runs a BigQuery query as part of a Data Agent Kit workflow, it automatically emits bq query --use_legacy_sql=false --label datacloud:vscode "SELECT 1" so the job is properly attributed. ## Quick Start Ask the agent to run a BigQuery query or any gcloud command and it will automatically attach the correct attribution label or environment variable for your current IDE.

Frequently Asked Questions about enforcing-resource-attribution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add attribution labels to bq query commands?▼

Add the --label datacloud:<ide> flag to bq query, substituting <ide> with your environment such as vscode or cursor. For example: bq query --use_legacy_sql=false --label datacloud:vscode "SELECT 1".

How do I attribute gcloud commands to my environment?▼

Prepend CLOUDSDK_METRICS_ENVIRONMENT=datacloud.<ide> to any gcloud command, using dots instead of colons. This applies to all gcloud commands, whether read-only list operations or resource-creating mutations.

Which bq subcommands support the --label flag?▼

Only bq query, load, extract, mk, update, and cp accept labels. Do not add --label to bq show, ls, version, rm, cancel, or head, as these subcommands do not support the flag and will fail.

When should I omit attribution labels on cloud commands?▼

Omit labels when running generic administrative commands unrelated to Data Cloud or Analytics, such as managing Compute Engine for web apps or standard IAM policies. Labels apply only to Data Agent Kit workflows and analytics infrastructure.

What value should I use if my IDE environment is unknown?▼

Use ai-agent as the fallback value when the environment cannot be determined. Note that BigQuery label values cannot contain dots or spaces, while gcloud metric values use dots such as datacloud.ai-agent.