Skip to main content
GeneralClipboardHealth

local-package

Use Clipboard's internal CLI to link and unlink @clipboard-health packages across repositories for local development. Use when testing local package changes, linking @clipboard-health packages between repos, or using the cbh CLI local-package command.

Stars
66
Source
ClipboardHealth/core-utils
Updated
2026-05-31
Slug
ClipboardHealth--core-utils--local-package
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/ClipboardHealth/core-utils/HEAD/.agents/skills/local-package/SKILL.md -o .claude/skills/local-package.md

Drops the SKILL.md into .claude/skills/local-package.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

Local Package Development

Use Clipboard's internal CLI (@clipboard-health/cli) to test package changes across repositories without publishing. The cbh local-package command wraps yalc to simplify linking packages between sibling repositories.

Prerequisites

See the CLI README for setup instructions.

Commands

Link packages

From the consuming repository, link packages from sibling repos:

cbh local-package link --packages <package-names...>

Example:

cbh local-package link --packages util-ts

This will:

  1. Find the package in sibling packages/* directories
  2. Build the package with nx
  3. Push the built package to yalc
  4. Update your package.json to use the yalc version

Unlink packages

After testing, restore the published package versions:

cbh local-package unlink --packages <package-names...>

Example:

cbh local-package unlink --packages util-ts

Workflow Example

To test changes to util-ts in cbh-mobile-app:

  1. Make changes to util-ts in core-utils

  2. From cbh-mobile-app root, run:

    cbh local-package link --packages util-ts
    
  3. Test your changes in cbh-mobile-app

  4. When done, unlink:

    cbh local-package unlink --packages util-ts
    

Troubleshooting

  • Package not found: Ensure the package exists in a sibling repo's packages/ directory
  • Build fails: The package must have a valid nx build target
  • Changes not reflected: Run npm install after linking to pull in the yalc version