Agent skill
naming-conventions
Naming conventions for types, functions, files, and resources. Use when creating new code or reviewing naming patterns. Emphasizes type-driven development.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/naming-conventions-crmagz-cdk-constructs-libra
SKILL.md
Naming Conventions
Type Naming
Use type declarations, not interface. This codebase follows type-driven development.
| Type | Convention | Example |
|---|---|---|
| Types, Enums | PascalCase | EnvironmentConfig, CodeArtifactStackProps, BucketProps |
| Functions, Variables | camelCase | createBucket, bucketName |
| AWS Resource Names | kebab-case | my-bucket-dev-use1 |
| Enum Values | SCREAMING_SNAKE_CASE | Account.PROD, Region.US_EAST_1 |
Type Naming Pattern:
// CORRECT - Use type declarations
export type BucketProps = {
bucketName: string;
env: EnvironmentConfig['env'];
};
export type EnvironmentConfig = {
name: string;
region: string;
account: string;
};
// INCORRECT - Don't use interface
export interface BucketProps {
// ❌
bucketName: string;
}
Resource Naming Pattern
Include environment and region to prevent naming collisions:
// Resource naming pattern
`${resourceName}-${props.env.name}-${props.env.region}`
// Examples
`aurora-cluster-dev-use1``api-gateway-prod-use1``waf-acl-staging-use1`;
Function Naming
Use verbNoun pattern for function names:
// CORRECT
export const createBucket = () => {};
export const getVpcConfig = () => {};
export const updateSecurityGroup = () => {};
// INCORRECT
export const bucketCreate = () => {};
export const VpcConfigGet = () => {};
File Naming
- Constructs:
kebab-case.ts(e.g.,api-gateway.ts) - Types:
kebab-case-type.tsorkebab-case.tsin types directory - Enums:
kebab-case-enum.tsorkebab-case.tsin enum directory - Utilities:
kebab-case.tsin util directory
Export Patterns
- Each package exports from
src/index.ts - Root package exports from
src/index.ts - Use named exports, avoid default exports where possible
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?