@nodeskai/genehub 2026.3.4 → 2026.3.5-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,12 +56,36 @@ genehub auth logout # 退出登录(清除本地 token)
56
56
  | `genehub search [keyword]` | 搜索基因库 |
57
57
  | `genehub install <slug>` | 安装基因到当前 Agent 环境 |
58
58
  | `genehub uninstall <slug>` | 卸载基因 |
59
- | `genehub publish <path>` | 发布基因到 Registry |
59
+ | `genehub publish <path>` | 发布基因到 Registry(自动检测 CLAUDE.md / SKILL.md / AGENTS.md) |
60
+ | `genehub publish <path> -y` | 非交互模式发布(使用默认值) |
60
61
  | `genehub list` | 列出已安装的基因 |
61
62
  | `genehub learn <slug>` | 触发基因深度学习(L2) |
62
63
  | `genehub init` | 初始化基因项目 |
63
64
  | `genehub config` | 管理配置 |
64
65
 
66
+ ## 自动检测发布
67
+
68
+ `genehub publish` 支持直接发布包含 skill 文件的目录,无需预先创建 `gene.yaml`:
69
+
70
+ ```bash
71
+ # 目录中有 CLAUDE.md / SKILL.md / AGENTS.md 等文件即可
72
+ genehub publish ./my-claude-project
73
+ ```
74
+
75
+ **检测优先级**:`CLAUDE.md` > `SKILL.md` > `AGENTS.md` > `.cursorrules` > `.clinerules` > `instructions.md` > `*.md`
76
+
77
+ 自动推断的字段:
78
+ - **slug**:从目录名生成(kebab-case)
79
+ - **name**:从文件 H1 标题或 frontmatter 提取
80
+ - **description**:从文件首段内容提取
81
+ - **skill.content**:完整文件内容
82
+
83
+ 需要交互确认的字段(`-y` 可跳过):
84
+ - category(默认 `development`)
85
+ - tags(默认 `ability`)
86
+
87
+ 首次发布后会自动生成 `gene.yaml` 保存到目录中,后续发布可直接使用。
88
+
65
89
  ## 目录结构
66
90
 
67
91
  ```
@@ -70,6 +94,9 @@ packages/cli/
70
94
  │ ├── index.ts # 入口,注册所有命令
71
95
  │ ├── config.ts # 配置管理(文件 + 环境变量)
72
96
  │ ├── output.ts # 格式化输出工具
97
+ │ ├── utils/
98
+ │ │ ├── detect-skill.ts # Skill 文件自动检测
99
+ │ │ └── interactive-manifest.ts # 交互式 manifest 构建
73
100
  │ └── commands/
74
101
  │ ├── auth.ts # GitHub OAuth 登录
75
102
  │ ├── config.ts # config set / get
@@ -77,7 +104,7 @@ packages/cli/
77
104
  │ ├── install.ts # 安装基因
78
105
  │ ├── learn.ts # 深度学习
79
106
  │ ├── list.ts # 列出已安装基因
80
- │ ├── publish.ts # 发布基因
107
+ │ ├── publish.ts # 发布基因(支持自动检测)
81
108
  │ ├── search.ts # 搜索基因
82
109
  │ └── uninstall.ts # 卸载基因
83
110
  ├── dist/ # 构建产物