Add Package to Workspace

Command

by davila7 · Added 5mo ago

Claude

Install

npx claude-code-templates@latest --command=cli-tool/components/commands/project-management --yes

Add to Claude

claude mcp add add-package-to-workspace

About


allowed-tools: Read, Write, Edit, Bash, Glob argument-hint: [package-name] [package-type] | --library | --application | --tool description: Add and configure new package to workspace with proper structure and dependencies

Add Package to Workspace

Add and configure new project dependencies: $ARGUMENTS

Instructions

  1. Package Definition and Analysis

    • Parse package name and type from arguments: $ARGUMENTS (format: name [type])
    • If no arguments provided, prompt for package name and type
    • Validate package name follows workspace naming conventions
    • Determine package type: library, application, tool, shared, service, component-library
    • Check for naming conflicts with existing packages
  2. Package Structure Creation

    • Create package directory in appropriate workspace location (packages/, apps/, libs/)
    • Set up standard package directory structure based on type:
      • src/ for source code
      • tests/ or __tests__/ for testing
      • docs/ for package documentation
      • examples/ for usage examples (if library)
      • public/ for static assets (if application)
    • Create package-specific configuration files
  3. Package Configuration Setup

    • Generate package.json with proper metadata:
      • Name following workspace conventions
      • Version aligned with workspace strategy
      • Dependencies and devDependencies
      • Scripts for build, test, lint, dev
      • Entry points and exports configuration
    • Configure TypeScript (tsconfig.json) extending workspace settings
    • Set up package-specific linting and formatting rules
  4. Package Type-Specific Setup

    • Library: Configure build system, export definitions, API documentation
    • Application: Set up routing, environment configuration, build optimization
    • Tool: Configure CLI setup, binary exports, command definitions
    • Shared: Set up common utilities, type definitions, shared constants
    • Service: Configure

Tags

CodeAnalysisaitmplclaude-code-templates

From Our Store

View all →
Claude Code

Claude Code Power User Kit

$39+

Advanced Claude Code skills and configurations

OpenClaw

OpenClaw Business Starter Kit

$59+

Set Up Your AI Assistant in 60 Minutes