feat(ce-update): add plugin version check skill and ce_platforms filtering (#532)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trevin Chow
2026-04-08 00:09:02 -07:00
committed by GitHub
parent 0ae91dcc29
commit d37f0ed16f
17 changed files with 163 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
import { formatFrontmatter } from "../utils/frontmatter"
import type { ClaudeAgent, ClaudeCommand, ClaudeMcpServer, ClaudePlugin } from "../types/claude"
import { type ClaudeAgent, type ClaudeCommand, type ClaudeMcpServer, type ClaudePlugin, filterSkillsByPlatform } from "../types/claude"
import type {
PiBundle,
PiGeneratedSkill,
@@ -17,8 +17,9 @@ export function convertClaudeToPi(
plugin: ClaudePlugin,
_options: ClaudeToPiOptions,
): PiBundle {
const platformSkills = filterSkillsByPlatform(plugin.skills, "pi")
const promptNames = new Set<string>()
const usedSkillNames = new Set<string>(plugin.skills.map((skill) => normalizeName(skill.name)))
const usedSkillNames = new Set<string>(platformSkills.map((skill) => normalizeName(skill.name)))
const prompts = plugin.commands
.filter((command) => !command.disableModelInvocation)
@@ -35,7 +36,7 @@ export function convertClaudeToPi(
return {
prompts,
skillDirs: plugin.skills.map((skill) => ({
skillDirs: platformSkills.map((skill) => ({
name: skill.name,
sourceDir: skill.sourceDir,
})),