smithery.ai

package-management

Package configuration, dependencies, workspace references, and CDK version management. Use when creating packages or managing dependencies.

First seen Apr 16, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,472 B
  • docs SUMMARY.md 165 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Package Management

Package.json Requirements

When creating or modifying subpackages:

{
    "name": "@cdk-constructs/{package-name}",
    "version": "0.1.0",
    "main": "dist/src/index.js",
    "types": "dist/src/index.d.ts",
    "files": ["dist"],
    "dependencies": {
        "@cdk-constructs/cdk": "*",
        "@cdk-constructs/aws": "*"
    },
    "peerDependencies": {
        "aws-cdk-lib": "^2.225.0",
        "constructs": "^10.0.0"
    },
    "devDependencies": {
        "aws-cdk-lib": "2.225.0",
        "constructs": "10.4.2"
    }
}

Key Points:

  • Use "@cdk-constructs/": "" to reference workspace packages
  • peerDependencies and devDependencies must match the root package's CDK version
  • main and types point to dist/src/ (TypeScript compiles from src/)

Inter-Package Dependencies

Some packages depend on others:

  • @cdk-constructs/codeartifact depends on @cdk-constructs/aws
  • @cdk-constructs/cloudwatch depends on both @cdk-constructs/cdk and @cdk-constructs/api-gateway

When adding cross-package dependencies:

  1. Add them to dependencies in package.json
  2. Ensure proper build order in tsconfig.build.json
  3. Verify no circular dependencies are created

CDK Version Management

Version Synchronization

All packages must use the same aws-cdk-lib version. The current version is defined in the root package.json.

Updating CDK Version

When updating CDK version, modify these files:

  1. Root package.json: version, devDependencies.aws-cdk-lib, devDependencies.aws-cdk, peerDependencies.aws-cdk-lib
  2. Each packages/*/package.json: peerDependencies.aws-cdk-lib, devDependencies.aws-cdk-lib

Workspace Dependencies

Using Workspace References

Packages reference each other using "*" in dependencies:

{
    "dependencies": {
        "@cdk-constructs/aws": "*",
        "@cdk-constructs/cdk": "*"
    }
}

The "*" tells npm to use the workspace version, preventing circular dependencies.

Postinstall Script

The postinstall script removes nested node_modules to prevent circular dependencies:

"postinstall": "rm -rf node_modules/@cdk-constructs/*/node_modules"

This ensures all packages use the workspace root's node_modules.