Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

resource-tagging资源标记

Agent Skill

resource-tagging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

588

周安装

25

GitHub Stars

350

下载量

206
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:resource-tagging(资源标记)
来源仓库:https://github.com/ancoleman/ai-design-components
仓库路径:skills/resource-tagging
安装命令:
npx skills add https://github.com/ancoleman/ai-design-components --skill resource-tagging
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ancoleman/ai-design-components --skill resource-tagging

简介

resource-tagging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它支持通过资源标记实现信息的分类与过滤,提升检索效率。
  • 可通过 npx skills add 命令从指定 GitHub 仓库安装该技能。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Resource Tagging

Apply comprehensive cloud resource tagging strategies to enable cost allocation, ownership tracking, compliance enforcement, and infrastructure automation across multi-cloud environments.

Purpose

Resource tagging provides the foundational metadata layer for cloud governance. Tags enable precise cost allocation (reducing unallocated spend by up to 80%), rapid ownership identification, compliance scope definition, and automated lifecycle management. Without proper tagging, cloud costs become untrackable, security incidents lack context, and automation policies fail to target resources effectively.

When to Use

Use resource tagging when:

  • Implementing cloud governance frameworks for cost allocation and accountability
  • Building FinOps practices requiring spend visibility by team, project, or department
  • Enforcing compliance requirements (PCI, HIPAA, SOC2) through automated policies
  • Setting up automated resource lifecycle management (backup, monitoring, shutdown)
  • Managing multi-tenant or multi-project cloud environments
  • Implementing disaster recovery and backup policies based on criticality
  • Tracking resource ownership for security incident response
  • Optimizing cloud costs through spend analysis and showback/chargeback

Minimum Viable Tagging Strategy

Start with the "Big Six" required tags for all cloud resources:

TagPurposeExample Value
NameHuman-readable identifierprod-api-server-01
EnvironmentLifecycle stageprod \staging \dev
OwnerResponsible team contactplatform-team@company.com
CostCenterFinance code for billingCC-1234
ProjectBusiness initiativeecommerce-platform
ManagedByResource creation methodterraform \pulumi \manual

Optional tags to add based on specific needs:

  • Application: Multi-app projects requiring app-level isolation
  • Component: Resource role (web, api, database, cache)
  • Backup: Backup policy (daily, weekly, none)
  • Compliance: Regulatory scope (PCI, HIPAA, SOC2)
  • SLA: Service level (critical, high, medium, low)

Tag Naming Conventions

Choose ONE naming convention organization-wide and enforce consistently:

ConventionFormatExampleBest For
PascalCaseCostCenter, ProjectNameAWS standardAWS-first orgs
lowercasecostcenter, projectGCP labels (required)GCP-first orgs
kebab-casecost-center, project-nameAzure (case-insensitive)Azure-first orgs
Namespacedcompany:environment, team:ownerMulti-org tag policiesLarge enterprises

Critical: Case sensitivity varies by provider:

  • AWS: Case-sensitive (Environmentenvironment)
  • Azure: Case-insensitive (Environment = environment)
  • GCP: Lowercase required (environment only)
  • Kubernetes: Case-sensitive (environmentEnvironment)

Tag Categories

For detailed taxonomy of all tag categories, see references/tag-taxonomy.md.

Technical Tags

Operations-focused metadata: Name, Environment, Version, ManagedBy

Business Tags

Cost allocation metadata: Owner, CostCenter, Project, Department

Security Tags

Compliance metadata: Confidentiality, Compliance, DataClassification, SecurityZone

Automation Tags

Lifecycle metadata: Backup, Monitoring, Schedule, AutoShutdown

Operational Tags

Support metadata: SLA, ChangeManagement, CreatedBy, CreatedDate

Custom Tags

Organization-specific metadata: Customer, Application, Component, Stack

Cloud Provider Tag Limits

ProviderTag LimitKey LengthValue LengthCase SensitiveInheritance
AWS50 user-defined128 chars256 charsYesVia tag policies
Azure50 pairs512 chars256 charsNoVia Azure Policy
GCP64 labels63 chars63 charsNoVia org policies
KubernetesUnlimited253 prefix + 63 name63 charsYesVia namespace

Tag Enforcement Patterns

Infrastructure as Code (Recommended)

Apply tags automatically via Terraform/Pulumi to reduce manual errors by 95%:

# Terraform: Provider-level default tags
provider "aws" {
  default_tags {
    tags = {
      Environment = var.environment
      Owner       = var.owner
      CostCenter  = var.cost_center
      Project     = var.project
      ManagedBy   = "terraform"
    }
  }
}

All resources automatically inherit these tags. Resource-specific tags merge with defaults.

For complete Terraform, Pulumi, and CloudFormation examples, see examples/terraform/, examples/pulumi/, and examples/cloudformation/.

Policy-Based Enforcement

Enforce tagging at resource creation time:

AWS: Use AWS Config rules to check tag compliance (alert or deny) Azure: Use Azure Policy for tag inheritance and enforcement GCP: Use Organization Policies to restrict label values Kubernetes: Use OPA Gatekeeper or Kyverno for admission control

For enforcement implementation patterns, see references/enforcement-patterns.md.

Tag Compliance Auditing

Run regular audits (weekly recommended) to identify untagged resources:

AWS Config Query (SQL):

SELECT resourceId, resourceType, configuration.tags
WHERE resourceType IN ('AWS::EC2::Instance', 'AWS::RDS::DBInstance')
  AND (configuration.tags IS NULL OR NOT configuration.tags.Environment EXISTS)

Azure Resource Graph Query (KQL):

Resources
| where type in~ ('microsoft.compute/virtualmachines')
| where isnull(tags.Environment) or isnull(tags.Owner)
| project name, type, resourceGroup, tags

GCP Cloud Asset Inventory:

gcloud asset search-all-resources \
  --query="NOT labels:environment OR NOT labels:owner" \
  --format="table(name,assetType,labels)"

For complete audit queries and scripts, see references/compliance-auditing.md and scripts/audit_tags.py.

Cost Allocation with Tags

Enable cost allocation tags to track spending by team, project, or department:

AWS Cost Explorer

Activate cost allocation tags (up to 24 hours for activation):

# Enable cost allocation tags via Terraform
resource "aws_ce_cost_allocation_tag" "environment" {
  tag_key = "Environment"
  status  = "Active"
}

resource "aws_ce_cost_allocation_tag" "project" {
  tag_key = "Project"
  status  = "Active"
}

Set up cost anomaly detection by tag to catch unusual spending:

resource "aws_ce_anomaly_monitor" "project_monitor" {
  name         = "project-cost-monitor"
  monitor_type = "DIMENSIONAL"

  monitor_specification = jsonencode({
    Tags = {
      Key    = "Project"
      Values = ["ecommerce", "mobile-app"]
    }
  })
}

Azure Cost Management

Group costs by tags in Azure Cost Management dashboards. Export cost data with tag breakdowns:

az consumption usage list \
  --start-date 2025-12-01 \
  --query "[].{Cost:pretaxCost, Project:tags.Project, Team:tags.Owner}"

GCP Cloud Billing

Export billing data to BigQuery with label breakdowns:

SELECT
  labels.key AS label_key,
  labels.value AS label_value,
  SUM(cost) AS total_cost
FROM `project.dataset.gcp_billing_export_v1_XXXXX`
CROSS JOIN UNNEST(labels) AS labels
WHERE labels.key IN ('environment', 'project', 'costcenter')
GROUP BY label_key, label_value
ORDER BY total_cost DESC

For cost allocation implementation details, see references/cost-allocation.md.

Decision Framework: Required vs. Optional Tags

Determine which tags to enforce at creation time:

REQUIRED (enforce with hard deny):

  • Cost allocation: Owner, CostCenter, Project
  • Lifecycle: Environment, ManagedBy
  • Identification: Name

RECOMMENDED (soft enforcement - alert only):

  • Operational: Backup, Monitoring, Schedule
  • Security: Compliance, DataClassification
  • Support: SLA, ChangeManagement

OPTIONAL (no enforcement):

  • Custom: Application, Component, Customer
  • Experimental: Any non-standard tags

Enforcement methods:

  1. Hard enforcement (deny resource creation): Use for cost allocation tags

- AWS: AWS Config rules with deny mode - Azure: Azure Policy with deny effect - GCP: Organization policies with constraints

  1. Soft enforcement (alert only): Use for operational tags

- AWS: AWS Config rules with notification - Azure: Azure Policy with audit effect - GCP: Cloud Asset Inventory reports

  1. No enforcement (best-effort): Use for custom/experimental tags

Tag Inheritance Strategies

Reduce manual tagging effort through automatic inheritance:

AWS Tag Policies

Inherit tags from AWS Organizations account hierarchy:

{
  "tags": {
    "Environment": {
      "tag_key": {
        "@@assign": "Environment"
      },
      "enforced_for": {
        "@@assign": ["ec2:instance", "s3:bucket"]
      }
    }
  }
}

Azure Tag Inheritance

Use Azure Policy to inherit tags from resource groups:

resource "azurerm_policy_assignment" "inherit_environment" {
  name                 = "inherit-environment-tag"
  policy_definition_id = azurerm_policy_definition.inherit_tags.id

  parameters = jsonencode({
    tagName = { value = "Environment" }
  })
}

GCP Label Inheritance

Inherit labels from folders/projects via organization policies:

resource "google_organization_policy" "require_labels" {
  org_id     = var.organization_id
  constraint = "constraints/gcp.resourceLabels"

  list_policy {
    allow {
      values = ["environment:prod", "environment:staging"]
    }
    inherit_from_parent = true
  }
}

Kubernetes Label Propagation

Use Kyverno to auto-generate labels from namespaces:

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: add-default-labels
spec:
  rules:
  - name: add-environment-label
    match:
      resources:
        kinds: [Pod, Deployment]
    mutate:
      patchStrategicMerge:
        metadata:
          labels:
            +(environment): "{{request.namespace}}"

Common Anti-Patterns

Anti-Pattern 1: Inconsistent Tag Naming

Problem: Multiple variations of the same tag across resources

# BAD: Tag sprawl
Environment: prod
environment: production
Env: prod
ENVIRONMENT: PROD

Solution: Enforce single naming convention via IaC and tag policies

# GOOD: Consistent naming
Environment: prod  # Single standard format

Anti-Pattern 2: Manual Resource Creation Without Tags

Problem: CLI/console-created resources missing required tags

Solution: Block untagged resource creation via Config/Policy rules, or use AWS Service Catalog/Azure Blueprints with pre-tagged templates

Anti-Pattern 3: No Tag Enforcement (Voluntary Tagging)

Problem: Tags are optional, frequently forgotten, leading to 35% unallocated spend

Solution: Use provider default tags in IaC + policy enforcement at account/subscription level

Anti-Pattern 4: Tag Sprawl (Too Many Custom Tags)

Problem: 30+ tags per resource, most unused, causing noise in cost reports

Solution: Start with "Big Six" required tags only. Add optional tags only when clear use case exists.

Anti-Pattern 5: Static Tags Not Updated

Problem: Tags set at creation but never updated (e.g., Owner outdated after team changes)

Solution: Run automated tag audits (weekly), use IaC to update tags programmatically, integrate with identity provider for owner updates

Integration with Other Skills

infrastructure-as-code: Tags applied automatically via Terraform/Pulumi modules with default_tags/stackTags

cost-optimization: Tags enable cost allocation, showback/chargeback, and budget alerts by project/team

compliance-frameworks: Tags prove PCI/HIPAA/SOC2 scope for audit trails and automated policy enforcement

security-hardening: Tags enforce security policies (e.g., public vs. internal access based on SecurityZone tag)

disaster-recovery: Tags identify resources for backup policies (e.g., Backup: daily triggers automated snapshots)

kubernetes-operations: Labels used for pod scheduling, resource quotas, network policies, and service selection

Implementation Checklist

When implementing resource tagging:

  • Define "Big Six" required tags with allowed values
  • Choose ONE naming convention (PascalCase, lowercase, kebab-case)
  • Implement tags in IaC (Terraform/Pulumi provider default_tags)
  • Set up enforcement policies (AWS Config, Azure Policy, GCP org policies)
  • Enable cost allocation tags in billing console (AWS Cost Explorer, Azure Cost Management)
  • Create tag compliance audit process (weekly recommended)
  • Document tag standards in organization wiki/runbook
  • Set up automated alerts for untagged resources
  • Integrate tags with monitoring/alerting for owner contact
  • Create remediation playbook for non-compliant resources

Quick Reference

Tag Enforcement Tools by Provider

ProviderEnforcement ToolPurpose
AWSAWS Config RulesTag compliance monitoring + remediation
AWSTag Policies (Organizations)Enforce tags at account level
AzureAzure PolicyTag enforcement + inheritance
GCPOrganization PoliciesLabel restrictions + inheritance
KubernetesOPA GatekeeperAdmission control for labels
KubernetesKyvernoAuto-generate labels + validation

Cost Allocation Tools

ToolPurpose
AWS Cost ExplorerTag-based cost analysis + anomaly detection
Azure Cost ManagementTag grouping + budgets
GCP Cloud BillingLabel-based cost breakdown
CloudHealthMulti-cloud cost optimization
KubecostKubernetes cost allocation by labels

Validation Tools (Pre-Deployment)

ToolPurpose
CheckovIaC tag validation (pre-commit)
tflintTerraform linting for tag rules
terraform-complianceBDD tests for tag policies

Additional Resources

For detailed implementation guidance:

  • Tag taxonomy and categories: See references/tag-taxonomy.md
  • Enforcement patterns (AWS, Azure, GCP, K8s): See references/enforcement-patterns.md
  • Cost allocation setup: See references/cost-allocation.md
  • Compliance auditing queries: See references/compliance-auditing.md
  • Terraform examples: See examples/terraform/
  • Kubernetes manifests: See examples/kubernetes/
  • Audit scripts: See scripts/audit_tags.py, scripts/cost_by_tag.py

Key Takeaways

  1. Start with "Big Six" required tags: Name, Environment, Owner, CostCenter, Project, ManagedBy
  2. Enforce at creation time: Use AWS Config, Azure Policy, GCP org policies to block untagged resources
  3. Automate with IaC: Terraform/Pulumi default tags reduce manual errors by 95%
  4. Enable cost allocation: Activate billing tags to reduce unallocated spend by 80%
  5. Choose ONE naming convention: PascalCase, lowercase, or kebab-case - enforce consistently
  6. Inherit tags from parents: Resource groups, folders, namespaces propagate tags automatically
  7. Audit regularly: Weekly tag compliance checks catch drift and prevent sprawl
  8. Tag inheritance reduces effort: Let parent resources propagate common tags to children

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.97%
按下载量换算70

Claude

32.47%
按下载量换算67

Cursor

18.44%
按下载量换算38

Gemini CLI

9.93%
按下载量换算20

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills