pf-new-package_skill

This skill helps bootstrap a new package in a mono-repo by generating standard scaffolding and configuration.
  • TypeScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill pluxity/pf-frontend --skill pf-new-package

  • SKILL.md4.6 KB

Overview

This skill guides creating a new shared TypeScript package inside the PF DEV monorepo. It provides a reproducible folder layout, recommended config files, build and lint scripts, and steps to publish and consume the package internally. Use it to add consistent, maintainable packages that integrate with the repo toolchain.

How this skill works

The skill walks through creating a package folder under packages/, scaffolding src files and index exports, and adding package.json, tsconfig.json, vite.config.ts, and ESLint configuration. It explains workspace dependency patterns, build and dev scripts, and how to link and test the package from other apps using pnpm workspaces. It also includes a checklist to validate setup and build.

When to use it

  • Adding a new shared UI, service, or utility package to the monorepo
  • Scaffolding a TypeScript library with proper build and type output
  • Creating a package that will be consumed by other apps in the repo
  • Standardizing package configs and workspace dependency usage
  • Onboarding contributors to package-creation conventions

Best practices

  • Follow the recommended folder structure: src with components, hooks, stores, utils, and types
  • Export only public API via src/index.ts to keep internal implementation private
  • Configure tsconfig to emit declarations and set outDir to dist
  • Use vite build for library output and mark react/react-dom as external
  • Declare peerDependencies for shared libs and devDependencies from workspace packages
  • Run pnpm install and a build test after creating the package to verify workspace resolution

Example use cases

  • Create @pf-dev/ui-button as a reusable UI component package
  • Add @pf-dev/api-client to centralize API calls consumed by multiple apps
  • Implement @pf-dev/map-helpers for CesiumJS utilities used across mapping apps
  • Build @pf-dev/auth-store as a Zustand store package shared by client apps
  • Prototype a small utility package and verify import in an app using workspace:* dependency

FAQ

Configure tsconfig to emit declaration files and set types in package.json to ./dist/index.d.ts; run tsc --emitDeclarationOnly as part of build.

How do I add external dependencies used across packages?

For common shared libs use the catalog entry in pnpm-workspace.yaml and reference them with "catalog:" in package.json. For package-specific deps add them normally in dependencies and run pnpm install.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational