luminae-helper 0.0.3

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 ADDED
@@ -0,0 +1,70 @@
1
+ # luminae-helper
2
+
3
+ AI Skill 安装器 — 将 ai-toolkit 项目中的 skill 安装到本地 AI 编码工具。
4
+
5
+ ## 功能
6
+
7
+ - **多选交互**:Skill 和目标工具均支持 Checkbox 多选
8
+ - **自动检测**:自动检测本机已安装的 AI 工具
9
+ - **导航支持**:每个步骤均支持返回上一步和退出
10
+ - Checkbox 步骤:Esc 返回上一步,Ctrl+C 退出
11
+ - 预览确认步骤:显式选项(确认/返回/退出)
12
+ - **安装/卸载**:支持安装和卸载操作
13
+
14
+ ## 支持的工具
15
+
16
+ | 工具 | 命令 | Skill 安装方式 |
17
+ |------|------|---------------|
18
+ | Claude Code | `claude` | `~/.claude/commands/<skill>.md` |
19
+ | Cursor | `cursor` | `~/.cursor/commands/<skill>.md` |
20
+ | OpenCode | `opencode` | `~/.opencode/skills/<skill>/` (目录) |
21
+ | Trae | `trae` | `~/.trae/commands/<skill>.md` |
22
+ | OpenClaw | `openclaw` | `~/.openclaw/skills/<skill>/` (目录) |
23
+ | Nanobot | `nanobot` | `~/.nanobot/skills/<skill>/` (目录) |
24
+ | Hermes Agent | `hermes` | `~/.hermes/skills/<skill>/` (目录) |
25
+ | ZeroClaw | `zeroclaw` | `~/.zeroclaw/skills/<skill>/` (目录) |
26
+
27
+ ## 安装
28
+
29
+ ```bash
30
+ # 进入工具目录
31
+ cd tools/luminae-helper
32
+
33
+ # 安装依赖
34
+ npm install
35
+
36
+ # 链接到全局(可选)
37
+ npm link
38
+ ```
39
+
40
+ ## 使用
41
+
42
+ ```bash
43
+ # 直接运行
44
+ node src/cli.js
45
+
46
+ # 或链接后
47
+ luminae-helper
48
+ ```
49
+
50
+ ## 操作流程
51
+
52
+ 1. 选择 **安装** 或 **卸载**
53
+ 2. 多选 Skill(Checkbox,空格切换,回车确认)
54
+ 3. 多选目标工具(Checkbox,仅显示已安装的工具)
55
+ 4. 预览确认(确认 / 返回上一步 / 退出)
56
+ 5. 执行
57
+
58
+ 每一步都支持返回上一步和退出:
59
+ - Checkbox 步骤:列表底部显示导航项(灰显,不可勾选),Esc 返回上一步,Ctrl+C 退出
60
+ - 确认步骤:显式选择「返回上一步」或「退出」
61
+
62
+ ## 添加新的 Skill
63
+
64
+ 1. 在 **仓库根目录**(与 `tools/` 同级)创建 `skills/skill-your-skill/SKILL.md`(及可选 `README.md` 等)。此处为 Git 中的**唯一真源**。
65
+ 2. 在 `tools/luminae-helper` 下执行 `npm install` 或 `npm run sync-skills`,会把根目录 `skills/` 同步到本包内的 `skills/`(该目录已 `.gitignore`,勿在包内手改副本)。
66
+ 3. Skill 元数据与安装目标由 `src/lib/constants.js` 的 `discoverSkills()` 自动扫描包内 `skills/` 生成,一般无需再手写 `SKILLS` 数组。
67
+
68
+ ## 发布 npm 包
69
+
70
+ `prepublishOnly` 会在发布前以 `--strict` 运行同步:必须在 monorepo 中能找到根目录 `skills/`,否则发布失败,避免打出不含 Skill 的空包。
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "luminae-helper",
3
+ "version": "0.0.3",
4
+ "description": "Install AI skills to coding tools (Claude Code, Cursor, OpenCode, Trae, etc.)",
5
+ "type": "module",
6
+ "main": "src/cli.js",
7
+ "bin": {
8
+ "luminae-helper": "src/cli.js"
9
+ },
10
+ "files": [
11
+ "src/cli.js",
12
+ "src/lib/*.js",
13
+ "src/utils/*.js",
14
+ "skills/",
15
+ "README.md"
16
+ ],
17
+ "scripts": {
18
+ "start": "node src/cli.js"
19
+ },
20
+ "keywords": [
21
+ "claude",
22
+ "cursor",
23
+ "opencode",
24
+ "trae",
25
+ "skills",
26
+ "ai-toolkit",
27
+ "cli"
28
+ ],
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/evenweiss/ai-toolkit.git",
33
+ "directory": "tools/luminae-helper"
34
+ },
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ },
38
+ "dependencies": {
39
+ "@inquirer/ansi": "^2.0.5",
40
+ "@inquirer/core": "^11.1.10",
41
+ "@inquirer/figures": "^2.0.5",
42
+ "@inquirer/prompts": "^8.3.0",
43
+ "chalk": "^5.3.0",
44
+ "gradient-string": "^3.0.0",
45
+ "wcwidth": "^1.0.1"
46
+ },
47
+ "publishConfig": {
48
+ "registry": "https://registry.npmjs.org/"
49
+ }
50
+ }
@@ -0,0 +1,70 @@
1
+ # skill-git-commit
2
+
3
+ Smart commit message generator with Conventional Commits format.
4
+
5
+ ## 触发条件
6
+
7
+ 需要"生成提交信息"、"写 commit message"、"帮我写 commit"时调用。
8
+
9
+ ## 功能
10
+
11
+ 分析 `git diff` 输出,生成符合 Conventional Commits 规范的 commit message。
12
+
13
+ ## Conventional Commits 类型
14
+
15
+ | type | 使用场景 |
16
+ |------|---------|
17
+ | feat | 新功能 |
18
+ | fix | 修复 bug |
19
+ | docs | 文档更新 |
20
+ | style | 代码格式(不影响功能)|
21
+ | refactor | 重构(不影响功能)|
22
+ | perf | 性能优化 |
23
+ | test | 测试相关 |
24
+ | chore | 构建/工具/依赖更新 |
25
+
26
+ ## 判断规则
27
+
28
+ - 变更文件在 `docs/` → `docs`
29
+ - 变更包含 `*.test.ts` / `*.spec.ts` → `test`
30
+ - 变更包含 `package.json` / `pnpm-lock.yaml` / `go.mod` → `chore`
31
+ - 变更修复了某个问题 → `fix`
32
+ - 变更添加了新功能点 → `feat`
33
+ - scope 优先取变更最集中的模块目录名
34
+
35
+ ## 输出格式
36
+
37
+ ```
38
+ ## 提交信息建议
39
+
40
+ **type:** feat
41
+ **scope:** auth
42
+ **subject:** 添加 JWT 登录功能
43
+
44
+ **body:**
45
+ 实现基于 JWT 的用户登录鉴权流程,包含 token 生成、验证和刷新机制。
46
+
47
+ 变更文件:
48
+ - src/auth/login.ts
49
+ - src/auth/jwt.ts
50
+ ```
51
+
52
+ ## 安装
53
+
54
+ ```bash
55
+ # Claude Code
56
+ cp skills/skill-git-commit/SKILL.md ~/.claude/commands/git-commit.md
57
+
58
+ # Cursor
59
+ cp skills/skill-git-commit/SKILL.md ~/.cursor/commands/git-commit.md
60
+
61
+ # OpenCode
62
+ cp -r skills/skill-git-commit ~/.opencode/skills/
63
+
64
+ # Trae
65
+ cp skills/skill-git-commit/SKILL.md ~/.trae/commands/git-commit.md
66
+ ```
67
+
68
+ ## License
69
+
70
+ MIT
@@ -0,0 +1,72 @@
1
+ # skill-git-commit
2
+
3
+ > Generate commit message from git diff
4
+
5
+ **触发条件:** 当需要"生成提交信息"、"写 commit message"、"帮我写 commit"、"生成几个 commit 建议"时调用。
6
+
7
+ ## 使用方式
8
+
9
+ 1. 执行 `git diff` 获取变更内容
10
+ 2. 分析变更文件路径和内容,判断变更类型
11
+ 3. 根据 Conventional Commits 规范生成 commit message
12
+ 4. 输出建议供用户确认或修改
13
+
14
+ ## Conventional Commits 类型
15
+
16
+ | type | 使用场景 |
17
+ |------|---------|
18
+ | feat | 新功能 |
19
+ | fix | 修复 bug |
20
+ | docs | 文档更新 |
21
+ | style | 代码格式(不影响功能)|
22
+ | refactor | 重构(不影响功能)|
23
+ | perf | 性能优化 |
24
+ | test | 测试相关 |
25
+ | chore | 构建/工具/依赖更新 |
26
+ | wip | 开发中(未完成)|
27
+
28
+ ## 判断规则
29
+
30
+ - 变更文件在 `docs/` → `docs`
31
+ - 变更包含 `*.test.ts` / `*.spec.ts` / `__tests__/` → `test`
32
+ - 变更包含 `package.json` / `pnpm-lock.yaml` / `go.mod` → `chore`
33
+ - 变更修复了某个问题 → `fix`
34
+ - 变更添加了新功能点 → `feat`
35
+ - scope 优先取变更最集中的模块目录名
36
+
37
+ ## 输出格式
38
+
39
+ ```
40
+ ## 提交信息建议
41
+
42
+ **type:** feat
43
+ **scope:** auth
44
+ **subject:** 添加 JWT 登录功能
45
+
46
+ **body:**
47
+ 实现基于 JWT 的用户登录鉴权流程,包含 token 生成、验证和刷新机制。
48
+
49
+ 变更文件:
50
+ - src/auth/login.ts
51
+ - src/auth/jwt.ts
52
+ - src/middleware/auth.ts
53
+
54
+ ---
55
+
56
+ 原始 diff 摘要:
57
+ +120 行 / -30 行
58
+ ```
59
+
60
+ ## Conventional Commits 格式规范
61
+
62
+ ```
63
+ <type>(<scope>): <subject>
64
+
65
+ <body>
66
+ ```
67
+
68
+ - `type` 小写
69
+ - `scope` 可选,用小写字母
70
+ - `subject` 首字母小写,结尾不加句号
71
+ - `body` 使用中文,描述变更背景、原因和关键实现
72
+ - 标题和 body 之间空一行
@@ -0,0 +1,58 @@
1
+ # skill-git-push
2
+
3
+ Code review + commit + push workflow for AI coding agents.
4
+
5
+ ## 触发条件
6
+
7
+ 用户说"帮我提交代码"、"commit"、"git push"、"审查并推送"时调用。
8
+
9
+ ## 工作流
10
+
11
+ ```
12
+ 1. git status / git diff --stat / git diff
13
+ ↓
14
+ 2. Code Review(发现问题则停止)
15
+ ↓
16
+ 3. 生成 commit message
17
+ ↓
18
+ 4. git add <files>
19
+ 5. git commit -m "<message>"
20
+ 6. git push
21
+ ```
22
+
23
+ ## 规则
24
+
25
+ 1. **先 review,后提交** — 执行 `git diff` 审查未提交代码
26
+ 2. **发现问题立即停止** — 只输出问题与解决方案,**不修复、不提交、不推送**
27
+ 3. **中文 body** — 描述变更背景、原因和关键实现
28
+ 4. **Conventional Commits** — `<type>(<scope>): <subject>`
29
+
30
+ ## 项目自适应身份
31
+
32
+ | 项目类型 | 身份 |
33
+ |---------|------|
34
+ | 前端/小程序 | 高级前端开发工程师 |
35
+ | 后端(Java/Go/Python等)| 高级后端开发工程师 |
36
+ | 其他 | 通用高级软件工程师 |
37
+
38
+ **必须优先遵循「当前项目规则文件」的约束。**
39
+
40
+ ## 安装
41
+
42
+ ```bash
43
+ # Claude Code
44
+ cp skills/skill-git-push/SKILL.md ~/.claude/commands/git-push.md
45
+
46
+ # Cursor
47
+ cp skills/skill-git-push/SKILL.md ~/.cursor/commands/git-push.md
48
+
49
+ # OpenCode
50
+ cp -r skills/skill-git-push ~/.opencode/skills/
51
+
52
+ # Trae
53
+ cp skills/skill-git-push/SKILL.md ~/.trae/commands/git-push.md
54
+ ```
55
+
56
+ ## License
57
+
58
+ MIT
@@ -0,0 +1,78 @@
1
+ # skill-git-push
2
+
3
+ > Code review + commit + push workflow
4
+
5
+ **触发条件:** 用户说"帮我提交代码"、"commit"、"git push"、"审查并推送"。
6
+
7
+ ## 核心规则
8
+
9
+ 1. **先 review,后提交** — 执行 `git diff` 审查未提交代码
10
+ 2. **发现问题立即停止** — 只输出问题与解决方案,**不修复、不提交、不推送**
11
+ 3. **通过后生成提交信息** — 分析 diff 内容,按 Conventional Commits 规范生成 commit message
12
+ 4. **执行提交流程** — `git add` → `git commit` → `git push`
13
+ 5. **中文 body** — 描述变更背景、原因和关键实现
14
+ 6. **Conventional Commits** — `<type>(<scope>): <subject>`
15
+
16
+ ## 工作流
17
+
18
+ ```
19
+ 1. git status / git diff --stat / git diff
20
+ ↓
21
+ 2. Code Review(发现问题则停止)
22
+ ↓
23
+ 3. 生成 commit message(分析 diff,按 Conventional Commits 规范)
24
+ ↓
25
+ 4. git add <files>
26
+ 5. git commit -m "<message>"
27
+ 6. git push
28
+ ```
29
+
30
+ ---
31
+
32
+ ## 项目自适应身份
33
+
34
+ | 项目类型 | 身份 |
35
+ |---------|------|
36
+ | 前端/小程序 | 高级前端开发工程师 |
37
+ | 后端(Java/Go/Python等)| 高级后端开发工程师 |
38
+ | 其他 | 通用高级软件工程师 |
39
+
40
+ **必须优先遵循「当前项目规则文件」的约束。**
41
+
42
+ ---
43
+
44
+ ## Commit Message 生成规则
45
+
46
+ 分析 `git diff` 输出,判断 commit 类型和 scope:
47
+
48
+ - 变更文件在 `docs/` → `docs`
49
+ - 变更包含 `*.test.ts` / `*.spec.ts` / `__tests__/` → `test`
50
+ - 变更包含 `package.json` / `pnpm-lock.yaml` / `go.mod` → `chore`
51
+ - 变更修复了某个问题 → `fix`
52
+ - 变更添加了新功能点 → `feat`
53
+ - scope 优先取变更最集中的模块目录名
54
+
55
+ 格式:`feat(auth): 添加 JWT 登录功能`
56
+
57
+ ## 输出格式
58
+
59
+ ```
60
+ ## 项目类型识别
61
+ - 类型:前端项目
62
+ - 身份:高级前端开发工程师
63
+
64
+ ## Review 结论
65
+ ✅ 通过 / ❌ 不通过(附问题清单)
66
+
67
+ ## 提交信息
68
+ ```
69
+ &lt;type&gt;(&lt;scope&gt;): &lt;subject&gt;
70
+
71
+ &lt;body&gt;
72
+ ```
73
+
74
+ ## 执行结果
75
+ - git add: ✅/❌
76
+ - git commit: ✅/❌ (hash: <sha>)
77
+ - git push: ✅/❌
78
+ ```
@@ -0,0 +1,57 @@
1
+ # skill-identity
2
+
3
+ Detect project type and set agent identity - foundation for all tasks.
4
+
5
+ ## 触发条件
6
+
7
+ 用户说"检测项目类型"、"识别项目"、"设定身份"、"我是前端/后端工程师"时调用。
8
+
9
+ ## 功能
10
+
11
+ 1. **检测项目类型** — 扫描项目根目录及子目录文件结构,判断是前端/后端/全栈/移动端/数据科学/DevOps 等
12
+ 2. **设定身份** — 根据项目类型返回匹配的 agent 身份描述
13
+ 3. **输出项目信息** — 包含框架、语言、测试、CI 等元数据
14
+
15
+ ## 项目类型判断规则
16
+
17
+ | 关键文件 | 项目类型 | 身份 |
18
+ |---------|---------|------|
19
+ | `package.json` + `src/` 或 `components/` | 前端 | 高级前端开发工程师 |
20
+ | `go.mod` | Go 后端 | 高级后端开发工程师 |
21
+ | `pom.xml` / `build.gradle` | Java 后端 | 高级后端开发工程师 |
22
+ | `requirements.txt` / `pyproject.toml` + 非 notebook | Python 后端 | 高级后端开发工程师 |
23
+ | 多种类型文件同时存在 | 全栈 | 高级全栈开发工程师 |
24
+ | `*.xcodeproj` / `*.xcworkspace` | iOS/macOS | 高级移动端开发工程师 |
25
+ | `notebook/*.ipynb` + `torch`/`tensorflow` | 数据科学 | 高级数据科学工程师 |
26
+ | 无法判断 | 未知 | 通用高级软件工程师 |
27
+
28
+ ## 输出格式
29
+
30
+ ```
31
+ ## 项目类型识别
32
+ - 类型:前端(Vue)
33
+ - 框架:Vite + Vue 3
34
+ - 语言:TypeScript
35
+ - 身份:高级前端开发工程师,精通 Vue 3 + TypeScript + Vite
36
+ - 判断依据:检测到 package.json、vite.config.ts、src/App.vue
37
+ ```
38
+
39
+ ## 安装
40
+
41
+ ```bash
42
+ # Claude Code
43
+ cp skills/skill-identity/SKILL.md ~/.claude/commands/identity.md
44
+
45
+ # Cursor
46
+ cp skills/skill-identity/SKILL.md ~/.cursor/commands/identity.md
47
+
48
+ # OpenCode
49
+ cp -r skills/skill-identity ~/.opencode/skills/
50
+
51
+ # Trae
52
+ cp skills/skill-identity/SKILL.md ~/.trae/commands/identity.md
53
+ ```
54
+
55
+ ## License
56
+
57
+ MIT
@@ -0,0 +1,54 @@
1
+ # skill-identity
2
+
3
+ > Detect project type and set agent identity - foundation for all tasks
4
+
5
+ **触发条件:** 当用户说"设定身份"、"我是前端/后端工程师"时调用。
6
+
7
+ ## 功能
8
+
9
+ 1. **检测项目类型** — 扫描项目根目录及子目录文件结构,判断是前端/后端/全栈/移动端/数据科学/DevOps 等
10
+ 2. **设定身份** — 根据项目类型返回匹配的 agent 身份描述
11
+ 3. **输出项目信息** — 包含框架、语言、测试、CI 等元数据
12
+
13
+ ## 项目类型判断规则
14
+
15
+ 通过检测关键文件来判断项目类型:
16
+
17
+ | 关键文件 | 项目类型 | 身份 |
18
+ |---------|---------|------|
19
+ | `package.json` + `src/` 或 `components/` 或 `pages/` | 前端 | 高级前端开发工程师 |
20
+ | `vue.config.js` / `vite.config.js` / `webpack.config.js` | 前端(Vue/Vite/Webpack)| 高级前端开发工程师 |
21
+ | `go.mod` | Go 后端 | 高级后端开发工程师 |
22
+ | `pom.xml` / `build.gradle` | Java 后端 | 高级后端开发工程师 |
23
+ | `requirements.txt` / `pyproject.toml` + 非 notebook | Python 后端 | 高级后端开发工程师 |
24
+ | `Cargo.toml` | Rust 后端 | 高级后端开发工程师 |
25
+ | `Gemfile` + `config/routes.rb` | Ruby on Rails | 高级后端开发工程师 |
26
+ | 多种类型文件同时存在 | 全栈 | 高级全栈开发工程师 |
27
+ | `*.xcodeproj` / `*.xcworkspace` | iOS/macOS | 高级移动端开发工程师 |
28
+ | `build.gradle` + `app/src/main/AndroidManifest.xml` | Android | 高级移动端开发工程师 |
29
+ | `notebook/*.ipynb` / `requirements.txt` + `torch`/`tensorflow` | 数据科学 | 高级数据科学工程师 |
30
+ | `Dockerfile` / `docker-compose.yml` + 无明显业务代码 | DevOps | 高级 DevOps 工程师 |
31
+ | 无法判断 | 未知 | 通用高级软件工程师 |
32
+
33
+ ## 输出格式
34
+
35
+ ```
36
+ ## 项目类型识别
37
+ - 类型:前端(Vue)
38
+ - 框架:Vite + Vue 3
39
+ - 语言:TypeScript
40
+ - 身份:高级前端开发工程师,精通 Vue 3 + TypeScript + Vite
41
+ - 判断依据:检测到 package.json、vite.config.ts、src/App.vue
42
+ ```
43
+
44
+ ## 身份持久化规则
45
+
46
+ - 身份一旦设定,必须作为本会话的系统上下文持续生效
47
+ - 后续所有任务(代码、调试、审查、架构设计等)必须以该身份的技术视角和工程标准来执行
48
+ - 直到用户明确说"切换身份"或"重置身份",否则不得更换身份
49
+
50
+ ## 使用场景
51
+
52
+ 1. **首次接触项目时** — 调用此 skill 建立上下文身份
53
+ 2. **复杂项目多轮对话** — 明确身份后保持一致
54
+ 3. **新开对话处理同一项目时** — 重新调用此 skill 重建身份
package/src/cli.js ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { runInteractive } from "./lib/ui.js";
4
+
5
+ async function main() {
6
+ try {
7
+ await runInteractive();
8
+ } catch (error) {
9
+ if (error?.name === "ExitPromptError") {
10
+ console.log("\n 👋 Bye!\n");
11
+ process.exit(0);
12
+ }
13
+ console.error("\n Error:", error.message ?? String(error));
14
+ process.exit(1);
15
+ }
16
+ }
17
+
18
+ main();