Create New Package

VerifiedSafe

Scaffolds a new package in the Topographic Studio monorepo. Creates the full file structure (package.json, tsconfig, tsup.config, README, src/index.ts) and installs dependencies. Helpful for quickly adding a library, UI component, or utility to the monorepo.

Sby Skills Guide Bot
DevelopmentIntermediate
1606/2/2026
Claude CodeCursorWindsurf
#monorepo#package-scaffold#typescript#workspace-setup

Recommended for

Our review

Scaffolds a new package in the Topographic Studio monorepo with all necessary configuration (package.json, TypeScript, tsup, etc.).

Strengths

  • Automates boilerplate file creation
  • Ensures consistency with the monorepo setup
  • Integrates build and lint scripts
  • Configures exports and dependencies

Limitations

  • Specific to the Topographic Studio monorepo structure
  • Requires Bun and tsup as build tools
  • May need manual adjustments for edge cases
When to use it

When you need to add a new package (library, UI components, types, etc.) to the monorepo.

When not to use it

If your code does not require a build step or you are working outside this monorepo.

Security analysis

Safe
Quality score90/100

The skill creates a new package in a monorepo with Bun, involving standard package installation and build commands. There are no destructive, exfiltrating, or obfuscated actions; the user controls all inputs.

No concerns found

Examples

Create a hooks package
Create a new package called 'hooks' for React custom hooks in the Topographic Studio monorepo.
Create a UI components package
Scaffold a UI component package named 'buttons' with React and TypeScript dependencies.
Create a types package
Generate a new utility package called 'validation' with a description 'Shared validation utilities' and no external dependencies.

New Package Skill

Create a new package in the Topographic Studio monorepo.

Task

You are helping the user scaffold a new package in the monorepo with all necessary configuration.

Instructions

  1. Gather information from the user:

    • Package name (e.g., "hooks", "animations", "api-client")
    • Package description
    • Package type (library, UI components, utilities, types, config)
    • Dependencies needed
  2. Create package structure:

    packages/{name}/
    ├── package.json
    ├── tsconfig.json
    ├── tsup.config.ts (if applicable)
    ├── README.md
    └── src/
        └── index.ts
    
  3. Configure package.json:

    • Name: @topographic-studio/{name}
    • Version: 0.0.1
    • Exports configuration
    • Build scripts
    • Repository info
  4. Add TypeScript config:

    • Extend root tsconfig
    • Configure paths
  5. Create initial source file:

    • Basic export structure
    • Example implementation
  6. Update root package.json:

    • Ensure workspace includes the new package
  7. Install dependencies:

    bun install
    
  8. Verify setup:

    bun run build --filter=@topographic-studio/{name}
    

Package.json Template

{
  "name": "@topographic-studio/{name}",
  "version": "0.0.1",
  "description": "{description}",
  "main": "./dist/index.js",
  "module": "./dist/index.mjs",
  "types": "./dist/index.d.ts",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    }
  },
  "files": ["dist"],
  "scripts": {
    "build": "tsup",
    "dev": "tsup --watch",
    "lint": "biome check .",
    "lint:fix": "biome check --write .",
    "typecheck": "tsc --noEmit"
  },
  "keywords": [],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/leobrival/core.git",
    "directory": "packages/{name}"
  },
  "devDependencies": {
    "tsup": "^8.3.5",
    "typescript": "^5.7.2"
  }
}

Success Criteria

  • Package builds successfully
  • TypeScript types are correct
  • Can be imported from other packages
  • Documentation is complete

Output Format

Created new package: @topographic-studio/{name}

Location: packages/{name}/
Files created:
  ✅ package.json
  ✅ tsconfig.json
  ✅ tsup.config.ts
  ✅ README.md
  ✅ src/index.ts

Next steps:
1. Implement your package logic in src/
2. Add dependencies if needed: bun add -D package-name
3. Build: bun run build --filter=@topographic-studio/{name}
4. Use in other packages: import from "@topographic-studio/{name}"
Related skills