Add Package
Add and configure new package to workspace with proper structure and dependencies
$ npx claude-code-templates@latest --command="project-management/add-package" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
Add Package to Workspace
Add and configure new project dependencies: $ARGUMENTS
Instructions
- Package Definition and Analysis
$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
- Package Structure Creation
- 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
- Package Configuration Setup
- 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
- Package Type-Specific Setup
- 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 server setup, API routes, database connections
- Component Library: Set up Storybook, component exports, styling system
- Workspace Integration
- Configure package dependencies and peer dependencies
- Set up cross-package imports and references
- Configure workspace-wide build order and dependencies
- Add package to workspace scripts and task runners
- Development Environment
- Set up hot reloading and watch mode
- Configure debugging and source maps
- Set up development proxy and API mocking (if needed)
- Configure environment variable management
- Testing Infrastructure
- Create initial test files and examples
- Configure test coverage reporting
- Set up package-specific test scripts
- Configure integration testing with other workspace packages
- Build and Deployment
- Set up build artifacts and output directories
- Configure bundling and optimization
- Set up package publishing configuration (if library)
- Configure deployment scripts (if application)
- Documentation and Examples
- Set up API documentation generation
- Create usage examples and demos
- Document package architecture and design decisions
- Add package to workspace documentation
- Validation and Integration Testing
- Test package installation and imports
- Validate workspace dependency resolution
- Test development workflow and hot reloading
- Verify CI/CD pipeline includes new package
- Test cross-package functionality and integration
Related Claude Code Commands
Todo
Manage project todos in todos.md file
Create Prd
Create Product Requirements Document (PRD) for new features
Init Project
Initialize new project with essential structure, configuration, and development environment setup
Create Feature
Scaffold new feature with boilerplate code, tests, and documentation
Project Health Check
Analyze overall project health and generate comprehensive metrics report
Create Prp
Create comprehensive Product Requirement Prompt (PRP) with research and validation
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.