Agent skill
import-conventions
Import conventions and ordering rules. Use when writing imports or organizing import statements. Enforces explicit named imports, never wildcards.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/import-conventions
SKILL.md
Import Conventions
Explicit Named Imports
ALWAYS use explicit named imports. NEVER use wildcard imports.
// CORRECT
import {Stack, Duration, RemovalPolicy} from 'aws-cdk-lib';
import {Bucket, BucketEncryption, BlockPublicAccess} from 'aws-cdk-lib/aws-s3';
import {Function, Runtime, Code} from 'aws-cdk-lib/aws-lambda';
// INCORRECT - Never do this
import * as cdk from 'aws-cdk-lib';
import * as s3 from 'aws-cdk-lib/aws-s3';
Import Order
Organize imports in this order:
- Node.js built-in modules
- External dependencies (
@aws-sdk/*, third-party) - AWS CDK (
constructs,aws-cdk-lib) - Internal monorepo packages (
@cdk-constructs/*) - Local imports (
./,../)
import {readFileSync} from 'fs';
import {SecretsManagerClient} from '@aws-sdk/client-secrets-manager';
import {Construct} from 'constructs';
import {Stack, Duration} from 'aws-cdk-lib';
import {Bucket} from 'aws-cdk-lib/aws-s3';
import {Account, Region, Environment} from '@cdk-constructs/aws';
import {CodeArtifactStackProps} from '@cdk-constructs/codeartifact';
import {MyLocalType} from './types/my-types';
Workspace Package Imports
When importing from workspace packages, use the package name:
// CORRECT
import {Account, Region} from '@cdk-constructs/aws';
import {createCodeArtifact} from '@cdk-constructs/codeartifact';
// INCORRECT - Don't use relative paths to packages
import {Account} from '../../packages/aws/src';
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?