enforcing-resource-attribution

Applies attribution labels to bq and gcloud CLI commands for resource tracking.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill enforcing-resource-attribution-1919114514yasenpai-maker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: enforcing-resource-attribution
Source: https://github.com/1919114514yasenpai-maker/focus-quest/tree/main/.gemini/skills/enforcing-resource-attribution
Command: npx skills add https://github.com/1919114514yasenpai-maker/focus-quest --skill enforcing-resource-attribution-1919114514yasenpai-maker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cloud resources created or modified by AI agents often lack attribution, making it impossible to track which environment or client created them. This Skill ensures every relevant bq and gcloud command carries proper attribution labels so resource usage can be traced back to its origin. ## Core Features & Use Cases - BigQuery Label Enforcement: Automatically adds --label datacloud:<ide> to label-supporting bq subcommands (query, load, extract, mk, update, cp) while skipping read-only commands like bq show or bq ls that reject the flag. - gcloud Metrics Attribution: Prepends CLOUDSDK_METRICS_ENVIRONMENT=datacloud.<ide> to every gcloud command, covering both read-only and mutation operations. - Environment Detection: Deduces the correct IDE/client identifier (e.g., vscode, cursor, cloud-shell, gemini-cli) with an ai-agent fallback when the environment is unknown. - Use Case: When an AI agent runs bq query against an analytics dataset as part of a Data Agent Kit workflow, the command is automatically tagged so cloud administrators can attribute the resulting jobs and resources to the correct client. ## 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 label-supporting bq subcommands such as query, load, extract, mk, update, and cp. Replace <ide> with your environment name like vscode or cursor, using ai-agent if unknown.

How do I tag gcloud commands for resource attribution?▼

Prepend CLOUDSDK_METRICS_ENVIRONMENT=datacloud.<ide> before every gcloud command, for example CLOUDSDK_METRICS_ENVIRONMENT=datacloud.vscode gcloud compute disks create my-disk. This applies to both read-only and mutation commands.

Which bq subcommands do not support the --label flag?▼

The read-only subcommands bq show, bq ls, bq version, bq rm, bq cancel, and bq head do not accept labels. Adding --label to these commands causes errors, so the flag must be omitted for them.

When should attribution labels be omitted on cloud commands?▼

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

What label format does BigQuery require for attribution?▼

BigQuery labels use the colon format datacloud:<ide> and cannot contain dots or spaces. In contrast, the gcloud environment variable uses dot notation, such as datacloud.vscode.