feat(skills)!: remove preset gpt-image-2 registry package - #257
Conversation
The `@alwaysmavs/gpt-image-2` package was auto-installed alongside bundled skills and special-cased during uninstall. Removing the preset mechanism decouples bundled installs from the registry, so `oo skills add` and managed install/update no longer reach out for it. A temporary cleanup pass removes any oo-managed gpt-image-2 skills already materialized in AI agents along with their canonical registry sources, sparing users who upgrade from leftover orphaned skills. The cleanup is metadata-gated, so other registry, local, and unmanaged skills are left untouched. Signed-off-by: Kevin Cui <bh@bugs.cc>
Summary by CodeRabbit
WalkthroughThis PR transitions the OO CLI from a preset skill package system to metadata-based skill ownership management. It removes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/application/commands/skills/legacy-gpt-image-2-cleanup.ts (1)
83-149: ⚖️ Poor tradeoffConsider consolidating the legacy skills directory traversal/removal logic across cleanup scripts.
removeLegacyGptImage2SkillsInDirectory+readSkillDirectoryEntryNamesclosely mirror Codex’sremoveLegacyCodexHomeManagedSkills+readSkillDirectoryEntryNames; the only real difference is the per-entry predicate (isLegacyGptImage2SkillDirectoryvsisOoManagedSkillDirectory) and the log message strings. Extract a shared helper that takes the predicate and log messages as parameters, then reuses it from both files.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/application/commands/skills/legacy-gpt-image-2-cleanup.ts` around lines 83 - 149, Extract the duplicated directory-traversal and per-entry removal logic into a shared helper (e.g., removeSkillsInDirectoryWithPredicate) that accepts the skillsDirectoryPath, context, a predicate function (like isLegacyGptImage2SkillDirectory or isOoManagedSkillDirectory), and the two log message strings for success and failure; then implement removeLegacyGptImage2SkillsInDirectory to call this helper with isLegacyGptImage2SkillDirectory and the current success/failure messages, and update the Codex cleanup to call the same helper with its predicate (isOoManagedSkillDirectory) and messages — keep the existing functions removeLegacyGptImage2Skill, isLegacyGptImage2SkillDirectory, and readSkillDirectoryEntryNames but move the concurrent map/remove loop and logging into the new shared helper so both callers reuse it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/application/commands/skills/legacy-gpt-image-2-cleanup.ts`:
- Around line 83-149: Extract the duplicated directory-traversal and per-entry
removal logic into a shared helper (e.g., removeSkillsInDirectoryWithPredicate)
that accepts the skillsDirectoryPath, context, a predicate function (like
isLegacyGptImage2SkillDirectory or isOoManagedSkillDirectory), and the two log
message strings for success and failure; then implement
removeLegacyGptImage2SkillsInDirectory to call this helper with
isLegacyGptImage2SkillDirectory and the current success/failure messages, and
update the Codex cleanup to call the same helper with its predicate
(isOoManagedSkillDirectory) and messages — keep the existing functions
removeLegacyGptImage2Skill, isLegacyGptImage2SkillDirectory, and
readSkillDirectoryEntryNames but move the concurrent map/remove loop and logging
into the new shared helper so both callers reuse it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0846361-3aaa-4cb4-9bc9-b0f2bb4e5724
📒 Files selected for processing (11)
docs/commands.mddocs/commands.zh-CN.mdsrc/application/bootstrap/run-cli.tssrc/application/commands/skills/index.test.tssrc/application/commands/skills/install.tssrc/application/commands/skills/legacy-gpt-image-2-cleanup.test.tssrc/application/commands/skills/legacy-gpt-image-2-cleanup.tssrc/application/commands/skills/preset-packages.tssrc/application/commands/uninstall.cli.test.tssrc/application/self-update/uninstall.test.tssrc/application/self-update/uninstall.ts
💤 Files with no reviewable changes (3)
- src/application/commands/skills/preset-packages.ts
- src/application/commands/skills/install.ts
- src/application/commands/skills/index.test.ts
The
@alwaysmavs/gpt-image-2package was auto-installed alongside bundled skills and special-cased during uninstall. Removing the preset mechanism decouples bundled installs from the registry, sooo skills addand managed install/update no longer reach out for it.A temporary cleanup pass removes any oo-managed gpt-image-2 skills already materialized in AI agents along with their canonical registry sources, sparing users who upgrade from leftover orphaned skills. The cleanup is metadata-gated, so other registry, local, and unmanaged skills are left untouched.