Skip to content

feat(skills)!: remove preset gpt-image-2 registry package - #257

Merged
BlackHole1 merged 1 commit into
mainfrom
remove-gpt-image-2
Jun 2, 2026
Merged

feat(skills)!: remove preset gpt-image-2 registry package#257
BlackHole1 merged 1 commit into
mainfrom
remove-gpt-image-2

Conversation

@BlackHole1

Copy link
Copy Markdown
Member

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.

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>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Summary by CodeRabbit

  • New Features

    • Added legacy cleanup for outdated skill installations to improve compatibility.
  • Bug Fixes

    • Enhanced skill removal safety with improved ownership detection via metadata validation.
    • Directories without valid metadata are now protected from deletion.
  • Documentation

    • Clarified install/update behavior regarding bundled skills refresh.
    • Updated uninstall documentation for accurate defaults and removal criteria.
    • Revised skills install documentation for bundled skills default installation.

Walkthrough

This PR transitions the OO CLI from a preset skill package system to metadata-based skill ownership management. It removes presetSkillPackageNames constants and references, updates oo skills install to install bundled skills by default instead of preset registry packages, changes uninstall logic to respect .oo-metadata.json ownership indicators instead of preset lists, and adds a legacy cleanup routine for deprecated @alwaysmavs/gpt-image-2 managed skills that runs during CLI bootstrap. Documentation is updated in both English and Chinese to reflect the new behavior.

Possibly related PRs

  • oomol-lab/oo-cli#165: Previously added preset-registry package installs to skills install and self-update flows that this PR removes entirely.
  • oomol-lab/oo-cli#245: Related PR for oo uninstall feature; main PR removes the presetSkillPackageNames-driven preset-registry behavior that informed removal semantics.
  • oomol-lab/oo-cli#177: Both modify src/application/commands/skills/install.ts to change how oo skills install interprets arguments and selects bundled vs registry install behavior.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format with type, scope, and subject, and accurately describes the main change: removing the preset gpt-image-2 registry package mechanism.
Description check ✅ Passed The description clearly relates to the changeset, explaining the removal of the preset mechanism, decoupling from registry, and the metadata-gated cleanup pass for existing installations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch remove-gpt-image-2

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/application/commands/skills/legacy-gpt-image-2-cleanup.ts (1)

83-149: ⚖️ Poor tradeoff

Consider consolidating the legacy skills directory traversal/removal logic across cleanup scripts.

removeLegacyGptImage2SkillsInDirectory + readSkillDirectoryEntryNames closely mirror Codex’s removeLegacyCodexHomeManagedSkills + readSkillDirectoryEntryNames; the only real difference is the per-entry predicate (isLegacyGptImage2SkillDirectory vs isOoManagedSkillDirectory) 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

📥 Commits

Reviewing files that changed from the base of the PR and between 598dd0d and aa804d1.

📒 Files selected for processing (11)
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/application/bootstrap/run-cli.ts
  • src/application/commands/skills/index.test.ts
  • src/application/commands/skills/install.ts
  • src/application/commands/skills/legacy-gpt-image-2-cleanup.test.ts
  • src/application/commands/skills/legacy-gpt-image-2-cleanup.ts
  • src/application/commands/skills/preset-packages.ts
  • src/application/commands/uninstall.cli.test.ts
  • src/application/self-update/uninstall.test.ts
  • src/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

@BlackHole1
BlackHole1 merged commit eccb7b8 into main Jun 2, 2026
6 checks passed
@BlackHole1
BlackHole1 deleted the remove-gpt-image-2 branch June 2, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant