Token导航 LogoToken导航

Agent Skill · 开发

resource-naming(资源命名)

resource-naming 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

resource-naming 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 13,573。

总安装 870周安装 37GitHub Stars 公开资料未说明下载 305核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/loxosceles/ai-dev --skill resource-naming

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

关键规则: 每个 AWS 资源名称必须包含项目前缀 每个 AWS 资源名称必须包含环境标识符 使用模式:{项目}-{资源名称}-{环境} 为什么: 防止资源冲突和数据损坏 实现清晰的项目所有权 允许安全的多环境部署到同一帐户 促进轻松的资源识别和管理 如何:使用 ${projectPrefix} 和${环境} 所有资源名称中的变量保持一致。

验证:将 dev 和 prod 部署到同一帐户并验证没有冲突。请记住:这不是可选的。这是一种关键模式,可以防止生产事故并实现清晰的资源管理。渐进式改进 如果开发人员纠正了该技能本应阻止的行为,请建议对此技能进行具体修改,以防止将来出现相同的纠正。

每周安装量 37 存储库 loxosceles/ai-dev 第一次看到 3天前 安全审计 Gen Agent Trust Hub 通行证 套接字通行证 斯尼克通行证

来源仓库内路径:skills/resource-naming

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/loxosceles/ai-dev --skill resource-naming;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

resource-naming 怎么安装?

在终端执行 npx skills add https://github.com/loxosceles/ai-dev --skill resource-naming。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

resource-naming 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

resource-naming 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

resource-naming 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

resource-naming 用的人多吗?

公开数据是累计安装 870 次,近一周安装 37 次,下载 305 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

resource-naming 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
resource-naming

资源命名 · 本页

870—需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

AWS Resource Naming Conventions

This is a reference pattern. Learn from the approach, adapt to your context — don't copy verbatim.

Status: 🔴 CRITICAL PATTERN Category: Infrastructure Applies To: All AWS resources across all projects


Overview

This document defines the standard naming conventions for AWS resources. Following these patterns ensures:

  • Clear project ownership
  • Environment separation and safety
  • Consistent resource identification
  • Easy filtering and management in AWS Console
  • Prevention of resource conflicts and data corruption

Standard Naming Pattern

Core Format

{project}-{resource-name}-{environment}

Components

  1. Project Prefix (required)

- Short identifier for the project (2-4 characters) - Lowercase letters only - Examples: cme, aip, app - Identifies which project owns the resource

  1. Resource Name (required)

- Describes the resource's purpose - Lowercase with hyphens - Examples: job-extractor, opportunities, website

  1. Environment Suffix (required)

- dev - Development environment - prod - Production environment - staging - Staging environment (optional) - local - Local development (for configuration only, never deployed) - Always in last position for consistency

Why This Pattern?

  • ✅ Project ownership clear: Prefix identifies the owning project
  • ✅ Consistent environment position: Always at the end
  • ✅ Short names: No account/region unless required for uniqueness
  • ✅ AWS best practice: Lowercase with hyphens
  • ✅ Easy filtering: Can filter by prefix in AWS Console
  • ✅ Multi-project support: Clear separation when multiple projects share an account
  • ✅ Prevents conflicts: Environment suffix prevents dev/prod overwrites

Account Strategy: Single vs. Multi-Account

Two Deployment Approaches

Option 1: Single Account (dev and prod in same AWS account)

  • Lower cost (no cross-account complexity)
  • Simpler IAM and networking
  • Requires environment suffix to prevent conflicts

Option 2: Multi-Account (separate AWS accounts for dev and prod)

  • Better isolation and security
  • Separate billing and cost tracking
  • Still requires environment suffix for safety

Why Environment Suffix is Always Required

Even with separate AWS accounts, the environment suffix provides critical safety:

  1. Human Error Prevention: Immediately see which environment you're working in # Without environment suffix aws lambda list-functions → job-extractor # Which environment is this? # With environment suffix aws lambda list-functions → job-extractor-prod # Clear: this is production!
  2. Account Confusion Protection: Prevents mistakes when switching between accounts # You think you're in dev account, but you're actually in prod # Without suffix: You might delete "job-extractor" thinking it's dev # With suffix: You see "job-extractor-prod" and stop immediately
  3. Future-Proofing: Account strategy might change

- Start with single account, later split to multi-account - Merge accounts for cost optimization - Add staging environment to existing account

  1. Consistency: Same naming pattern works everywhere

- Local development - CI/CD pipelines - AWS Console - CloudFormation/CDK code

Real-World Scenario

# You're debugging an issue and need to check Lambda logs
# You have AWS CLI configured with multiple profiles

# Scenario 1: Without environment suffix
aws lambda get-function --function-name job-extractor --profile prod-account
# ⚠️  Is this the right function? Hard to tell from name alone

# Scenario 2: With environment suffix
aws lambda get-function --function-name job-extractor-prod --profile prod-account
# ✅ Name confirms you're looking at production resource
# ✅ Immediate visual confirmation prevents mistakes

Rule: Always include environment suffix, regardless of account strategy. It's a safety layer that costs nothing but prevents costly mistakes.


Critical: Why Environment Suffix Matters

The Problem

Without environment identifiers in resource names, dev and prod resources conflict when deployed to the same AWS account, causing overwrites and data corruption.

Real-World Impact

Lambda Functions (no environment in name):

// ❌ WRONG
functionName: 'job-data-extractor'

// GitHub Actions deploys dev
ENVIRONMENT=dev → Lambda: job-data-extractor

// GitHub Actions deploys prod
ENVIRONMENT=prod → Lambda: job-data-extractor  // OVERWRITES dev!

DynamoDB Tables (no environment in name):

// ❌ WRONG
tableName: `opportunities-${account}-${region}`

// Both environments use SAME table
// Result: Dev and prod data MIXED!

The Solution

Always include environment in resource names:

// ✅ CORRECT
functionName: `job-data-extractor-${environment}`
tableName: `opportunities-${environment}`

// Results:
// dev:  job-data-extractor-dev, opportunities-dev
// prod: job-data-extractor-prod, opportunities-prod

Resource-Specific Patterns

Lambda Functions

Pattern: {project}-{function-name}-{environment}

Examples:

// ✅ CORRECT
functionName: `cme-job-extractor-${environment}`
functionName: `aip-data-sync-${environment}`

// Results:
// cme-job-extractor-dev
// cme-job-extractor-prod
// aip-data-sync-dev

Rationale: Lambda names must be unique per account. Environment suffix prevents dev/prod conflicts.


DynamoDB Tables

Pattern: {project}-{table-name}-{environment}

Examples:

// ✅ CORRECT
tableName: `cme-opportunities-${environment}`
tableName: `aip-user-sessions-${environment}`

// Results:
// cme-opportunities-dev
// cme-opportunities-prod

Optional Extended Pattern (when uniqueness needed):

tableName: `{project}-{table-name}-${environment}-${account}-${region}`

// Example:
// cme-opportunities-dev-123456-us-east-1

Rationale: Table names must be unique per account. Environment suffix is critical to prevent data mixing.


S3 Buckets

Pattern: {project}-{bucket-purpose}-{environment} (add random suffix if collision)

Examples:

// ✅ CORRECT
bucketName: `cme-website-${environment}`
bucketName: `aip-assets-${environment}`

// Results:
// cme-website-dev
// cme-website-prod

If collision occurs (bucket name already taken globally):

bucketName: `cme-website-${environment}-x7k2m`

// Results:
// cme-website-dev-x7k2m
// cme-website-prod-p9n4q

Important Notes:

  • Bucket names must be globally unique across ALL AWS accounts
  • Use lowercase letters, numbers, and hyphens only (no underscores)
  • If deployment fails with "BucketAlreadyExists", add random suffix
  • Suffix format: 5 random lowercase alphanumeric characters

Rationale: Bucket names must be globally unique. Start with clean pattern, add suffix only if needed.


API Gateway

Pattern: {PROJECT} API - {environment} (display name, uppercase project)

Examples:

// ✅ CORRECT
restApiName: `CME API - ${environment}`
restApiName: `AIP API - ${environment}`

// Results:
// CME API - dev
// CME API - prod

Rationale: Display name for humans. Uppercase for readability in AWS Console.


CloudFront Distributions

Pattern: Comment field: {Project Name} - {environment}

Examples:

Career Match Engine - dev
AI Portfolio - prod

Tag: Environment: dev or Environment: prod

Rationale: CloudFront IDs are auto-generated. Use comment and tags for identification.


Lambda Layers

Pattern: {project}-{layer-name} or {project}-{layer-name}-{environment}

Examples:

// Shared across environments
layerName: 'cme-common-layer'
layerName: 'aip-utils-layer'

// Environment-specific
layerName: `cme-config-layer-${environment}`

Note: Layers are often shared across environments. Environment suffix optional.

Rationale: Layers are versioned. Sharing across environments reduces duplication.

Lambda Layer Code Organization

Goal: Provide each Lambda with only what it needs while avoiding code duplication. This is a trade-off between deployment size and code reuse - evaluate on a case-by-case basis.

Layer Structure: Organize by scope and reusability

layers/
  common/                # Truly shared utilities (3+ consumers)
    nodejs/
      logger.mjs
      response-builder.mjs
      config-loader.mjs
      validation.mjs

  feature-utils/         # Feature-specific utilities
    nodejs/
      feature-operations.mjs
      feature-schemas.mjs

  external-sdks/         # Third-party integrations
    nodejs/
      package.json       # npm dependencies
      sdk-wrapper.mjs

Organizing Shared Code:

Common Layer - For widely-used utilities:

  • Generic helpers (logging, validation, response formatting)
  • Used by 3+ different features
  • No feature-specific logic

Feature Layer - For feature-specific shared code:

  • Operations and schemas for a specific domain
  • Used by 2+ functions within that feature
  • Contains feature-specific logic

Integration Layer - For external dependencies:

  • Third-party SDK packages
  • Wrappers around external services
  • Isolates version management

Using Multiple Layers:

// Function can reference multiple layers
const myFunction = new Function({
  layers: [
    commonLayer,        // Generic utilities
    featureALayer,      // Feature A utilities
    featureBLayer       // Feature B utilities (if needed)
  ]
});

Decision Guide:

  • Generic utilities → common layer
  • Feature-specific code → feature layer
  • External packages → integration layer
  • Cross-feature needs → Reference multiple layers

Trade-offs:

  • More layers = lighter individual Lambdas but more complexity
  • Fewer layers = simpler setup but larger deployments
  • Balance based on your project's needs

Example Scenario: API schemas used by multiple features

  • If generic: Move to common layer
  • If feature-specific: Keep in feature layer, other features reference it
  • Don't duplicate: Use layer composition

SQS Queues

Pattern: {project}-{queue-name}-{environment}

Examples:

queueName: `cme-job-processing-${environment}`
queueName: `aip-notifications-${environment}`

SNS Topics

Pattern: {project}-{topic-name}-{environment}

Examples:

topicName: `cme-alerts-${environment}`
topicName: `aip-events-${environment}`

EventBridge Rules

Pattern: {project}-{rule-name}-{environment}

Examples:

ruleName: `cme-daily-sync-${environment}`
ruleName: `aip-cleanup-${environment}`

Step Functions

Pattern: {project}-{state-machine-name}-{environment}

Examples:

stateMachineName: `cme-workflow-${environment}`
stateMachineName: `aip-pipeline-${environment}`

Secrets Manager

Pattern: {project}/{environment}/{secret-name}

Examples:

secretName: `cme/${environment}/api-key`
secretName: `aip/${environment}/db-password`

SSM Parameters

Pattern: /{project}/{environment}/{namespace}/{key}

Examples:

/cme/dev/lambda/job-extractor/LLM_API_KEY
/cme/prod/api/corsAllowedOrigins
/aip/dev/frontend/api-endpoint

Note: Use camelCase for project name in SSM for historical compatibility.


CloudWatch Log Groups

Pattern: /aws/lambda/{project}-{function-name}-{environment}

Examples:

/aws/lambda/cme-job-extractor-dev
/aws/lambda/cme-recruiter-chat-prod
/aws/lambda/aip-data-sync-dev

Note: Auto-generated by Lambda. Follows Lambda naming automatically.


CDK Implementation Pattern

Construct Props

export interface ResourceConstructProps {
  projectPrefix: string;    // 'cme', 'aip', etc.
  environment: string;      // 'dev', 'prod', 'staging'
  account: string;
  region: string;
}

Lambda Function

const myFunction = new lambda.Function(this, 'MyFunction', {
  functionName: `${props.projectPrefix}-my-function-${props.environment}`,
  runtime: lambda.Runtime.NODEJS_22_X,
  handler: 'index.handler',
  code: lambda.Code.fromAsset('lambda'),
  environment: {
    ENVIRONMENT: props.environment,
    PROJECT: props.projectPrefix
  }
});

DynamoDB Table

const myTable = new dynamodb.Table(this, 'MyTable', {
  tableName: `${props.projectPrefix}-my-table-${props.environment}`,
  partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
  billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
  removalPolicy: props.environment === 'prod'
    ? cdk.RemovalPolicy.RETAIN
    : cdk.RemovalPolicy.DESTROY
});

S3 Bucket

const myBucket = new s3.Bucket(this, 'MyBucket', {
  bucketName: `${props.projectPrefix}-my-bucket-${props.environment}`,
  removalPolicy: props.environment === 'prod'
    ? cdk.RemovalPolicy.RETAIN
    : cdk.RemovalPolicy.DESTROY,
  autoDeleteObjects: props.environment !== 'prod'
});

Environment Variable Setup

Required Environment Variable

# Must be set before deployment
export ENVIRONMENT=dev  # or 'prod', 'staging', etc.
export PROJECT_PREFIX=myapp  # Short project identifier

Deployment Script

#!/bin/bash
set -e

if [ -z "$ENVIRONMENT" ]; then
  echo "Error: ENVIRONMENT is not set"
  echo "Usage: ENVIRONMENT=dev ./deploy.sh"
  exit 1
fi

if [ -z "$PROJECT_PREFIX" ]; then
  echo "Error: PROJECT_PREFIX is not set"
  echo "Usage: PROJECT_PREFIX=myapp ENVIRONMENT=dev ./deploy.sh"
  exit 1
fi

echo "Deploying $PROJECT_PREFIX to environment: $ENVIRONMENT"
cdk deploy --all

GitHub Actions

name: Deploy

on:
  push:
    branches:
      - main      # Deploys to prod
      - develop   # Deploys to dev

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Set environment
        run: |
          if [ "${{ github.ref }}" == "refs/heads/main" ]; then
            echo "ENVIRONMENT=prod" >> $GITHUB_ENV
          else
            echo "ENVIRONMENT=dev" >> $GITHUB_ENV
          fi
          echo "PROJECT_PREFIX=myapp" >> $GITHUB_ENV

      - name: Deploy
        run: |
          echo "Deploying $PROJECT_PREFIX to $ENVIRONMENT"
          ./deploy.sh

Validation Checklist

Before deploying any resource, verify:

  • Starts with project prefix (cme-, aip-, etc.)
  • Ends with environment (-dev, -prod, -staging)
  • Uses lowercase with hyphens (except API Gateway display names)
  • No hardcoded environment values (use variables)
  • Name clearly describes resource purpose
  • Follows pattern: {project}-{resource-name}-{environment}
  • Environment variable is set before deployment

Common Pitfalls

❌ Pitfall 1: Hardcoded Environment

// ❌ WRONG - Hardcoded 'dev'
bucketName: `my-app-dev`

// ✅ CORRECT - Use variable
bucketName: `my-app-${environment}`

❌ Pitfall 2: Missing Environment Variable

// ❌ WRONG - No environment
functionName: 'my-function'

// ✅ CORRECT - Include environment
functionName: `my-function-${environment}`

❌ Pitfall 3: Inconsistent Pattern

// ❌ WRONG - Inconsistent
functionName: `my-function-${environment}`  // Has environment
tableName: `my-table`  // Missing environment

// ✅ CORRECT - Consistent
functionName: `my-function-${environment}`
tableName: `my-table-${environment}`

❌ Pitfall 4: Missing Project Prefix

// ❌ WRONG - No project identification
functionName: `job-extractor-${environment}`

// ✅ CORRECT - Include project prefix
functionName: `cme-job-extractor-${environment}`

❌ Pitfall 5: Assuming Different Accounts Mean No Environment Suffix Needed

// ❌ WRONG ASSUMPTION
// "We use different AWS accounts for dev/prod, so we don't need environment in names"
functionName: 'job-extractor'  // No environment suffix

// ✅ CORRECT - Always include environment
functionName: `job-extractor-${environment}`

// REALITY:
// - Human error: You might be in wrong account without realizing
// - Visual confirmation: Name tells you it's prod even if you're confused about account
// - Account strategy might change (single → multi or multi → single)
// - Consistency: Same pattern works for single and multi-account setups
// - Safety layer: Costs nothing, prevents costly mistakes

Migration from Old Names

Audit Phase

  1. List all AWS resources in the account
  2. Identify resources without environment in name
  3. Identify resources without project prefix
  4. Document which environments are affected
  5. Plan migration strategy

Migration Phase

  1. Deploy new resources with correct names
  2. Migrate data from old to new resources
  3. Update application to use new resources
  4. Verify new resources working
  5. Delete old resources after validation

Validation

How to Verify Separation

AWS Console Check:

# List all Lambda functions
aws lambda list-functions --query 'Functions[*].FunctionName'

# Should see:
# - cme-my-function-dev
# - cme-my-function-prod
# ✅ Clear project and environment separation

# NOT:
# - my-function
# ❌ No project or environment identifier

DynamoDB Check:

# List all tables
aws dynamodb list-tables

# Should see:
# - cme-my-table-dev
# - cme-my-table-prod
# ✅ Clear separation

Deployment Test:

# Deploy dev
ENVIRONMENT=dev ./deploy.sh

# Deploy prod
ENVIRONMENT=prod ./deploy.sh

# Verify:
# - No resource overwrites
# - Both environments coexist
# - No conflicts or errors

Quick Reference

✅ DO

  • Include project prefix in ALL resource names
  • Include ${environment} in ALL resource names
  • Use consistent naming pattern across all resources
  • Validate environment variable is set before deployment
  • Test both dev and prod deployments to same account
  • Document naming convention in project README

❌ DON'T

  • Hardcode environment values ('dev', 'prod')
  • Skip project prefix in resource names
  • Assume different AWS accounts mean no naming needed
  • Skip environment in "temporary" or "test" resources
  • Use different naming patterns for different resource types
  • Deploy without verifying environment variable

Related Patterns


Summary

Critical Rules:

  1. Every AWS resource name MUST include the project prefix
  2. Every AWS resource name MUST include the environment identifier
  3. Use the pattern: {project}-{resource-name}-{environment}

Why:

  • Prevents resource conflicts and data corruption
  • Enables clear project ownership
  • Allows safe multi-environment deployments to same account
  • Facilitates easy resource identification and management

How: Use ${projectPrefix} and ${environment} variables in all resource names consistently.

Validation: Deploy both dev and prod to same account and verify no conflicts.

Remember: This is not optional. It's a critical pattern that prevents production incidents and enables clear resource management.


Progressive Improvement

If the developer corrects a behavior that this skill should have prevented, suggest a specific amendment to this skill to prevent the same correction in the future.

平台分布

Codex

33.16%
按下载量换算101

Claude

31.8%
按下载量换算97

Cursor

18.01%
按下载量换算55

Gemini CLI

8.36%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills