@code-fixer-23/create-pi-package
v1.2.3
Published
Scaffold PI packages with prompts, skills, and extensions.
Maintainers
Readme
@code-fixer-23/create-pi-package
Scaffold PI packages with the familiar create-* flow.
create-pi-package asks which PI resource folders you want, creates the matching starter files, adds a scripts/create-* helper for each selected resource, and optionally sets up extension testing.
Feature highlights
- Uses a familiar
create-*scaffolding flow for PI packages - Lets you choose one or many resource folders in a single run
- Generates starter files for
extensions,prompts,skills, andthemes - Adds matching
scripts/create-*helpers for every selected resource - Supports creating files in a new folder, an existing folder, or directly in
. - Sets up extension testing with either
jestorvitest - Generates a strict
tsconfig.jsonwhen extension tooling is needed - Creates a ready-to-edit
package.jsonfor extension packages - Auto-detects the invoking package manager for dependency installation
- Can also create
AGENTS.mdandCLAUDE.md
Usage
npm create pi-package
npm create pi-package my-pi-package
npm create pi-package .
npm create pi-package my-pi-package --project-folders extensions prompts --runner vitest- Omit the folder argument to scaffold in the current working directory
- Pass
.to explicitly scaffold in the current working directory - Pass a folder name like
my-pi-packageto create or target that folder
What it generates
Depending on your selections, the package can create:
extensions/index.tsprompts/example.mdskills/example/SKILL.mdthemes/theme.json- matching scaffold scripts in
scripts/ AGENTS.mdandCLAUDE.mdwhen--instructionsis used
If extensions is selected, it also generates:
- a strict
tsconfig.json - either
vitest.config.tsorjest.config.cjs - a
package.jsonwith test scripts and dev dependencies - dependency installation by default
- install commands based on the invoking package manager (
pnpm,npm,yarn, orbun)
Example generated tree
For example, if you choose extensions, prompts, and skills, you will get a structure like this:
my-pi-package/
├── extensions/
│ └── index.ts
├── prompts/
│ └── example.md
├── skills/
│ └── example/
│ └── SKILL.md
├── scripts/
│ ├── create-extension.ts
│ ├── create-prompt.ts
│ └── create-skill.ts
├── package.json
├── tsconfig.json
└── vitest.config.tsIf you choose jest instead of vitest, jest.config.cjs is generated instead of vitest.config.ts.
Prompt flow
Step 1 — Choose what to include
Question:
What do you want to include in this PI package?
Choices are presented in this order:
extensionspromptsskillsthemes
You can select one or many. For every selected folder, create-pi-package creates:
- a starter file in that folder
- a matching
scripts/create-*helper
Bypass key: --project-folders <folders...>
Example:
npm create pi-package my-pi-package --project-folders extensions prompts skillsStep 2 — Choose a test runner
This question is only asked if you selected extensions.
Question:
Which test runner do you want to use?
Choices are presented in this order:
jestvitest
Your choice controls which config file is generated:
jest→jest.config.cjsvitest→vitest.config.ts
A strict tsconfig.json is also generated for extension packages.
Bypass key: --runner <jest|vitest>
Example:
npm create pi-package my-pi-package --project-folders extensions --runner vitestNon-interactive examples
Bypass the folder selection step:
npm create pi-package my-pi-package --project-folders prompts themesBypass the test runner step for an extension package:
npm create pi-package my-pi-package --project-folders extensions --runner jestBypass both interactive steps at once:
npm create pi-package my-pi-package --project-folders extensions prompts skills themes --runner vitestScaffold directly into the current directory:
npm create pi-package . --project-folders prompts themesAdd agent instruction files without prompts:
npm create pi-package my-pi-package --project-folders prompts --instructionsSkip dependency installation for extension scaffolds:
npm create pi-package my-pi-package --project-folders extensions --runner vitest --no-installCLI options
--project-folders <project-folders...>folders to generate--runner <runner>test runner to use whenextensionsis selected--instructionsalso createAGENTS.mdandCLAUDE.md--no-installskip dependency installation
