Repository navigation
ci(skills): hide retired skills on ClawHub once the sync has run - #5656
Open
WaterrrForever wants to merge 1 commit into
Open
WaterrrForever wants to merge 1 commit into
WaterrrForever wants to merge 1 commit into
Conversation
clawhub sync stops publishing a retired skill but leaves its last version listed. A new step inspects each RETIRED_SKILLS name under heygen-com and runs `clawhub hide --yes` with its retirement notice for the ones still listed. A hidden skill reads as not found, so later runs hide nothing; a dry run only names the skills still listed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Hide retired skills step to
.github/workflows/sync-skills-to-clawhub.yml. It runs the newscripts/clawhub-unlist-retired.mjs, which hides on ClawHub every name inRETIRED_SKILLS(packages/cli/src/utils/skillsManifest.ts) that is still listed underheygen-com. Each hide records that skill'sretiredSkillNoticeas its moderation note. With the workflow's existingdry_runinput, the step only prints the names that are still listed.Stacked on #5651. The base is
miao/oss-skills-slim, so this diff shows only the ClawHub change. Retarget tomainafter #5651 merges.Why
#5651 retires 14 skills.
clawhub syncstops republishing them, but each one's last version stays listed and installable on ClawHub. A publicclawhub inspect heygen-com/<name> --jsonrun today returns all 14, for examplegeneral-video1.0.28 andhyperframes-core1.0.42.Related work
Refs #5651
How
What ClawHub offers (
clawhub@0.23.1, the version the workflow pins; its--help, itsdist/, and openclaw/clawhubdocs/http-api.md):clawhub hide <skill> [--reason] [--yes]: "Hide one of your skills". Indist/cli/commands/delete.js,cmdHideSkilliscmdDeleteSkillwith different labels. Both sendDELETE /api/v1/skills/{slug}with{ reason, ownerHandle }, which the API docs describe as "Soft-delete / restore a skill (owner, moderator, or admin)".clawhub unhide/clawhub undeleterestore it.GET /api/v1/skills/{slug}returns 404 "Skill not found" for a soft-deleted skill (convex/httpApiV1/skillsV1.ts). The script inspects first and hides only a skill that still resolves, so a rerun makes no hide call.clawhub skill merge <source> <target>also exists. It hides the source listing and keeps the old slug as a redirect to the target. This PR does not use it (see "Left for a human" below).The script follows
scripts/clawhub-sync.mjs: an injectablerun,::error::lines, and a non-zero exit on any refusal or on an inspect failure other than not-found. It importsRETIRED_SKILLSandretiredSkillNoticestraight from the TS manifest; Node 22's default type stripping handles that, because the module imports onlynode:built-ins. The workflow now also triggers on changes to the script and toskillsManifest.ts. Hiding is a separate step, so publishing does not depend on it.Left for a human
CLAWHUB_TOKENaccount holds on theheygen-compublisher. If it is not an owner or admin, the step fails with403/Forbiddenfor each name and the job goes red. Publishing still happens in the earlier step.docs/http-api.md: "Owner-initiated soft deletes reserve the slug for 30 days, then the slug can be claimed by another publisher"). Owner-scoped refs (heygen-com/<name>) are unaffected. If the barehyperframes-*names should stay ours, runclawhub skill merge heygen-com/<name> heygen-com/hyperframesinstead (media-useforhyperframes-audio). That keeps each slug as a permanent redirect, but it is a one-way owner decision, so this PR does not automate it.Test plan
node --import tsx --test scripts/clawhub-unlist-retired.test.mjs scripts/clawhub-sync.test.mjs→ 17 tests, 17 pass. The new tests cover: hides only the listed names; a second run hides nothing; a moderation-only inspect result counts as unlisted; dry run names without hiding; an inspect error other than not-found is reported without hiding; a refused hide is reported; and end to end with a fakeclawhubonPATH, all 14 manifest names print and a refusal exits 1.clawhub@0.23.1onPATH):DRY_RUN=true node scripts/clawhub-unlist-retired.mjs→ exit 0 and "Retired skills still listed on ClawHub (dry run):" followed by all 14 names.DRY_RUNand with no token, every hide stops locally withError: Not logged in. Run: clawhub loginand the script exits 1. No request is sent.bun run lint→ exit 0 (0 warnings, 0 errors)bunx oxfmt --checkon the four changed files → "All matched files use the correct format."COMMENT_CHECK_BASE=origin/miao/oss-skills-slim node scripts/check-comment-citations.mjs→comments: OK (2 file(s) examined of 4 in scope);comment-ratchet.mjs→ OKbun run test:scripts→ 728 pass, 5 fail. The failures (creator-editing-recipes,generate-catalog-previews,verify-catalog-payloads) fail the same way on the feat(skills)!: publish seven knowledge skills aligned with Studio and retire the workflow skills #5651 base without this change.No visible change
CI and scripts only. Nothing under
packages/studioorpackages/playerchanges.🤖 Generated with Claude Code