The design language that makes your AI harness better at design.
JavaScript
feat: add Pi provider support, fix community health files, recategorize /onboard
Paul Bakausbb5ba2f305b7
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSindex 3f05027f0..449b311f2 100644--- a/.github/CODEOWNERS+++ b/.github/CODEOWNERS@@ -1,8 +1,8 @@# Global ownership — auto-request review from Paul on every PR-* @paulbakaus+* @pbakaus# Build system-scripts/ @paulbakaus+scripts/ @pbakaus# Source content (skills & commands)-source/ @paulbakaus+source/ @pbakausdiff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.mdindex c9b948840..13db4f81c 100644--- a/.github/ISSUE_TEMPLATE/bug_report.md+++ b/.github/ISSUE_TEMPLATE/bug_report.md@@ -22,7 +22,7 @@ assignees: ''## Provider & environment-- **Provider** (Cursor / Claude Code / Gemini CLI / Codex):+- **Provider** (Cursor / Claude Code / Gemini CLI / Codex / Copilot / Kiro / OpenCode):- **Provider version**:- **OS**:diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.mdindex c944acf08..bb65c9ab4 100644--- a/.github/ISSUE_TEMPLATE/feature_request.md+++ b/.github/ISSUE_TEMPLATE/feature_request.md@@ -20,6 +20,9 @@ assignees: ''- [ ] Claude Code- [ ] Gemini CLI- [ ] Codex CLI+- [ ] VS Code Copilot+- [ ] Kiro+- [ ] OpenCode- [ ] All providers## Alternatives considereddiff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.mdindex 187df633c..ca7a5046e 100644--- a/.github/PULL_REQUEST_TEMPLATE.md+++ b/.github/PULL_REQUEST_TEMPLATE.md@@ -17,5 +17,5 @@- [ ] Source files updated in `source/`- [ ] `bun run build` ran successfully- [ ] `bun test` passes-- [ ] Tested with at least one provider (Cursor / Claude Code / Gemini CLI / Codex)+- [ ] Tested with at least one provider (Cursor / Claude Code / Gemini CLI / Codex / Copilot / Kiro / OpenCode)- [ ] README / DEVELOP.md updated if neededdiff --git a/DEVELOP.md b/DEVELOP.mdindex 2ef211f54..f7a2d528b 100644--- a/DEVELOP.md+++ b/DEVELOP.md@@ -131,6 +131,11 @@ source/ → dist/- Uses same SKILL.md format as Claude Code- Reference files in subdirectories+### Pi (Agent Skills Standard)+- Skills → Agent Skills standard → `dist/pi/.pi/skills/{name}/SKILL.md`+ - Standard frontmatter: name, description, license, compatibility, metadata+ - Reference files in skill subdirectories+## Adding New Content### 1. Create Source File@@ -218,6 +223,7 @@ The build system (`scripts/build.js`) is a single ~170-line Node.js script with:- [Gemini CLI Skills](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/gemini-md.md)- [Codex CLI Slash Commands](https://developers.openai.com/codex/guides/slash-commands#create-your-own-slash-commands-with-custom-prompts)- [Codex CLI Skills](https://developers.openai.com/codex/skills/)+- [Pi Skills](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/skills.md)## Repository Structure@@ -232,7 +238,11 @@ impeccable/│ ├── cursor/│ ├── claude-code/│ ├── gemini/-│ └── codex/+│ ├── codex/+│ ├── agents/+│ ├── kiro/+│ ├── opencode/+│ └── pi/├── scripts/│ └── build.js # Build system (~170 lines, zero deps)├── package.json # ESM project configdiff --git a/README.md b/README.mdindex 5604ba17f..973da610e 100644--- a/README.md+++ b/README.md@@ -100,6 +100,11 @@ cp -r dist/claude-code/.claude/* ~/.claude/cp -r dist/opencode/.opencode your-project/```+**Pi:**+```bash+cp -r dist/pi/.pi your-project/+```+**Gemini CLI:**```bashcp -r dist/gemini/.gemini your-project/@@ -142,8 +147,11 @@ Most commands accept an optional argument to focus on a specific area:- [Cursor](https://cursor.com)- [Claude Code](https://claude.ai/code)- [OpenCode](https://opencode.ai)+- [Pi](https://pi.dev)- [Gemini CLI](https://github.com/google-gemini/gemini-cli)- [Codex CLI](https://github.com/openai/codex)+- [VS Code Copilot](https://code.visualstudio.com)+- [Kiro](https://kiro.dev)## Contributingdiff --git a/public/assets/pi-logo.svg b/public/assets/pi-logo.svgnew file mode 100644index 000000000..ed14b6380--- /dev/null+++ b/public/assets/pi-logo.svg@@ -0,0 +1,22 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">+ <!-- P shape: outer boundary clockwise, inner hole counter-clockwise -->+ <path fill="#fff" fill-rule="evenodd" d="+ M165.29 165.29+ H517.36+ V400+ H400+ V517.36+ H282.65+ V634.72+ H165.29+ Z+ M282.65 282.65+ V400+ H400+ V282.65+ Z+ "/>+ <!-- i dot -->+ <path fill="#fff" d="M517.36 400 H634.72 V634.72 H517.36 Z"/>+</svg>diff --git a/public/cheatsheet.html b/public/cheatsheet.htmlindex a387c2283..179a09307 100644--- a/public/cheatsheet.html+++ b/public/cheatsheet.html@@ -201,7 +201,7 @@'delight': 'enhancement','extract': 'system','adapt': 'adaptation',- 'onboard': 'system'+ 'onboard': 'enhancement'};const commandRelationships = {@@ -221,7 +221,7 @@'delight': { combinesWith: ['bolder', 'animate'], flow: 'Add personality' },'extract': { flow: 'Create design system elements' },'adapt': { combinesWith: ['normalize', 'clarify'], flow: 'Different devices/contexts' },- 'onboard': { flow: 'Onboarding & empty states' }+ 'onboard': { combinesWith: ['clarify', 'delight'], flow: 'Onboarding & empty states' }};async function loadCommands() {diff --git a/public/index.html b/public/index.htmlindex ed838f481..d15179780 100644--- a/public/index.html+++ b/public/index.html@@ -72,6 +72,9 @@<img src="https://img.logo.dev/openai.com?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Codex CLI" width="20" height="20" loading="lazy"><img src="https://img.logo.dev/github.com?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="VS Code Copilot" width="20" height="20" loading="lazy"><img src="https://img.logo.dev/antigravity.google?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Antigravity" width="20" height="20" loading="lazy">+ <img src="https://img.logo.dev/kiro.dev?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Kiro" width="20" height="20" loading="lazy">+ <img src="https://img.logo.dev/opencode.ai?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="OpenCode" width="20" height="20" loading="lazy">+ <img src="assets/pi-logo.svg" alt="Pi" width="20" height="20" loading="lazy" style="background:#1a1a1a;border-radius:50%;padding:3px"></div></div></div>@@ -285,6 +288,14 @@<img src="https://img.logo.dev/kiro.dev?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="Kiro" width="20" height="20" loading="lazy"><span>Kiro</span></div>+ <div class="install-provider-badge">+ <img src="https://img.logo.dev/opencode.ai?token=pk_dtRHfeTyRzG5zZInUc65Xw&size=64&format=png" alt="OpenCode" width="20" height="20" loading="lazy">+ <span>OpenCode</span>+ </div>+ <div class="install-provider-badge">+ <img src="assets/pi-logo.svg" alt="Pi" width="20" height="20" loading="lazy" style="background:#1a1a1a;border-radius:50%;padding:3px">+ <span>Pi</span>+ </div></div></div>diff --git a/public/js/data.js b/public/js/data.jsindex 7069f233c..15f3f6cab 100644--- a/public/js/data.js+++ b/public/js/data.js@@ -73,7 +73,7 @@ export const commandCategories = {'delight': 'enhancement','extract': 'system','adapt': 'adaptation',- 'onboard': 'system'+ 'onboard': 'enhancement'};// Skill relationships - now consolidated into frontend-design skill@@ -102,6 +102,6 @@ export const commandRelationships = {'delight': { combinesWith: ['bolder', 'animate'], flow: 'Enhancement: Add personality' },'extract': { flow: 'System: Create design system elements' },'adapt': { combinesWith: ['normalize', 'clarify'], flow: 'Adaptation: Different devices/contexts' },- 'onboard': { flow: 'System: Onboarding & empty states' }+ 'onboard': { combinesWith: ['clarify', 'delight'], flow: 'Enhancement: Onboarding & empty states' }};diff --git a/scripts/build.js b/scripts/build.jsindex 0115e6046..0a37905e6 100644--- a/scripts/build.js+++ b/scripts/build.js@@ -25,7 +25,8 @@ import {transformCodex,transformAgents,transformKiro,- transformOpenCode+ transformOpenCode,+ transformPi} from './lib/transformers/index.js';import { createAllZips } from './lib/zip.js';import { execSync } from 'child_process';@@ -147,7 +148,8 @@ function assembleUniversal(distDir, suffix = '') {{ provider: 'codex', configDir: '.codex' },{ provider: 'agents', configDir: '.agents' },{ provider: 'kiro', configDir: '.kiro' },- { provider: 'opencode', configDir: '.opencode' }+ { provider: 'opencode', configDir: '.opencode' },+ { provider: 'pi', configDir: '.pi' }];for (const { provider, configDir } of providerMappings) {@@ -174,6 +176,7 @@ This folder contains skills for all supported tools:.agents/ → VS Code Copilot, Antigravity.kiro/ → Kiro.opencode/ → OpenCode+ .pi/ → PiTo install, copy the relevant folder(s) into your project root.These are hidden folders (dotfiles) — press Cmd+Shift+. in Finder to see them.@@ -306,6 +309,7 @@ async function build() {transformAgents(skills, DIST_DIR, patterns);transformKiro(skills, DIST_DIR, patterns);transformOpenCode(skills, DIST_DIR, patterns);+ transformPi(skills, DIST_DIR, patterns);// Transform for each provider (prefixed with i-)const prefixOptions = { prefix: 'i-', outputSuffix: '-prefixed' };@@ -316,6 +320,7 @@ async function build() {transformAgents(skills, DIST_DIR, patterns, prefixOptions);transformKiro(skills, DIST_DIR, patterns, prefixOptions);transformOpenCode(skills, DIST_DIR, patterns, prefixOptions);+ transformPi(skills, DIST_DIR, patterns, prefixOptions);// Assemble universal directory (unprefixed and prefixed)assembleUniversal(DIST_DIR);diff --git a/scripts/lib/transformers/index.js b/scripts/lib/transformers/index.jsindex 6bb52d985..da00044f3 100644--- a/scripts/lib/transformers/index.js+++ b/scripts/lib/transformers/index.js@@ -5,3 +5,4 @@ export { transformCodex } from './codex.js';export { transformAgents } from './agents.js';export { transformKiro } from './kiro.js';export { transformOpenCode } from "./opencode.js";+export { transformPi } from './pi.js';diff --git a/scripts/lib/transformers/pi.js b/scripts/lib/transformers/pi.jsnew file mode 100644index 000000000..d78d4a59c--- /dev/null+++ b/scripts/lib/transformers/pi.js@@ -0,0 +1,65 @@+import path from 'path';+import { cleanDir, ensureDir, writeFile, generateYamlFrontmatter, replacePlaceholders, prefixSkillReferences } from '../utils.js';++/**+ * Pi Transformer (Skills Only)+ *+ * All skills output to .pi/skills/{name}/SKILL.md+ * Frontmatter: name, description, license, compatibility, metadata+ *+ * @param {Array} skills - All skills (including user-invokable ones)+ * @param {string} distDir - Distribution output directory+ * @param {Object} patterns - Design patterns data (unused)+ * @param {Object} options - Optional settings+ * @param {string} options.prefix - Prefix to add to skill names (e.g., 'i-')+ * @param {string} options.outputSuffix - Suffix for output directory (e.g., '-prefixed')+ */+export function transformPi(skills, distDir, patterns = null, options = {}) {+ const { prefix = '', outputSuffix = '' } = options;+ const piDir = path.join(distDir, `pi${outputSuffix}`);+ const skillsDir = path.join(piDir, '.pi/skills');++ cleanDir(piDir);+ ensureDir(skillsDir);++ const allSkillNames = skills.map(s => s.name);+ const commandNames = skills.filter(s => s.userInvokable).map(s => `${prefix}${s.name}`);+ let refCount = 0;+ for (const skill of skills) {+ const skillName = `${prefix}${skill.name}`;+ const skillDir = path.join(skillsDir, skillName);++ const frontmatterObj = {+ name: skillName,+ description: skill.description,+ };++ if (skill.license) frontmatterObj.license = skill.license;+ if (skill.compatibility) frontmatterObj.compatibility = skill.compatibility;+ if (skill.metadata) frontmatterObj.metadata = skill.metadata;++ const frontmatter = generateYamlFrontmatter(frontmatterObj);+ let skillBody = replacePlaceholders(skill.body, 'pi', commandNames);+ if (prefix) skillBody = prefixSkillReferences(skillBody, prefix, allSkillNames);+ const content = `${frontmatter}\n\n${skillBody}`;+ const outputPath = path.join(skillDir, 'SKILL.md');+ writeFile(outputPath, content);++ // Copy reference files if they exist+ if (skill.references && skill.references.length > 0) {+ const refDir = path.join(skillDir, 'reference');+ ensureDir(refDir);+ for (const ref of skill.references) {+ const refOutputPath = path.join(refDir, `${ref.name}.md`);+ const refContent = replacePlaceholders(ref.content, 'pi');+ writeFile(refOutputPath, refContent);+ refCount++;+ }+ }+ }++ const userInvokableCount = skills.filter(s => s.userInvokable).length;+ const refInfo = refCount > 0 ? ` (${refCount} reference files)` : '';+ const prefixInfo = prefix ? ` [${prefix}prefixed]` : '';+ console.log(`✓ Pi${prefixInfo}: ${skills.length} skills (${userInvokableCount} user-invokable)${refInfo}`);+}diff --git a/scripts/lib/utils.js b/scripts/lib/utils.jsindex 433e1f85b..af8d68a37 100644--- a/scripts/lib/utils.js+++ b/scripts/lib/utils.js@@ -298,6 +298,11 @@ export const PROVIDER_PLACEHOLDERS = {model: 'Claude',config_file: 'OPENCODE.md',ask_instruction: 'STOP and call the AskUserQuestionTool to clarify.',+ },+ 'pi': {+ model: 'the model',+ config_file: 'AGENTS.md',+ ask_instruction: 'ask the user directly to clarify what you cannot infer.'}};diff --git a/tests/lib/transformers/pi.test.js b/tests/lib/transformers/pi.test.jsnew file mode 100644index 000000000..32fc172b6--- /dev/null+++ b/tests/lib/transformers/pi.test.js@@ -0,0 +1,302 @@+import { describe, test, expect, beforeEach, afterEach, mock } from 'bun:test';+import fs from 'fs';+import path from 'path';+import { transformPi } from '../../../scripts/lib/transformers/pi.js';+import { parseFrontmatter } from '../../../scripts/lib/utils.js';++const TEST_DIR = path.join(process.cwd(), 'test-tmp-pi');++describe('transformPi', () => {+ beforeEach(() => {+ if (fs.existsSync(TEST_DIR)) {+ fs.rmSync(TEST_DIR, { recursive: true, force: true });+ }+ });++ afterEach(() => {+ if (fs.existsSync(TEST_DIR)) {+ fs.rmSync(TEST_DIR, { recursive: true, force: true });+ }+ });++ test('should create correct directory structure', () => {+ transformPi([], TEST_DIR);+ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills'))).toBe(true);+ });++ test('should create skill with full frontmatter', () => {+ const skills = [+ {+ name: 'test-skill',+ description: 'A test skill',+ license: 'MIT',+ body: 'Skill instructions.'+ }+ ];++ transformPi(skills, TEST_DIR);++ const outputPath = path.join(TEST_DIR, 'pi/.pi/skills/test-skill/SKILL.md');+ expect(fs.existsSync(outputPath)).toBe(true);++ const content = fs.readFileSync(outputPath, 'utf-8');+ const parsed = parseFrontmatter(content);++ expect(parsed.frontmatter.name).toBe('test-skill');+ expect(parsed.frontmatter.description).toBe('A test skill');+ expect(parsed.frontmatter.license).toBe('MIT');+ expect(parsed.body).toBe('Skill instructions.');+ });++ test('should include compatibility in frontmatter', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ compatibility: 'pi',+ body: 'Body'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).toContain('compatibility: pi');+ });++ test('should include metadata in frontmatter', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ metadata: 'some-metadata',+ body: 'Body'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).toContain('metadata: some-metadata');+ });++ test('should not include user-invokable in frontmatter (Pi does not use it)', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ userInvokable: true,+ body: 'Body'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).not.toContain('user-invokable');+ });++ test('should handle multiple skills', () => {+ const skills = [+ { name: 'skill1', description: 'Skill 1', body: 'Body 1' },+ { name: 'skill2', description: 'Skill 2', body: 'Body 2' },+ { name: 'skill3', description: 'Skill 3', body: 'Body 3' }+ ];++ transformPi(skills, TEST_DIR);++ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills/skill1/SKILL.md'))).toBe(true);+ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills/skill2/SKILL.md'))).toBe(true);+ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills/skill3/SKILL.md'))).toBe(true);+ });++ test('should replace {{model}} placeholder', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ body: 'Ask {{model}} for help.'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).toContain('Ask the model for help.');+ });++ test('should replace {{config_file}} placeholder', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ body: 'See {{config_file}} for details.'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).toContain('See AGENTS.md for details.');+ });++ test('should replace {{available_commands}} placeholder', () => {+ const skills = [+ { name: 'audit', description: 'Audit', userInvokable: true, body: 'Available: {{available_commands}}' },+ { name: 'polish', description: 'Polish', userInvokable: true, body: 'Polish body.' }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/audit/SKILL.md'), 'utf-8');+ expect(content).toContain('Available: /audit, /polish');+ });++ test('should copy reference files', () => {+ const skills = [+ {+ name: 'frontend-design',+ description: 'Design skill',+ body: 'Design instructions.',+ references: [+ { name: 'typography', content: 'Typography reference', filePath: '/fake/path/typography.md' },+ { name: 'color', content: 'Color reference', filePath: '/fake/path/color.md' }+ ]+ }+ ];++ transformPi(skills, TEST_DIR);++ const typoPath = path.join(TEST_DIR, 'pi/.pi/skills/frontend-design/reference/typography.md');+ const colorPath = path.join(TEST_DIR, 'pi/.pi/skills/frontend-design/reference/color.md');++ expect(fs.existsSync(typoPath)).toBe(true);+ expect(fs.existsSync(colorPath)).toBe(true);+ expect(fs.readFileSync(typoPath, 'utf-8')).toBe('Typography reference');+ });++ test('should replace placeholders in reference files without commandNames', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ userInvokable: true,+ body: 'Body with {{available_commands}}.',+ references: [+ { name: 'ref', content: 'Use {{model}} with {{config_file}}. Commands: {{available_commands}}.', filePath: '/fake/ref.md' }+ ]+ }+ ];++ transformPi(skills, TEST_DIR);++ const refContent = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/reference/ref.md'), 'utf-8');+ expect(refContent).toContain('Use the model with AGENTS.md.');+ // Reference files should NOT get commandNames, so {{available_commands}} becomes empty string+ expect(refContent).toContain('Commands: .');+ });++ test('should support prefix option', () => {+ const skills = [+ { name: 'audit', description: 'Audit', userInvokable: true, body: 'Audit body' }+ ];++ transformPi(skills, TEST_DIR, null, { prefix: 'i-', outputSuffix: '-prefixed' });++ const outputPath = path.join(TEST_DIR, 'pi-prefixed/.pi/skills/i-audit/SKILL.md');+ expect(fs.existsSync(outputPath)).toBe(true);++ const content = fs.readFileSync(outputPath, 'utf-8');+ expect(content).toContain('name: i-audit');+ });++ test('should prefix skill references in body when prefix is set', () => {+ const skills = [+ { name: 'audit', description: 'Audit', userInvokable: true, body: 'Run /polish after the audit skill.' },+ { name: 'polish', description: 'Polish', userInvokable: true, body: 'Polish body.' }+ ];++ transformPi(skills, TEST_DIR, null, { prefix: 'i-', outputSuffix: '-prefixed' });++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi-prefixed/.pi/skills/i-audit/SKILL.md'), 'utf-8');+ expect(content).toContain('/i-polish');+ expect(content).toContain('the i-audit skill');+ });++ test('should clean existing directory before writing', () => {+ const existingDir = path.join(TEST_DIR, 'pi/.pi/skills/old');+ fs.mkdirSync(existingDir, { recursive: true });+ fs.writeFileSync(path.join(existingDir, 'SKILL.md'), 'old');++ const skills = [{ name: 'new', description: 'New', body: 'New' }];+ transformPi(skills, TEST_DIR);++ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills/old/SKILL.md'))).toBe(false);+ expect(fs.existsSync(path.join(TEST_DIR, 'pi/.pi/skills/new/SKILL.md'))).toBe(true);+ });++ test('should log correct summary', () => {+ const consoleMock = mock(() => {});+ const originalLog = console.log;+ console.log = consoleMock;++ const skills = [+ { name: 'skill1', description: 'Test', userInvokable: true, body: 'body' },+ { name: 'skill2', description: 'Test', userInvokable: false, body: 'body' }+ ];++ transformPi(skills, TEST_DIR);++ console.log = originalLog;++ expect(consoleMock).toHaveBeenCalledWith(expect.stringContaining('✓ Pi:'));+ expect(consoleMock).toHaveBeenCalledWith(expect.stringContaining('2 skills'));+ expect(consoleMock).toHaveBeenCalledWith(expect.stringContaining('1 user-invokable'));+ });++ test('should log reference file count', () => {+ const consoleMock = mock(() => {});+ const originalLog = console.log;+ console.log = consoleMock;++ const skills = [+ {+ name: 'test',+ description: 'Test',+ body: 'Body.',+ references: [+ { name: 'ref1', content: 'Ref 1', filePath: '/fake/ref1.md' }+ ]+ }+ ];++ transformPi(skills, TEST_DIR);++ console.log = originalLog;++ expect(consoleMock).toHaveBeenCalledWith(expect.stringContaining('1 reference files'));+ });++ test('should handle empty skills array', () => {+ transformPi([], TEST_DIR);++ const skillDirs = fs.readdirSync(path.join(TEST_DIR, 'pi/.pi/skills'));+ expect(skillDirs).toHaveLength(0);+ });++ test('should not include license if empty', () => {+ const skills = [+ {+ name: 'test',+ description: 'Test',+ license: '',+ body: 'Body'+ }+ ];++ transformPi(skills, TEST_DIR);++ const content = fs.readFileSync(path.join(TEST_DIR, 'pi/.pi/skills/test/SKILL.md'), 'utf-8');+ expect(content).not.toContain('license:');+ });+});