Skip to content

[feat] 团队收录公开开源skill 缺少上游自动追踪与过期检测(upstream provenance & staleness check) #416

Closed

Description

@Ian879

Problem

我们的使用场景:把内部推荐的自己开发的skill或者是公开开源 skills(obra/superpowers、mattpocock-skills等)收录进团队仓库,再按 role 分发给成员

对于这些开源的skill 问题在于:收录(vendoring)模式下,skill 副本与上游开源仓库之间没有任何 git 关联 —— 不是 submodule / subtree,代码里也没有 upstream 的概念。上游作者更新后 teamai 完全感知不到,收录的 skill 会静默变旧,成员无从得知自己在用过期版本。

teamai source 订阅模式可以跟随上游(24h TTL 自动 git pull,publicSkills opt-in、本队同名优先、上游下架自动清理,机制很完善),但它要求上游仓库本身是 teamai 格式(根目录 teamai.yaml + publicSkills 声明 + skills/ 布局)。市面上绝大多数开源 skill 仓库不满足这个格式,无法直接订阅;为每个上游维护一个“适配 fork”成本高,而且被团队深度定制过(裁剪 / 改写)的 skill 本来就只能走收录模式。

Proposed Solution

  1. Provenance 记录:teamai push --upstream [@ref](或 push 交互时提示填写),写入 SKILL.md frontmatter:

upstream: https://github.com/greensock/gsap-skills
upstreamRef: 4f2a1c3 # 收录时的 commit / tag

字段名用 upstream 而非 source,避免与已有的 teamai source(订阅源)术语冲突;teamai skill show 顺带展示。
2. 过期检测:teamai skill outdated —— 对带 upstream 的 skill 拉上游 HEAD 对比 upstreamRef,报告 ahead / behind;可并入 doctor / status / dashboard KB Health。
3. (增强)teamai skill refresh :从上游更新副本,照常走 push 的 MR review,保持“受控分发”不变。
4. (顺带发现的 UX 问题):source add 非 teamai 格式仓库时会成功并提示 "It can still be used",但 pull 侧是 log.debug 级静默跳过,成员实际同步不到任何东西且无感知。建议 add 时更明确地警告“当前将同步 0 个 skill”。

Activity

  1. jeff-r2026 commented on Sep 4, 2026

    @jeff-r2026
    Collaborator

    很好的建议,我觉得放到 teamai source 更合适,增加自动检测非 teamai 类型仓库的格式检查。欢迎你提 PR 实现

  2. added a commit that references this issue on Sep 9, 2026
    213b3c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions