@kairyou/agent-tools 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/README.md +129 -31
- package/README.zh-CN.md +128 -31
- package/dist/vision/cli.mjs +1972 -0
- package/dist/vision/mcp-server.mjs +32858 -0
- package/lib/usage.mjs +1 -1
- package/lib/vision/cli.mjs +137 -0
- package/lib/vision/config.mjs +159 -0
- package/lib/vision/errors.mjs +35 -0
- package/lib/vision/image-source.mjs +273 -0
- package/lib/vision/inspect.mjs +108 -0
- package/lib/vision/providers/anthropic-compatible.mjs +59 -0
- package/lib/vision/providers/openai-compatible.mjs +56 -0
- package/lib/vision/providers/shared.mjs +251 -0
- package/lib/vision/rate-limit.mjs +188 -0
- package/lib/vision/redact.mjs +30 -0
- package/package.json +11 -2
- package/plugins/vision/mcp-server.mjs +96 -0
- package/plugins/vision/skills/at-vision/SKILL.md +66 -0
- package/scripts/build-vision.mjs +35 -0
- package/scripts/capture-codex-tools.mjs +48 -0
- package/scripts/install.mjs +456 -8
- package/scripts/release.mjs +56 -0
- package/skills/integrations/at-zentao/SKILL.md +148 -0
- package/skills/workflow/at-commit/SKILL.md +3 -8
- package/skills/workflow/at-review/SKILL.md +9 -4
- package/skills/workflow/at-simplify/SKILL.md +1 -0
- package/statusline/claude/statusline.mjs +1 -1
package/README.md
CHANGED
|
@@ -12,40 +12,129 @@ agent-tools/
|
|
|
12
12
|
├── .codex-plugin/ # Codex plugin manifest.
|
|
13
13
|
├── hooks/ # Shared and agent-specific hook integrations.
|
|
14
14
|
├── plugins/ # Runtime plugins loaded by supported agents.
|
|
15
|
+
│ └── vision/ # Cross-model image understanding (inspect_image MCP server + bundled at-vision skill).
|
|
15
16
|
├── scripts/ # Install, sync, validation, and maintenance scripts.
|
|
16
17
|
├── skills/ # Reusable Agent Skills for CLI discovery and plugin manifests.
|
|
17
|
-
│
|
|
18
|
-
│
|
|
19
|
-
│
|
|
20
|
-
│
|
|
18
|
+
│ ├── workflow/ # Workflow-oriented skills.
|
|
19
|
+
│ │ ├── at-commit/ # Conventional Commit message skill.
|
|
20
|
+
│ │ ├── at-review/ # Review changes for bugs and regressions.
|
|
21
|
+
│ │ └── at-simplify/ # Reduce complexity and duplication in changes.
|
|
22
|
+
│ └── integrations/ # Skills that integrate external systems.
|
|
23
|
+
│ └── at-zentao/ # ZenTao bug/task fixing workflow.
|
|
21
24
|
├── statusline/ # Statusline scripts/templates, grouped by agent.
|
|
22
25
|
│ └── claude/ # Claude command-backed statusLine script + example config.
|
|
23
26
|
└── lib/ # Shared implementation used by hooks, statuslines, and installers.
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
##
|
|
29
|
+
## Skills
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
- `at-review`: Review changes for correctness bugs, regressions, convention violations, and high-value cleanup findings.
|
|
30
|
-
- `at-simplify`: Refactor changes to reduce duplication, lower complexity, and improve code quality.
|
|
31
|
-
|
|
32
|
-
## Usage
|
|
33
|
-
|
|
34
|
-
List available skills:
|
|
31
|
+
### Install
|
|
35
32
|
|
|
36
33
|
```bash
|
|
34
|
+
# List available skills
|
|
37
35
|
npx -y skills@latest add kairyou/agent-tools --list
|
|
36
|
+
|
|
37
|
+
# Install globally (pass one or more names after --skill)
|
|
38
|
+
npx -y skills@latest add kairyou/agent-tools --skill <name...> -g -y
|
|
38
39
|
```
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
### at-commit
|
|
42
|
+
|
|
43
|
+
Generate a Conventional Commits message from staged changes and wait for user confirmation before committing.
|
|
41
44
|
|
|
42
45
|
```bash
|
|
43
46
|
npx -y skills@latest add kairyou/agent-tools --skill at-commit -g -y
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Usage: `/at-commit [<language>]` — language for the commit description (Conventional Commits tokens stay in English)
|
|
50
|
+
|
|
51
|
+
### at-review
|
|
52
|
+
|
|
53
|
+
Review changes for correctness bugs, regressions, convention violations, and high-value cleanup findings.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
44
56
|
npx -y skills@latest add kairyou/agent-tools --skill at-review -g -y
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- Usage: `/at-review [--fix] [<pr|branch|path>]` — reports findings; `--fix` also applies them
|
|
60
|
+
|
|
61
|
+
### at-simplify
|
|
62
|
+
|
|
63
|
+
Refactor changes to reduce duplication, lower complexity, and improve code quality.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
45
66
|
npx -y skills@latest add kairyou/agent-tools --skill at-simplify -g -y
|
|
46
67
|
```
|
|
47
68
|
|
|
48
|
-
|
|
69
|
+
- Usage: `/at-simplify [<pr|branch|path>]`
|
|
70
|
+
|
|
71
|
+
### at-zentao
|
|
72
|
+
|
|
73
|
+
Work ZenTao (禅道) bugs/tasks end to end: fix, verify, stage; asks before committing and before writing status back.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx -y skills@latest add kairyou/agent-tools --skill at-zentao -g -y
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Usage:
|
|
80
|
+
|
|
81
|
+
- `/at-zentao bugs` — list bugs assigned to you (the configured account); pick one or several (several = batch mode)
|
|
82
|
+
- `/at-zentao tasks` — same, for tasks
|
|
83
|
+
- `/at-zentao bug <id>` — work a specific bug
|
|
84
|
+
- `/at-zentao task <id>` — work a specific task
|
|
85
|
+
|
|
86
|
+
Config: `~/.agent-tools/config.jsonc` → `"zentao": { "url", "account", "password" }`. First run guides you; fill `password` in the file yourself (or env `ZENTAO_PASSWORD`), never in chat.
|
|
87
|
+
|
|
88
|
+
## Plugins
|
|
89
|
+
|
|
90
|
+
### Vision (cross-model image understanding)
|
|
91
|
+
|
|
92
|
+
Lets a main model that cannot see images ask a multimodal model specific questions about an image (local path or http(s) URL) and reason on from the answers. Typical uses: reading error screenshots, implementing UI from design mockups, locating the glitch in a bug-report screenshot. One installer capability bundling three parts: the `inspect_image` MCP stdio server, the `at-vision` policy skill, and a human diagnostic CLI.
|
|
93
|
+
|
|
94
|
+
#### Install
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# One command per agent (or list several)
|
|
98
|
+
npx -y @kairyou/agent-tools@latest vision -a claude
|
|
99
|
+
npx -y @kairyou/agent-tools@latest vision -a codex claude opencode
|
|
100
|
+
|
|
101
|
+
# Preview or uninstall (uninstall keeps your vision provider config)
|
|
102
|
+
npx -y @kairyou/agent-tools@latest vision -a claude --dry-run
|
|
103
|
+
npx -y @kairyou/agent-tools@latest vision -a claude --uninstall
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Install atomically writes a prebuilt, self-contained MCP runtime to `~/.agent-tools/vision-runtime`, registers it per agent (Claude Code: `~/.claude.json`; Codex: a marker-delimited block in `~/.codex/config.toml`; OpenCode: `opencode.json`), and installs the `at-vision` skill into the agent's global skills directory (Claude Code: `~/.claude/skills`; Codex: `~/.agents/skills`; OpenCode: its config directory's `skills`). Installation does not download a second dependency tree; re-run the command to update. Uninstalling the last agent that references the shared runtime removes it while preserving the vision provider config.
|
|
107
|
+
|
|
108
|
+
#### Configure
|
|
109
|
+
|
|
110
|
+
`~/.agent-tools/config.jsonc` is the only config entry point:
|
|
111
|
+
|
|
112
|
+
```jsonc
|
|
113
|
+
{
|
|
114
|
+
"vision": {
|
|
115
|
+
"provider": "openai-compatible", // or "anthropic-compatible"
|
|
116
|
+
"baseUrl": "https://gateway.example.com/v1", // anthropic-compatible: gateway root, /v1/messages is appended
|
|
117
|
+
"model": "internal-vlm",
|
|
118
|
+
"apiKey": { "env": "OPENAI_API_KEY" } // reuse an existing env var, or the key itself
|
|
119
|
+
// optional: "timeoutMs": 30000, "maxImageBytes": 20971520, "maxOutputTokens": 8192,
|
|
120
|
+
// "maxConcurrentRequests": 2, "maxRequestsPerMinute": 30
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`apiKey` takes the key itself, or `{ "env": "VARIABLE_NAME" }` to reuse an existing environment variable; omit it if your gateway needs no key.
|
|
126
|
+
The runtime sends provider requests directly, so the API key never enters a shell command; user-facing errors redact it as `***`. `maxConcurrentRequests` and `maxRequestsPerMinute` are shared across local MCP and CLI processes.
|
|
127
|
+
Image bytes are streamed into the provider's base64 JSON request without recompression; URL inputs use a private temporary file that is removed after each request.
|
|
128
|
+
|
|
129
|
+
#### Use
|
|
130
|
+
|
|
131
|
+
Pass images as file paths or URLs in your message. The agent prefers the `inspect_image` MCP tool and falls back to the installed local vision CLI when its model gateway cannot invoke MCP namespace tools. Do not paste screenshots directly: with a non-vision main model the paste fails with an API 400 before any tool runs — save the image and give its path instead.
|
|
132
|
+
|
|
133
|
+
To diagnose the provider setup or test recognition quality manually:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npx -y @kairyou/agent-tools@latest inspect-image <path|url> -q "What are the navbar background color and height?"
|
|
137
|
+
```
|
|
49
138
|
|
|
50
139
|
## Runtime integrations
|
|
51
140
|
|
|
@@ -55,11 +144,11 @@ Pass multiple skills after `--skill`, for example `--skill at-commit at-review a
|
|
|
55
144
|
|
|
56
145
|
```bash
|
|
57
146
|
# Install or update
|
|
58
|
-
npx -y
|
|
147
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude
|
|
59
148
|
|
|
60
149
|
# Preview or uninstall
|
|
61
|
-
npx -y
|
|
62
|
-
npx -y
|
|
150
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude --dry-run
|
|
151
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude --uninstall
|
|
63
152
|
```
|
|
64
153
|
|
|
65
154
|
The installer writes `statusLine` to `~/.claude/settings.json`. The default
|
|
@@ -82,11 +171,11 @@ it preserves top-of-file comments and existing values.
|
|
|
82
171
|
|
|
83
172
|
```bash
|
|
84
173
|
# Install or update
|
|
85
|
-
npx -y
|
|
174
|
+
npx -y @kairyou/agent-tools@latest usage -a codex
|
|
86
175
|
|
|
87
176
|
# Preview or uninstall
|
|
88
|
-
npx -y
|
|
89
|
-
npx -y
|
|
177
|
+
npx -y @kairyou/agent-tools@latest usage -a codex --dry-run
|
|
178
|
+
npx -y @kairyou/agent-tools@latest usage -a codex --uninstall
|
|
90
179
|
```
|
|
91
180
|
|
|
92
181
|
The installer adds the hook to `UserPromptSubmit` and `Stop` in
|
|
@@ -112,11 +201,11 @@ the plan expiry; `balance` is wallet credit; `today` and `30d` are API spend.
|
|
|
112
201
|
|
|
113
202
|
```bash
|
|
114
203
|
# Install or update
|
|
115
|
-
npx -y
|
|
204
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode
|
|
116
205
|
|
|
117
206
|
# Preview or uninstall
|
|
118
|
-
npx -y
|
|
119
|
-
npx -y
|
|
207
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode --dry-run
|
|
208
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode --uninstall
|
|
120
209
|
```
|
|
121
210
|
|
|
122
211
|
The installer adds global server and TUI plugins. After the active session
|
|
@@ -136,21 +225,30 @@ balance $244 | today $45.8 | 30d $604
|
|
|
136
225
|
Balance, quota, and plan usage queries support compatible Sub2API-like,
|
|
137
226
|
NewAPI/OneAPI/OneHub/DoneHub/Veloera/AnyRouter-like, and OpenRouter gateways.
|
|
138
227
|
|
|
228
|
+
### Run from Git
|
|
229
|
+
|
|
230
|
+
To run directly from the repository, replace the npm package name with
|
|
231
|
+
`github:kairyou/agent-tools` (Git required):
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npx -y github:kairyou/agent-tools usage -a codex
|
|
235
|
+
```
|
|
236
|
+
|
|
139
237
|
## FAQ
|
|
140
238
|
|
|
141
|
-
### Why does
|
|
239
|
+
### Why does global installation fail for PromptScript?
|
|
142
240
|
|
|
143
241
|
`PromptScript does not support global skill installation` means that the
|
|
144
242
|
PromptScript agent does not support global installation. It does not affect
|
|
145
243
|
other agents and can be ignored. See [`skills` issue #1352](https://github.com/vercel-labs/skills/issues/1352).
|
|
146
244
|
|
|
245
|
+
## References
|
|
246
|
+
|
|
247
|
+
- [OpenCommit](https://github.com/di-sukharev/opencommit)
|
|
248
|
+
- [GitLens](https://github.com/gitkraken/vscode-gitlens)
|
|
249
|
+
- [claude-code-system-prompts](https://github.com/Piebald-AI/claude-code-system-prompts)
|
|
250
|
+
|
|
147
251
|
## Notes
|
|
148
252
|
|
|
149
|
-
- `skills/` contains reusable `SKILL.md` capabilities.
|
|
150
|
-
- `hooks/` keeps stable ownership directories for shared and agent-specific integrations.
|
|
151
|
-
- `plugins/` contains runtime plugin implementations such as opencode usage.
|
|
152
|
-
- `statusline/claude/` contains the command-backed Claude statusLine script.
|
|
153
|
-
- `lib/` contains shared implementation such as API usage query logic.
|
|
154
253
|
- The installer marks and removes only the config entries it owns.
|
|
155
|
-
|
|
156
|
-
Run local checks with `npm test`.
|
|
254
|
+
- Run local checks with `npm test`.
|
package/README.zh-CN.md
CHANGED
|
@@ -10,40 +10,129 @@ agent-tools/
|
|
|
10
10
|
├── .codex-plugin/ # Codex plugin manifest。
|
|
11
11
|
├── hooks/ # 通用 hook 逻辑及各 agent 的适配实现。
|
|
12
12
|
├── plugins/ # 由各 agent 加载的 runtime plugins.
|
|
13
|
+
│ └── vision/ # 跨模型识图(inspect_image MCP server + 内置 at-vision skill)。
|
|
13
14
|
├── scripts/ # 安装、同步、校验和仓库维护脚本。
|
|
14
15
|
├── skills/ # 可复用 Agent Skills,供 CLI 扫描和 plugin manifest 声明。
|
|
15
|
-
│
|
|
16
|
-
│
|
|
17
|
-
│
|
|
18
|
-
│
|
|
16
|
+
│ ├── workflow/ # 工作流类 skills。
|
|
17
|
+
│ │ ├── at-commit/ # 生成 Conventional Commits message.
|
|
18
|
+
│ │ ├── at-review/ # 审查改动中的 bug 与回归风险.
|
|
19
|
+
│ │ └── at-simplify/ # 减少改动中的冗余和复杂度.
|
|
20
|
+
│ └── integrations/ # 对接外部系统的 skills。
|
|
21
|
+
│ └── at-zentao/ # 禅道 bug/task 修复工作流.
|
|
19
22
|
├── statusline/ # Statusline 配置片段/模板,按 agent 分组。
|
|
20
23
|
│ └── claude/ # Claude command-backed statusLine 脚本和示例配置。
|
|
21
24
|
└── lib/ # hooks、statusline、installer 复用的共享实现。
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
##
|
|
27
|
+
## Skills
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
- `at-review`: 审查改动中的正确性 bug, 回归风险, 约定违规和高价值清理项.
|
|
28
|
-
- `at-simplify`: 重构改动, 减少冗余, 降低复杂度, 提升代码质量.
|
|
29
|
-
|
|
30
|
-
## 使用方式
|
|
31
|
-
|
|
32
|
-
查看可用 skills:
|
|
29
|
+
### 安装
|
|
33
30
|
|
|
34
31
|
```bash
|
|
32
|
+
# 查看可用 skills
|
|
35
33
|
npx -y skills@latest add kairyou/agent-tools --list
|
|
34
|
+
|
|
35
|
+
# 全局安装(--skill 后面可以跟一个或多个名字)
|
|
36
|
+
npx -y skills@latest add kairyou/agent-tools --skill <name...> -g -y
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
### at-commit
|
|
40
|
+
|
|
41
|
+
根据暂存区改动生成 Conventional Commits message, 并在提交前等待用户确认.
|
|
39
42
|
|
|
40
43
|
```bash
|
|
41
44
|
npx -y skills@latest add kairyou/agent-tools --skill at-commit -g -y
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- 用法: `/at-commit [<语言>]` — 指定 commit description 的语言(Conventional Commits 语法部分保持英文)
|
|
48
|
+
|
|
49
|
+
### at-review
|
|
50
|
+
|
|
51
|
+
审查改动中的正确性 bug, 回归风险, 约定违规和高价值清理项.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
42
54
|
npx -y skills@latest add kairyou/agent-tools --skill at-review -g -y
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- 用法: `/at-review [--fix] [<pr|分支|路径>]` — 输出审查结果; 加 `--fix` 则同时应用修复
|
|
58
|
+
|
|
59
|
+
### at-simplify
|
|
60
|
+
|
|
61
|
+
重构改动, 减少冗余, 降低复杂度, 提升代码质量.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
43
64
|
npx -y skills@latest add kairyou/agent-tools --skill at-simplify -g -y
|
|
44
65
|
```
|
|
45
66
|
|
|
46
|
-
|
|
67
|
+
- 用法: `/at-simplify [<pr|分支|路径>]`
|
|
68
|
+
|
|
69
|
+
### at-zentao
|
|
70
|
+
|
|
71
|
+
读取禅道 bug/task 并端到端处理: 修复, 验证, 暂存; 提交和回写状态前均需确认.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx -y skills@latest add kairyou/agent-tools --skill at-zentao -g -y
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
用法:
|
|
78
|
+
|
|
79
|
+
- `/at-zentao bugs` — 列出指派给你(配置的账号)的 bug, 挑一个或多个(多个 = 批量模式)
|
|
80
|
+
- `/at-zentao tasks` — 同上, 任务清单
|
|
81
|
+
- `/at-zentao bug <id>` — 直接处理指定 bug
|
|
82
|
+
- `/at-zentao task <id>` — 直接处理指定 task
|
|
83
|
+
|
|
84
|
+
配置: `~/.agent-tools/config.jsonc` → `"zentao": { "url", "account", "password" }`. 首次使用会引导; `password` 自己填进文件(或设环境变量 `ZENTAO_PASSWORD`), 不要发在对话里.
|
|
85
|
+
|
|
86
|
+
## Plugins
|
|
87
|
+
|
|
88
|
+
### Vision(跨模型识图)
|
|
89
|
+
|
|
90
|
+
让不支持图片的主模型借助多模态模型识图: 针对图片(本地路径或 http(s) URL)提出具体问题, 拿到答案后继续自己的推理. 常见场景: 读取报错截图, 按设计稿还原 UI, 定位测试反馈截图里的界面问题. 一个安装器 capability 包含三部分: `inspect_image` MCP stdio server, `at-vision` 策略 skill, 以及人工诊断 CLI.
|
|
91
|
+
|
|
92
|
+
#### 安装
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# 每个 agent 一条命令(也可以一次列多个)
|
|
96
|
+
npx -y @kairyou/agent-tools@latest vision -a claude
|
|
97
|
+
npx -y @kairyou/agent-tools@latest vision -a codex claude opencode
|
|
98
|
+
|
|
99
|
+
# 预览或卸载(卸载默认保留 vision provider 配置)
|
|
100
|
+
npx -y @kairyou/agent-tools@latest vision -a claude --dry-run
|
|
101
|
+
npx -y @kairyou/agent-tools@latest vision -a claude --uninstall
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
安装会把预构建的自包含 MCP runtime 原子写入 `~/.agent-tools/vision-runtime`, 为每个 agent 注册(Claude Code: `~/.claude.json`; Codex: `~/.codex/config.toml` 中带标记的独立块; OpenCode: `opencode.json`), 并把 `at-vision` skill 装入对应 agent 的全局 skills 目录(Claude Code: `~/.claude/skills`; Codex: `~/.agents/skills`; OpenCode: 配置目录下的 `skills`). 安装过程不再二次下载依赖; 更新 = 重新执行安装命令. 卸载最后一个引用该 runtime 的 agent 时会一并清理 runtime, 但保留 vision provider 配置.
|
|
105
|
+
|
|
106
|
+
#### 配置
|
|
107
|
+
|
|
108
|
+
`~/.agent-tools/config.jsonc` 是唯一配置入口:
|
|
109
|
+
|
|
110
|
+
```jsonc
|
|
111
|
+
{
|
|
112
|
+
"vision": {
|
|
113
|
+
"provider": "openai-compatible", // 或 "anthropic-compatible"
|
|
114
|
+
"baseUrl": "https://gateway.example.com/v1", // anthropic-compatible 填网关根地址, 会自动拼 /v1/messages
|
|
115
|
+
"model": "internal-vlm",
|
|
116
|
+
"apiKey": { "env": "OPENAI_API_KEY" } // 引用已有环境变量, 也可以直接填密钥
|
|
117
|
+
// 可选: "timeoutMs": 30000, "maxImageBytes": 20971520, "maxOutputTokens": 8192,
|
|
118
|
+
// "maxConcurrentRequests": 2, "maxRequestsPerMinute": 30
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`apiKey` 可直接填密钥, 或用 `{ "env": "VARIABLE_NAME" }` 引用已有环境变量; 网关不需要密钥时可省略.
|
|
124
|
+
Provider 请求由 runtime 直接发送, API key 不进入 shell 命令; 对外错误会将 key 脱敏为 `***`. `maxConcurrentRequests` 和 `maxRequestsPerMinute` 在本机的 MCP/CLI 进程之间共享.
|
|
125
|
+
图片字节会无损地流式编码到 Provider 的 base64 JSON 请求中, 不做重压缩; URL 图片使用私有临时文件, 每次请求结束后自动删除.
|
|
126
|
+
|
|
127
|
+
#### 使用
|
|
128
|
+
|
|
129
|
+
在消息里给出图片的文件路径或 URL 即可. Agent 优先调用 MCP 的 `inspect_image`; 模型网关不支持 MCP namespace tools 时, 改用已安装的本地 vision CLI. 不要直接粘贴截图: 主模型不支持图片时, 粘贴会在到达工具前就报 API 400 — 保存成文件再给路径.
|
|
130
|
+
|
|
131
|
+
人工排查配置或测试识别质量时可用:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx -y @kairyou/agent-tools@latest inspect-image <path|url> -q "导航栏的背景色和高度是多少"
|
|
135
|
+
```
|
|
47
136
|
|
|
48
137
|
## Runtime integrations
|
|
49
138
|
|
|
@@ -53,11 +142,11 @@ npx -y skills@latest add kairyou/agent-tools --skill at-simplify -g -y
|
|
|
53
142
|
|
|
54
143
|
```bash
|
|
55
144
|
# 安装或更新
|
|
56
|
-
npx -y
|
|
145
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude
|
|
57
146
|
|
|
58
147
|
# 预览或卸载
|
|
59
|
-
npx -y
|
|
60
|
-
npx -y
|
|
148
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude --dry-run
|
|
149
|
+
npx -y @kairyou/agent-tools@latest statusline -a claude --uninstall
|
|
61
150
|
```
|
|
62
151
|
|
|
63
152
|
安装器会把 `statusLine` 写入 `~/.claude/settings.json`. 默认显示:
|
|
@@ -78,11 +167,11 @@ npx -y github:kairyou/agent-tools statusline -a claude --uninstall
|
|
|
78
167
|
|
|
79
168
|
```bash
|
|
80
169
|
# 安装或更新
|
|
81
|
-
npx -y
|
|
170
|
+
npx -y @kairyou/agent-tools@latest usage -a codex
|
|
82
171
|
|
|
83
172
|
# 预览或卸载
|
|
84
|
-
npx -y
|
|
85
|
-
npx -y
|
|
173
|
+
npx -y @kairyou/agent-tools@latest usage -a codex --dry-run
|
|
174
|
+
npx -y @kairyou/agent-tools@latest usage -a codex --uninstall
|
|
86
175
|
```
|
|
87
176
|
|
|
88
177
|
安装器会把 hook 添加到 `~/.codex/hooks.json` 的 `UserPromptSubmit` 和
|
|
@@ -107,11 +196,11 @@ warning: API | balance $362 | today $61.7 | 30d $566
|
|
|
107
196
|
|
|
108
197
|
```bash
|
|
109
198
|
# 安装或更新
|
|
110
|
-
npx -y
|
|
199
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode
|
|
111
200
|
|
|
112
201
|
# 预览或卸载
|
|
113
|
-
npx -y
|
|
114
|
-
npx -y
|
|
202
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode --dry-run
|
|
203
|
+
npx -y @kairyou/agent-tools@latest usage -a opencode --uninstall
|
|
115
204
|
```
|
|
116
205
|
|
|
117
206
|
安装器会添加全局 server plugin 和 TUI plugin. 当前 session 进入 idle 后, server
|
|
@@ -130,20 +219,28 @@ balance $244 | today $45.8 | 30d $604
|
|
|
130
219
|
余额, 额度和套餐用量查询支持兼容 Sub2API-like,
|
|
131
220
|
NewAPI/OneAPI/OneHub/DoneHub/Veloera/AnyRouter-like 与 OpenRouter 的网关.
|
|
132
221
|
|
|
222
|
+
### 从 Git 运行
|
|
223
|
+
|
|
224
|
+
如需直接使用仓库版本,可将 npm 包名替换为 `github:kairyou/agent-tools`(本机需已安装 Git):
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
npx -y github:kairyou/agent-tools usage -a codex
|
|
228
|
+
```
|
|
229
|
+
|
|
133
230
|
## FAQ
|
|
134
231
|
|
|
135
|
-
###
|
|
232
|
+
### 为什么全局安装提示 PromptScript 不支持?
|
|
136
233
|
|
|
137
234
|
`PromptScript does not support global skill installation` 表示 PromptScript Agent 不支持全局
|
|
138
235
|
安装,不影响其他 Agent,可忽略。参见 [`skills` issue #1352](https://github.com/vercel-labs/skills/issues/1352)。
|
|
139
236
|
|
|
237
|
+
## References
|
|
238
|
+
|
|
239
|
+
- [OpenCommit](https://github.com/di-sukharev/opencommit)
|
|
240
|
+
- [GitLens](https://github.com/gitkraken/vscode-gitlens)
|
|
241
|
+
- [claude-code-system-prompts](https://github.com/Piebald-AI/claude-code-system-prompts)
|
|
242
|
+
|
|
140
243
|
## 说明
|
|
141
244
|
|
|
142
|
-
- `skills/` 放可复用的 `SKILL.md` 能力。项目可以只安装自己需要的 skills。
|
|
143
|
-
- `hooks/` 按通用逻辑和各 agent 适配实现划分目录。
|
|
144
|
-
- `plugins/` 放 opencode usage 等 runtime plugin 实现.
|
|
145
|
-
- `statusline/claude/` 放 Claude command-backed statusLine 脚本。
|
|
146
|
-
- `lib/` 放 API usage 查询等共享实现。
|
|
147
245
|
- 安装器只标记并移除自己写入的配置项。
|
|
148
|
-
|
|
149
|
-
本地检查运行 `npm test`。
|
|
246
|
+
- 本地检查运行 `npm test`。
|