xfi-add-package

Create and integrate a new package into the X-Fidelity monorepo.

1|1|Updated Dec 20, 2023
One-click install
npx skills add https://github.com/zotoio/x-fidelity --skill xfi-add-package
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xfi-add-package
Source: https://github.com/zotoio/x-fidelity/tree/main/.cursor/skills/xfi-add-package
Command: npx skills add https://github.com/zotoio/x-fidelity --skill xfi-add-package

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides teams through adding new packages to the X-Fidelity monorepo, ensuring consistent structure and workflow integration.

Core Features & Use Cases

  • Provides a canonical directory and file layout for new packages, including src/, dist/, package.json, tsconfig.json, and test setup.
  • Ensures root workspace registration and optional turbo.json updates are considered for proper builds and dependency graphs.
  • Use Case: When expanding the monorepo to support a new package, use this skill to create the scaffold and wire it into the build and test pipelines.

Quick Start

Create the package directory structure, add package.json, configure tsconfig, create Jest config and tests, and register the package in the root workspace so it builds with the monorepo.

Frequently Asked Questions about xfi-add-package

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

FAQPage Schema
How do I add a new package to a TypeScript monorepo workspace?

To add a new package to a TypeScript monorepo workspace, you need to scaffold the directory structure, create package.json and tsconfig.json, configure Jest, and register the package in the root workspace to ensure it integrates with existing build pipelines.

What files are required when scaffolding a new package for build and test workflows?

Scaffolding a new package requires creating a canonical directory layout with src/ and dist/ folders, package.json, tsconfig.json, and Jest configuration files to ensure proper build and test workflow integration.

How does workspace registration update the monorepo dependency graph for new packages?

Workspace registration updates the monorepo dependency graph by adding the new package to the root workspace configuration, ensuring it is recognized by build tools and properly linked with other workspace dependencies.

Do I need to update turbo.json when adding a package to a monorepo?

Updating turbo.json is optional when adding a package to a monorepo, but it is recommended to consider updates for proper builds and accurate dependency graph management across the workspace.

Why does my new monorepo package not run Jest tests or build correctly?

A new monorepo package may not build or test correctly if it lacks proper Jest configuration, tsconfig.json setup, or root workspace registration needed to link it with the monorepo build pipelines.

Can I use this scaffolding approach for monorepos without Turbo?

Yes, you can use this scaffolding approach for monorepos without Turbo, as turbo.json updates are optional, but you must still ensure root workspace registration and proper package.json configuration for builds.