Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature] Support Knowledge as a first-class package type

Open
#718 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java

Research direction

Start with Skill.java, SkillVersion.java, SkillPackageValidator.java, and the skill, skill_version, and skill_file tables to trace the current package lifecycle. Then map how package type would flow through persistence, review and security records, events, search, REST/OpenAPI, CLI, and web UI. The issue describes a cross-cutting design proposal without naming tests or settling the type contract; done means the acceptance criteria are implemented while existing Skill behavior remains compatible.

Written by the indexing model from the issue text.

Description

effort/l priority/p1 risk/high triage/core
Status — specification proposal

Updated after the October 16 contract proposal and October 22 maintainer request. The current spec-only artifact is #1008. It is proposed, not an implementation or release commitment; this issue stays open.

This revision explicitly replaces the original suggestion to exclude Knowledge from legacy search. It also clarifies that Knowledge is a classification within Skill, not a new resource identity beside Skill and Suite. Exact metadata naming, historical treatment, lifecycle and response exposure still require maintainer agreement.

Problem

SkillHub already governs Skill ownership, versions, visibility, review, storage, search, download and audit. Reusable knowledge can already be distributed in the same format:

product-handbook/
├── SKILL.md       # when and how the AI should use these materials
├── references/    # Markdown, text, JSON, YAML, etc.
└── assets/

This works for AI consumption, but the registry cannot reliably distinguish a knowledge-oriented package for discovery, inventory, presentation or future type-aware policy. The aim is to make that distinction explicit while reusing the existing package contract and lifecycle—not to create a second AI-facing format or a hosted knowledge service.

Proposed Solution

Treat Knowledge as a version-specific package classification within the existing Skill aggregate. Both ordinary Skills and Knowledge packages retain root SKILL.md, the existing file layout, install commands and destination. resourceType remains SKILL or SUITE.

The current recommendation is a declaration in SKILL.md frontmatter:

metadata:
  package-type: knowledge

Proposed values are exact lowercase skill and knowledge; absent means ordinary skill, without inheritance from the preceding version. Unknown/null/non-string values on new submissions are rejected. The spelling and historical applicability remain review decisions, not an already supported publish contract.

Version and identity
  • A published version keeps its own classification. Changing type requires a new version through the existing applicable publish/review/scan flow; no silent rewriting of published content.
  • Public discovery follows the published candidate selected by the existing entry point, not a new maximum-semver rule. Pinned version/tag/hash requests use the type of the version actually resolved. Draft/owner-preview types do not overwrite public classification. Yank and promotion retain the existing version-selection rules.
  • Preserve existing owner-isolated Skill records, uniqueness/conflict checks and caller-dependent coordinate resolution. Type must not resolve a collision, bypass ownership, create a second published identity at the same coordinate or overwrite another owner's package.
  • Skill and Suite may continue to share a slug through their existing distinct entry points. Suite members keep their exact SkillVersion references. This proposal does not impose a new cross-resource unique constraint.
Discovery and compatibility
  • Unfiltered legacy Skill search continues to include Knowledge. Classifying a package must not make content that old clients can already consume disappear from their results.
  • Existing clients continue searching, resolving, downloading and installing Knowledge as a normal Skill, without an upgrade or new command.
  • Type-aware clients gain an optional current-version filter. A matching historical version must not be substituted for the current published version.
  • Optional additive packageType metadata must preserve existing fields and the Skill/Suite resource enum. The draft recommends an explicit include=packageType expansion using the existing include convention, with unchanged default response shapes, including for strict legacy decoders. Initial endpoint scope is a maintainer decision.
Historical data and governance

Arbitrary frontmatter may already contain the proposed key. The draft recommends preserving all pre-feature received versions as ordinary Skills rather than retrospectively reclassifying or rejecting them; new submissions opt into the new declaration contract. The spec discusses pending historical versions and copies/promotions so raw metadata or creation time cannot accidentally change their interpretation. Storage and rollout are future implementation decisions.

Classification is an organizational distinction, not proof that content is inert, trustworthy or free of scripts. Existing authorization, visibility, review, scanning, package/file limits, download readiness, hidden/archive/yank and audit controls continue to apply.

Staged Scope
  1. Review the spec-only OpenSpec artifact and settle declaration/history, lifecycle and exposure choices.
  2. Separately agree a complete publish/review/search/install implementation slice with backward-compatibility tests; do not treat a documentation merge as implementation or release approval.
  3. Leave external-source descriptors and dependency resolution to follow-up proposals. The first slice distributes packaged files only.

Related boundaries: #602's broader resource-library discussion was split, with suites handled by #715/#826/#828; dependency work is adjacent to #571. Following the control-plane boundary discussed in #466, this feature does not host graph/vector databases, fetch or synchronize external knowledge, probe endpoints, forward MCP/query traffic, manage runtime credentials or execute package-provided server commands. Any later descriptor would be an inert package consumed by a separately configured runtime, not a SkillHub data plane.

Alternatives Considered
  • Keep knowledge as untyped Skills: immediately usable, but no reliable type-aware discovery or inventory.
  • Add KNOWLEDGE.md or a parallel Knowledge resource: duplicates packaging/installation contracts and makes existing client compatibility harder.
  • Create a separate KnowledgeHub: duplicates namespace, version, permission, review and storage machinery.
  • Add hosted RAG/vector services: outside the registry classification problem and the first slice.
Impact and Proposed Acceptance Criteria

This is cross-cutting work across metadata/validation, version lifecycle, queries/indexing, API projections and client presentation—not merely adding a database flag. No product code, migration, deployment or runtime behavior is changed by the spec-only PR. Future acceptance must demonstrate:

  • Existing untyped Skills retain their publishing, review, search, resolution, installation, visibility and yank behavior.
  • Knowledge uses root SKILL.md and the normal install layout, with explicit type-aware discovery available to new callers.
  • Mixed historical types, latest changes, pinned versions, unpublished previews, yank fallback/no survivor and selected-version promotion have consistent version-bound meaning.
  • Invalid new declarations fail explicitly; pre-feature metadata collisions do not break already received versions or their applicable original review flow.
  • Existing owner-isolated collisions and Skill/Suite identities stay unchanged; package type cannot bypass name conflicts or choose another owner's record.
  • Unmodified legacy clients still find and install Knowledge; default response contracts and resource enums remain compatible, including strict decoders.
  • New filters apply before pagination/counting to the current published candidate under the same access rules; stale indexes do not mislabel a version.
  • Published bytes remain protected, and classification never bypasses security/review/governance.
  • External descriptors, dependencies, hosted retrieval/databases and server-side execution remain outside the first slice.

Infographic

Proposed Knowledge subtype: the same SKILL.md package and install path with a distinct purpose classification; not implemented.

The boxes are a packaging metaphor, not a claim that Knowledge packages cannot contain scripts.

中文说明
状态:规格提案

根据 10 月 16 日的契约建议和维护者 10 月 22 日的要求更新。当前纯规格材料是 #1008。仍为提案,不代表实现或发行承诺,原 Issue 保持开放。

本次明确替代原先“默认在旧搜索中排除 Knowledge”的建议,同时明确 Knowledge 属于 Skill 内部分类,不是与 Skill、Suite 并列的新资源身份。元数据键名、历史处理、生命周期和响应扩展方式仍需维护者确认。

问题

SkillHub 已具备技能所有权、版本、可见性、审核、存储、搜索、下载和审计能力。知识资料目前就能按上方目录结构打包:SKILL.md 告诉 AI 何时及如何使用资料,references/ 放 Markdown、文本、JSON、YAML 等,assets/ 放辅助内容。

AI 能使用这些包,但平台注册层无法可靠地区分知识型资料包,以便发现、盘点、展示或未来按类型治理。目标是在复用现有包契约和生命周期的同时,让这种区别变得明确;不是新造 AI 格式,也不是托管知识服务。

方案建议

将 Knowledge 定义为现有 Skill 聚合内的逐版本包分类。普通技能和知识包都保留根 SKILL.md、现有文件布局、安装命令及目录,resourceType 仍为 SKILL 或 SUITE。

目前推荐在 SKILL.md 的嵌套 metadata 中声明 package-type: knowledge,见上方 YAML 示例。建议值为精确小写 skill / knowledge;缺省为普通 skill,不继承前一版本。新提交的未知/null/非字符串值应拒绝。具体拼写和历史适用性仍待评审,不是现役发布接口已经支持的契约。

版本与身份
  • 已发布版本保留自己的分类。改型需要新版本,并通过原本适用的发布、审核和扫描流程,不静默改写已发布内容。
  • 公共发现跟随既有入口选定的发布候选,不新增最大 semver 规则。固定 version/tag/hash 请求取实际解析版本的类型;草稿/所有者预览不覆盖公共分类。yank 和提升沿用既有选版本规则。
  • 保留已有所有者隔离的 Skill 记录、唯一约束/冲突检查和按调用者解析坐标的逻辑。类型不能用来解碰撞、绕过所有权、在同坐标增加第二个发布身份,或覆盖他人的包。
  • Skill 与 Suite 仍可通过各自现有入口共享 slug;Suite 成员保留精确 SkillVersion 引用,不新增跨资源唯一约束。
发现与兼容
  • 未过滤的旧 Skill 搜索继续包含 Knowledge。 不能因为作者标了分类,就让旧客户端本来能消费的内容从搜索中消失。
  • 旧客户端无需升级或新命令,继续像普通 Skill 一样搜索、解析、下载和安装知识包。
  • 新客户端可按当前版本类型筛选,不能把匹配的历史版本换成当前发布结果。
  • 可选新增 packageType 应保留既有字段和 Skill/Suite 资源枚举。草案推荐复用 include 约定,通过 include=packageType 显式扩展,默认响应形状保持不变,兼容严格旧解码器。首批端点范围由维护者裁决。
历史资料与治理

任意 frontmatter 可能早已使用同名键。草案建议启用前所有已接收版本继续按普通 Skill 处理,不追溯改型或拒绝;新提交才使用新声明契约。规格覆盖历史待审版本及复制/提升,避免原始元数据或新建时间意外改变历史解释。存储和上线方式属于未来实现决定。

分类只是组织区分,不证明内容惰性、可信或不含脚本。现有授权、可见性、审核、扫描、包/文件限制、下载就绪、隐藏/归档/yank 及审计控制继续生效。

分阶段范围
  1. 先评审纯规格 OpenSpec 材料,定下声明/历史、生命周期和响应扩展规则。
  2. 再单独确定发布、审核、搜索、安装全流程的实现及兼容测试;文档合并不代表实现或发行获批。
  3. 外部来源描述符及依赖解析另行提案,首片只分发随包文件。

相关边界:#602 的广义资源库议题已分流,套件由 #715/#826/#828 承接;依赖方向与 #571 相邻。沿用 #466 讨论的控制面边界,本功能不托管图/向量数据库,不抓取或同步外部知识、不探测端点、不转发 MCP/查询流量、不管理运行凭据、不执行包提供的服务端命令。将来若有描述符,也只是由独立配置的运行时消费的惰性包,不将 SkillHub 变成数据执行层。

已考虑的替代方案
  • 继续使用未分类的知识型 Skill: 现在就能用,但不能可靠地按类型发现和盘点。
  • 新增 KNOWLEDGE.md 或平行 Knowledge 资源: 重复包/安装契约,增加旧客户端兼容难度。
  • 另建 KnowledgeHub: 重复空间、版本、权限、审核和存储能力。
  • 加入托管 RAG/向量服务: 超出注册中心分类需求和第一片范围。
影响与建议验收标准

涉及元数据/校验、版本生命周期、查询/索引、API 投影及客户端展示,不是只加数据库标记。纯规格 PR 不修改产品代码、迁移、部署或运行行为。未来验收应证明:

  • 原有未分类 Skill 的发布、审核、搜索、解析、安装、可见性及 yank 行为保持不变。
  • Knowledge 使用根 SKILL.md 和普通安装布局,新调用者可显式按类型发现。
  • 混合历史类型、latest 改型、固定版本、未发布预览、yank 回退/无剩余版本及所选版本提升均与对应版本一致。
  • 无效新声明明确失败;历史元数据碰撞不破坏已接收版本及原本适用的审核流程。
  • 原所有者隔离的冲突及 Skill/Suite 身份不变;类型不能绕过同名冲突或改选其他所有者的记录。
  • 未修改的旧客户端仍可找到并安装 Knowledge;默认响应及资源枚举继续兼容,包含严格解码器。
  • 新过滤在分页/计数前作用于当前发布候选,沿用访问规则;过期索引不能把版本标成错误类型。
  • 已发布字节继续受保护,分类不绕过安全、审核或治理。
  • 外部描述符、依赖、托管检索/数据库及服务端执行不纳入首片。

知识包提案:共用 SKILL.md 包格式与安装路径,以分类区分用途,尚未实现。

盒子只是包格式的比喻,不表示知识包不能包含脚本。

Dominant language
Java
Stars
5.2k
Forks
841
Avg merge
1d 4h
Merged PRs (30d)
77

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from iflytek/skillhub

All issues in iflytek/skillhub

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.