new-package

Scaffold a new monorepo package with workspace wiring and TypeScript configuration.

1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/jamesaphoenix/tx-agent-kit --skill new-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-package
Source: https://github.com/jamesaphoenix/tx-agent-kit/tree/main/.claude/skills/new-package
Command: npx skills add https://github.com/jamesaphoenix/tx-agent-kit --skill new-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolds a new package in the monorepo with correct workspace wiring, TypeScript configuration, and path aliases, reducing manual setup time.

Core Features & Use Cases

  • Package creation: creates a new package directory under the appropriate path (packages/<category-path>/<name>/src) and wires it into the monorepo.
  • Standardized metadata: generates package.json with the @tx-agent-kit scope (name @tx-agent-kit/<name>), default version, "module" type, and basic scripts for build, type-check, lint, and tests.
  • TypeScript & tooling setup: creates tsconfig.json with the proper extends and root/out dirs and adds vitest.config.ts for unit tests.
  • Source entry: adds a minimal src/index.ts as a barrel export.
  • Workspace wiring: updates tsconfig.base.json to register the path alias @tx-agent-kit/<name>.
  • Verification & onboarding: provides a repeatable workflow and a checklist to verify the new package compiles and tests run.

Quick Start

Execute the scaffold workflow by running pnpm install, pnpm env:configure, and then following the steps in this Skill to create and wire the new package.

Frequently Asked Questions about new-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new monorepo package with TypeScript configuration and workspace wiring?

To scaffold a new monorepo package, use the new-package Skill to generate the directory structure, package.json, tsconfig.json, vitest.config.ts, and src/index.ts, while updating tsconfig.base.json path aliases for proper workspace wiring.

What's the best way to add a new package to a pnpm workspace without manual setup errors?

The best way to add a new package to a pnpm workspace is using an automated scaffolding workflow that creates standardized metadata, TypeScript configurations, and barrel exports, then updates tsconfig.base.json path aliases automatically to prevent manual wiring errors.

Does scaffolding a monorepo package update tsconfig.base.json path aliases automatically?

Yes, scaffolding a monorepo package updates tsconfig.base.json automatically by registering the path alias @tx-agent-kit/<name>, ensuring the new package is immediately resolvable across the workspace.

Can I create a new TypeScript package under the infra or tooling directories instead of packages?

Yes, you can create a new TypeScript package under infra/ or tooling/ directories. The scaffolding workflow targets developers adding packages across packages/, infra/, or tooling paths with consistent layout and tooling integration.

What files are generated when creating a new package in a TypeScript monorepo?

Creating a new package in a TypeScript monorepo generates package.json with build and test scripts, tsconfig.json with proper extends, vitest.config.ts for unit tests, and a minimal src/index.ts barrel export.

How do I verify a newly scaffolded monorepo package compiles and tests run correctly?

To verify a newly scaffolded monorepo package, follow the provided repeatable workflow checklist to run pnpm install, execute build and type-check scripts, and confirm vitest unit tests pass successfully.