abelworkflow 0.1.0 → 0.2.0
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/.gitignore +2 -0
- package/README.md +64 -39
- package/bin/abelworkflow.mjs +0 -0
- package/lib/cli.mjs +1427 -66
- package/package.json +1 -1
- package/skills/grok-search/SKILL.md +20 -91
- package/skills/grok-search/scripts/_dotenv.py +28 -0
- package/skills/grok-search/scripts/groksearch_cli.py +2 -2
- package/skills/grok-search/scripts/groksearch_entry.py +25 -10
- package/skills/prompt-enhancer/.env.example +14 -0
- package/skills/prompt-enhancer/ADVANCED.md +40 -13
- package/skills/prompt-enhancer/SKILL.md +28 -54
- package/skills/prompt-enhancer/requirements.txt +2 -0
- package/skills/prompt-enhancer/scripts/_dotenv.py +28 -0
- package/skills/prompt-enhancer/scripts/enhance.py +52 -42
- package/skills/prompt-enhancer/scripts/prompt_enhancer_entry.py +212 -0
- package/skills/context7-auto-research/.env +0 -4
package/.gitignore
CHANGED
package/README.md
CHANGED
|
@@ -60,24 +60,67 @@ Codex、OpenCode、Claude Code 的 Skills 和 Commands 配置仓库。
|
|
|
60
60
|
|
|
61
61
|
## 安装与更新
|
|
62
62
|
|
|
63
|
-
###
|
|
63
|
+
### 方法一:npx 一键安装(推荐)
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
#
|
|
66
|
+
# 交互式初始化菜单
|
|
67
67
|
npx abelworkflow
|
|
68
68
|
|
|
69
|
+
# 直接执行工作流同步/重链
|
|
70
|
+
npx abelworkflow install
|
|
71
|
+
|
|
69
72
|
# 更新到最新发布版本
|
|
70
73
|
npx abelworkflow@latest
|
|
71
74
|
```
|
|
72
75
|
|
|
73
76
|
> 说明:
|
|
74
77
|
> - npm 发布包名必须使用小写,所以实际可执行命令是 `npx abelworkflow`。
|
|
75
|
-
> -
|
|
76
|
-
>
|
|
78
|
+
> - 交互式模式下,默认会打开初始化菜单,支持:
|
|
79
|
+
> - 同步 `~/.agents` 并自动重建 `~/.claude` / `~/.codex` 链接
|
|
80
|
+
> - 交互式填写 `grok-search`、`context7-auto-research`、`prompt-enhancer` 的 `.env`
|
|
81
|
+
> - 一键安装或更新 `Claude Code`、`Codex`
|
|
82
|
+
> - 配置 `Claude Code` 的第三方 API 到 `~/.claude/settings.json`
|
|
83
|
+
> - 配置 `Codex` 的第三方 API 到 `~/.codex/config.toml` 和 `~/.codex/auth.json`
|
|
84
|
+
> - 非交互场景请显式使用 `npx abelworkflow install`,不再保留旧的默认自动同步逻辑。
|
|
77
85
|
|
|
78
|
-
###
|
|
86
|
+
### 交互式初始化能力
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
`npx abelworkflow` 现在默认提供一个类似 `npx zcf` 的菜单,常见入口包括:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx abelworkflow
|
|
92
|
+
npx abelworkflow init
|
|
93
|
+
npx abelworkflow install
|
|
94
|
+
npx abelworkflow --help
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
其中完整初始化会按需引导你完成:
|
|
98
|
+
|
|
99
|
+
1. 安装 AbelWorkflow 到 `~/.agents`
|
|
100
|
+
2. 自动链接到 `~/.claude/` 和 `~/.codex/`
|
|
101
|
+
3. 可选安装 `Claude Code` CLI
|
|
102
|
+
4. 可选配置 `Claude Code` 第三方 API
|
|
103
|
+
5. 可选安装 `Codex` CLI
|
|
104
|
+
6. 可选配置 `Codex` 第三方 API
|
|
105
|
+
7. 可选填写三个技能的环境变量
|
|
106
|
+
|
|
107
|
+
### 技能环境写入位置
|
|
108
|
+
|
|
109
|
+
交互式配置会把技能密钥写到 `~/.agents` 下对应 skill 目录的 `.env` 中:
|
|
110
|
+
|
|
111
|
+
| 技能 | 写入位置 | 主要字段 |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `grok-search` | `~/.agents/skills/grok-search/.env` | `GROK_API_URL` `GROK_API_KEY` `GROK_MODEL` |
|
|
114
|
+
| `context7-auto-research` | `~/.agents/skills/context7-auto-research/.env` | `CONTEXT7_API_KEY` |
|
|
115
|
+
| `prompt-enhancer` | `~/.agents/skills/prompt-enhancer/.env` | `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` `PE_MODEL` |
|
|
116
|
+
|
|
117
|
+
### 方法二:源码克隆安装
|
|
118
|
+
|
|
119
|
+
如需自定义修改或贡献代码,可手动克隆后直接运行本地 CLI:
|
|
120
|
+
|
|
121
|
+
#### 1. 克隆仓库
|
|
122
|
+
|
|
123
|
+
**Linux/macOS(bash/zsh)**
|
|
81
124
|
|
|
82
125
|
```bash
|
|
83
126
|
# 首次安装
|
|
@@ -87,7 +130,7 @@ git clone https://github.com/abelxiaoxing/AbelWorkflow ~/.agents
|
|
|
87
130
|
git -C ~/.agents pull
|
|
88
131
|
```
|
|
89
132
|
|
|
90
|
-
|
|
133
|
+
**Windows(PowerShell)**
|
|
91
134
|
|
|
92
135
|
```powershell
|
|
93
136
|
# 首次安装
|
|
@@ -97,9 +140,19 @@ git clone https://github.com/abelxiaoxing/AbelWorkflow "$HOME\.agents"
|
|
|
97
140
|
git -C "$HOME\.agents" pull
|
|
98
141
|
```
|
|
99
142
|
|
|
100
|
-
|
|
143
|
+
#### 2. 执行本地初始化
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
cd ~/.agents
|
|
147
|
+
node bin/abelworkflow.mjs
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
如果只想重建链接,不进入菜单:
|
|
101
151
|
|
|
102
|
-
|
|
152
|
+
```bash
|
|
153
|
+
cd ~/.agents
|
|
154
|
+
node bin/abelworkflow.mjs install
|
|
155
|
+
```
|
|
103
156
|
|
|
104
157
|
### 映射关系(本仓库 → 配置目录)
|
|
105
158
|
|
|
@@ -109,39 +162,11 @@ git -C "$HOME\.agents" pull
|
|
|
109
162
|
| `skills/<skill>/` | `~/.claude/skills/<skill>/` | `~/.codex/skills/<skill>/` | Skills(每个目录一个技能) |
|
|
110
163
|
| `commands/oc/` | `~/.claude/commands/oc/` | `~/.codex/prompts/*.md` | Claude 读 `commands/`;Codex 读 `prompts/` |
|
|
111
164
|
|
|
112
|
-
### Linux/macOS(bash/zsh)
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
AGENTS_DIR="$HOME/.agents"
|
|
116
|
-
|
|
117
|
-
# Claude Code
|
|
118
|
-
mkdir -p "$HOME/.claude/commands" "$HOME/.claude/skills"
|
|
119
|
-
ln -s "$AGENTS_DIR/AGENTS.md" "$HOME/.claude/CLAUDE.md"
|
|
120
|
-
ln -s "$AGENTS_DIR/commands/oc" "$HOME/.claude/commands/oc"
|
|
121
|
-
for d in "$AGENTS_DIR/skills/"*; do
|
|
122
|
-
[ -d "$d" ] && ln -s "$d" "$HOME/.claude/skills/"
|
|
123
|
-
done
|
|
124
|
-
|
|
125
|
-
# Codex
|
|
126
|
-
mkdir -p "$HOME/.codex/skills" "$HOME/.codex/prompts"
|
|
127
|
-
ln -s "$AGENTS_DIR/AGENTS.md" "$HOME/.codex/AGENTS.md"
|
|
128
|
-
for d in "$AGENTS_DIR/skills/"*; do
|
|
129
|
-
[ -d "$d" ] && ln -s "$d" "$HOME/.codex/skills/"
|
|
130
|
-
done
|
|
131
|
-
ln -s "$AGENTS_DIR/commands/oc/init.md" "$HOME/.codex/prompts/init.md"
|
|
132
|
-
ln -s "$AGENTS_DIR/commands/oc/research.md" "$HOME/.codex/prompts/research.md"
|
|
133
|
-
ln -s "$AGENTS_DIR/commands/oc/plan.md" "$HOME/.codex/prompts/plan.md"
|
|
134
|
-
ln -s "$AGENTS_DIR/commands/oc/implementation.md" "$HOME/.codex/prompts/implementation.md"
|
|
135
|
-
ln -s "$AGENTS_DIR/commands/oc/diagnose.md" "$HOME/.codex/prompts/diagnose.md"
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
> 提示:
|
|
139
|
-
> - 如果提示 `File exists`,说明目标路径已存在:先备份/删除原文件(例如 `mv ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak`),再重新执行 `ln -s`。
|
|
140
|
-
> - 不建议把整个 `skills/` 目录直接链接成 `~/.codex/skills`,否则可能遮住 Codex 自带的 `~/.codex/skills/.system/`。
|
|
141
|
-
|
|
142
165
|
### 验证(可选)
|
|
143
166
|
|
|
144
167
|
```bash
|
|
145
168
|
ls -la "$HOME/.claude/CLAUDE.md" "$HOME/.claude/commands/oc"
|
|
146
169
|
ls -la "$HOME/.codex/AGENTS.md" "$HOME/.codex/prompts/"{init,research,plan,implementation,diagnose}.md
|
|
170
|
+
cat "$HOME/.claude/settings.json" | head
|
|
171
|
+
cat "$HOME/.codex/config.toml" | head
|
|
147
172
|
```
|
package/bin/abelworkflow.mjs
CHANGED
|
File without changes
|