本文へ移動
cccskills
無料GitHub で公開

skill-lifecycle

The authoritative skill lifecycle state model including container states, version states, review workflow states, visibility overlay, and governance actions. Ensures agents don't introduce invalid states or transitions.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Skill Lifecycle Skill

Trigger

Use this skill when:

  • Modifying skill publish, review, or unpublish flows
  • Adding or changing skill/version status fields
  • Working on search, detail pages, or listing pages that show skill state
  • Implementing governance actions (hide, yank, archive)
  • Adding new state transitions or permission checks

State Model

Skill Container States

Enum SkillStatus (domain/skill/SkillStatus.java):

ValueMeaning
ACTIVESkill is operational and can have versions published
HIDDENSkill hidden by platform governance (design doc says prefer boolean hidden flag instead)
ARCHIVEDSkill archived by owner/namespace admin, cannot publish new versions

Design-vs-code note: docs/14-skill-lifecycle.md specifies hidden should be a governance overlay (boolean flag) rather than a lifecycle enum state. The current code still defines SkillStatus.HIDDEN. New code should use the skill.hidden boolean field, not the enum value.

SkillVersion States

Enum SkillVersionStatus (domain/skill/SkillVersionStatus.java):

ValueMeaning
DRAFTNon-public draft, can resubmit or delete
SCANNINGUndergoing security scan
SCAN_FAILEDSecurity scan failed
UPLOADEDUploaded but not yet submitted for review (or withdrawn from review)
PENDING_REVIEWFrozen pending reviewer action
PUBLISHEDCurrently distributable
REJECTEDReview denied, retained
YANKEDWas published, withdrawn from distribution

ReviewTask States

Enum ReviewTaskStatus (domain/review/ReviewTaskStatus.java):

ValueMeaning
PENDINGAwaiting reviewer
APPROVEDReviewer approved
REJECTEDReviewer rejected

Visibility Model

Enum SkillVisibility (used in SkillPublishService):

ValuePublish Path
PUBLICCreates PENDING_REVIEW version, review task, security scan
NAMESPACE_ONLYSame as PUBLIC but limited visibility scope
PRIVATEGoes directly to UPLOADED status, no review task

SUPER_ADMIN role bypasses review — versions go directly to PUBLISHED.

Latest Version Pointer

Skill.latestVersionId is only the latest published pointer:

  • Can only point to a PUBLISHED version
  • May be null if no published version exists
  • latest tag auto-follows this pointer (read-only)
  • When yanking: recalculates to newest remaining PUBLISHED version, or null

Key Transitions

ActionFromToNotesSource
First upload (PUBLIC/NAMESPACE_ONLY)—PENDING_REVIEWReview task createdSkillPublishService
First upload (SUPER_ADMIN)—PUBLISHEDDirect publish, SkillPublishedEvent emittedSkillPublishService
First upload (PRIVATE)—UPLOADEDNo review task, latestVersionId updatedSkillPublishService
Review approvePENDING_REVIEWPUBLISHEDUpdates latestVersionIdReview workflow
Review rejectPENDING_REVIEWREJECTEDVersion retainedReview workflow
Withdraw reviewPENDING_REVIEWUPLOADEDDeletes pending ReviewTaskSkillGovernanceService.withdrawPendingVersion
YankPUBLISHEDYANKEDRecalculates latestVersionIdSkillGovernanceService.yankVersion
Hide—hidden=trueIndependent overlaySkillGovernanceService.hideSkill
Restore—hidden=falseIndependent overlaySkillGovernanceService.unhideSkill
ArchiveACTIVEARCHIVEDSkillStatusChangedEvent emittedSkillGovernanceService.archiveSkill
UnarchiveARCHIVEDACTIVESkillStatusChangedEvent emittedSkillGovernanceService.unarchiveSkill
New publish (existing pending)PENDING_REVIEWUPLOADEDAuto-withdraw + delete review taskSkillPublishService
Delete versionDRAFT/REJECTED/SCAN_FAILED/UPLOADED—Last version protectedSkillGovernanceService.deleteVersion

Yank Pointer Recalculation

When yanking the current latestVersionId (SkillGovernanceService):

  1. Query all remaining PUBLISHED versions for the skill
  2. Sort by publishedAt DESC, then createdAt DESC, then id DESC
  3. Point latestVersionId to the top result, or null if none remain

Lifecycle Projection

Read models (detail, my-skills, favorites, search) use *QueryRepository patterns:

  • headlineVersion — Main display version for the page
  • publishedVersion — Latest published version
  • ownerPreviewVersion — Pending review version (visible to owner/namespace admin)
  • resolutionMode — PUBLISHED, OWNER_PREVIEW, or NONE

Public browsing, install, download, search only use publishedVersion.

Permission Boundaries

ActionWho
Withdraw reviewSubmitter only
Delete versionOwner or namespace admin, only DRAFT/REJECTED/SCAN_FAILED/UPLOADED
Archive/unarchiveOwner or namespace admin (ADMIN or OWNER role)
Hide/restorePlatform governance (no permission check in code)
YankPlatform governance (no permission check in code)
Publish PUBLIC skillNamespace member (or SUPER_ADMIN)
Publish PRIVATE skillNamespace member (or SUPER_ADMIN)

Delete Version Constraints

SkillGovernanceService.deleteVersion enforces:

  • Only DRAFT, REJECTED, SCAN_FAILED, or UPLOADED versions can be deleted
  • Cannot delete the last remaining version of a skill
  • Deletes associated storage keys (individual files + bundle.zip)
  • Deletes associated security scan records
  • Updates latestVersionId if the deleted version was the pointer
  • Storage deletion happens after transaction commit with compensation recording

Domain Events

EventWhen Emitted
SkillStatusChangedEventArchive or unarchive
SkillPublishedEventSUPER_ADMIN direct publish
SkillVersionYankedEventYank action
ReviewSubmittedEventCreate review task for PUBLIC/NAMESPACE_ONLY

Common Pitfalls

  • Setting SkillStatus.HIDDEN directly — use skill.setHidden(true) via SkillGovernanceService instead
  • Forgetting to recalculate latestVersionId after yank or version deletion
  • Not auto-withdrawing pending versions when publishing a new version
  • Missing the confirmWarnings two-step publish flow (warnings require explicit confirmation)
  • Assuming all publish flows create review tasks — PRIVATE visibility skips review

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Evaluate factual claims in AI-generated text and teach a lightweight verification habit. Use when a learner wants to fact-check an AI answer, identify uncertainty, choose appropriate independent sources, or practise critical AI literacy.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

Rules for the SkillHub backend Maven multi-module clean architecture. Ensures agents place new code in the correct module and respect dependency direction.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

Parse and understand an HTTP(S) URL or an authorized local document, audio, or video source through Cue Omni Reader when the Agent has the official Omni MCP tools.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

Generate concise daily standups, reflection prompts, and weekly retrospectives for individuals or teams. Use for planning a day, surfacing blockers, reviewing user-provided entries, or drafting a check-in without assuming prior history.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/skillhub5,1692026年10月10日 更新

iflytek のスキルをすべて見る

このスキルの問題を報告する