何时用
/skill:foo 找不到、内容旧、或磁盘能读但斜杠菜单没有(或相反)。
决策树
1) Is the skill in the right layer?
| Intent | Put files in | Then |
|---|---|---|
| Only this Space | /workspace/.agents/skills/<name>/ | Save project; reload chat |
| Personal all Spaces | config Space (name=config) .agents/skills/ | Save config Space (publish + Redis SET) |
| Whole deployment | platform Space id | Save platform Space |
| Shared subset of Spaces | mod 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 →
publishSkillsCacheFromDiroverwrites 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:nameexpands without Unknown skill - [ ] Agent can
readthe 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