Awesome Cohub
EN
实践卡advancedcohub.bp.skill-catalog-cache4 min

何时用

/skill:foo 找不到、内容旧、或磁盘能读但斜杠菜单没有(或相反)。

决策树

1) Is the skill in the right layer?

IntentPut files inThen
Only this Space/workspace/.agents/skills/<name>/Save project; reload chat
Personal all Spacesconfig Space (name=config) .agents/skills/Save config Space (publish + Redis SET)
Whole deploymentplatform Space idSave platform Space
Shared subset of Spacesmod Space .agents/skills/Save mod + ensure consumer mounts mod

2) Packaging

.agents/skills/<name>/SKILL.md   # required
# assets beside SKILL.md inside <name>/

Frontmatter name: should match /skill:name (valid name regex enforced).

3) Visibility API

# authenticated
curl -sS -H "Authorization: Bearer $TOKEN" \
  "https://api.cohub.live/api/skills?spaceId=$SPACE_ID" | jq .

Empty without auth+space is expected.

4) Cache freshness

  • Redis TTL 24 hours if nothing republishes.
  • User/platform Save → publishSkillsCacheFromDir overwrites cache key.
  • Mod skills 携带结构化来源(v2.5):斜杠菜单与 cohub skills 会显示 skill 来自哪个 mod Space + 挂载 slug。
  • 项目 skills 直接从 live workspace 加载(v2.7):已移除 revision 键 Redis 层,编辑后立即生效。
  • If still stale: Save again, remount mod, hard refresh composer, new Chat (system prompt skill list rebuilds per identity state).

5) Owner vs collaborator

Slash/API may list user skills for the authenticated user. Agent prompt injection of user skills only when actorUserId === space.ownerUserId (see execution-identity playbook). Collaborators can see different behavior.

完成标准

  • [ ] Skill appears in GET /api/skills?spaceId=
  • [ ] /skill:name expands without Unknown skill
  • [ ] Agent can read the sandbox path from the catalog entry
  • [ ] You know which layer owns the file

别这样做

  • Editing only Redis mental model without fixing source files
  • Expecting Home project skills to become user-scope without config publish
  • Duplicate names across layers without intending override