@e4779/skills 0.0.0-stage → 0.1.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/chrome-devtools/README.md +76 -0
- package/chrome-devtools/SKILL.md +277 -0
- package/chrome-devtools/references/recipes.md +379 -0
- package/chrome-devtools/references/setup.md +138 -0
- package/drawio/SKILL.md +395 -0
- package/gh-cli/SKILL.md +83 -0
- package/grill/SKILL.md +72 -0
- package/layout-check/README.md +32 -0
- package/layout-check/SKILL.md +416 -0
- package/layout-check/scripts/layoutProbe.mjs +539 -0
- package/mcpls/SKILL.md +261 -0
- package/mcpls/references/configuration.md +131 -0
- package/mcpls/references/install.md +13 -0
- package/mcporter/SKILL.md +90 -0
- package/mindmap/SKILL.md +46 -0
- package/mindmap/references/drawio-recipe.md +60 -0
- package/mindmap/references/mindmap-design.md +63 -0
- package/opensource-contribution/SKILL.md +119 -0
- package/package.json +29 -5
- package/shell-taste/.shellcheckrc +16 -0
- package/shell-taste/SKILL.md +95 -0
- package/shell-taste/references/handbook/dialects.md +168 -0
- package/shell-taste/references/handbook/dom/01-output-logging.md +245 -0
- package/shell-taste/references/handbook/dom/02-errors-exit.md +48 -0
- package/shell-taste/references/handbook/dom/03-installation-setup.md +179 -0
- package/shell-taste/references/handbook/dom/04-network.md +384 -0
- package/shell-taste/references/handbook/dom/05-files-paths.md +74 -0
- package/shell-taste/references/handbook/dom/06-checks-validation.md +127 -0
- package/shell-taste/references/handbook/dom/07-system-administration.md +103 -0
- package/shell-taste/references/handbook/dom/08-privilege-users.md +58 -0
- package/shell-taste/references/handbook/dom/09-text-data.md +62 -0
- package/shell-taste/references/handbook/dom/10-terminal-ux.md +60 -0
- package/shell-taste/references/handbook/dom/11-process-control.md +28 -0
- package/shell-taste/references/handbook/dom/12-uncategorized.md +161 -0
- package/shell-taste/references/handbook/dom/13-containers.md +13 -0
- package/shell-taste/references/handbook/dom/14-agents-ai-tooling.md +13 -0
- package/shell-taste/references/handbook/family-index.md +230 -0
- package/shell-taste/references/handbook/index.md +41 -0
- package/skill-author/SKILL.md +86 -0
- package/sobesednik/SKILL.md +98 -0
- package/sobesednik/card-template.md +23 -0
- package/sobesednik/personas/advocate.md +27 -0
- package/sobesednik/personas/analyst.md +29 -0
- package/sobesednik/personas/chat.md +42 -0
- package/sobesednik/personas/ifs.md +32 -0
- package/sobesednik/personas/journal/README.md +6 -0
- package/sobesednik/personas/nasreddin.md +29 -0
- package/sobesednik/personas/premortem.md +29 -0
- package/sobesednik/personas/rogers.md +27 -0
- package/sobesednik/personas/socratic.md +29 -0
- package/sobesednik/personas/stoic.md +27 -0
- package/sobesednik/references/persona-design.md +41 -0
- package/zai-mcp/README.md +63 -0
- package/zai-mcp/SKILL.md +160 -0
- package/zai-mcp/references/recipes.md +273 -0
- package/zai-mcp/references/tools.md +266 -0
- package/README.md +0 -3
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
> **Transport note.** Scenarios below use fabric-native syntax (mcp.<server>.<tool>()).
|
|
2
|
+
> On vanilla contours the same calls map 1:1 to: mcporter call <server> <tool> --args '<same JSON>'.
|
|
3
|
+
|
|
4
|
+
# Z.AI MCP — Recipes
|
|
5
|
+
|
|
6
|
+
> **Read on demand.** Worked scenarios using fabric natives (`mcp.zai_*`).
|
|
7
|
+
> Tools are in `tools.md`; the core workflow (search → reader) is in `../SKILL.md`.
|
|
8
|
+
|
|
9
|
+
**Drawn from real sessions**: the research loop is the heaviest pattern
|
|
10
|
+
(~830 of ~900 recorded calls are search + reader). Vision and zread are rarer
|
|
11
|
+
(~6% and ~1%) but high-value when you need them.
|
|
12
|
+
|
|
13
|
+
## Conventions
|
|
14
|
+
|
|
15
|
+
- Save large outputs to `/tmp/*.md` or `/tmp/*.json` and `read` what you need —
|
|
16
|
+
keeps raw bytes out of context.
|
|
17
|
+
- Tool names are **EXACT** (`web_search_prime` vs `webReader`). When unsure,
|
|
18
|
+
`tools.list({ provider: "mcp" })`.
|
|
19
|
+
- `image_source` / `video_source` accepts a URL **or** a local path.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Recipe 1 — Research loop (the main event)
|
|
24
|
+
|
|
25
|
+
> *Pattern behind research-llm-wiki (114 reader calls), invest-research
|
|
26
|
+
> (finam / MOEX / dohod), 9P_Ecosystem, etc.*
|
|
27
|
+
|
|
28
|
+
Goal: research a topic and produce a synthesis (wiki page, report, summary).
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// 1. SEARCH — cast a wide net
|
|
32
|
+
const hits = await mcp.zai_search.web_search_prime({
|
|
33
|
+
search_query: "GLM-4.6V vision benchmarks 2026",
|
|
34
|
+
content_size: "high",
|
|
35
|
+
});
|
|
36
|
+
// inspect the hits (title, link, content snippet per result)
|
|
37
|
+
// pick 2–4 promising URLs
|
|
38
|
+
|
|
39
|
+
// 2. READ — each URL → markdown, parked on disk
|
|
40
|
+
const [s1, s2] = await Promise.all([
|
|
41
|
+
mcp.zai_reader.webReader({ url: "https://example.com/article-1" }),
|
|
42
|
+
mcp.zai_reader.webReader({ url: "https://example.com/article-2",
|
|
43
|
+
with_links_summary: true }),
|
|
44
|
+
]);
|
|
45
|
+
await pi.write({ path: "/tmp/src-article-1.md", text: String(s1.text ?? s1) });
|
|
46
|
+
await pi.write({ path: "/tmp/src-article-2.md", text: String(s2.text ?? s2) });
|
|
47
|
+
|
|
48
|
+
// 3. SYNTHESIZE — pi.read the saved files, cross-reference, write
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Why save to disk:** a single `webReader` call can return tens of KB. Writing
|
|
52
|
+
it to `/tmp/` and `read`-ing (with offset/limit) keeps your context lean; you
|
|
53
|
+
can also `rg` the saved files for specific facts.
|
|
54
|
+
|
|
55
|
+
**When to narrow:** add `search_recency_filter: "month"` for news, or
|
|
56
|
+
`search_domain_filter: "site:arxiv.org"` for papers.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Recipe 2 — GitHub repo dive (without cloning)
|
|
61
|
+
|
|
62
|
+
> *When the repo is huge, or you only need to understand one corner.*
|
|
63
|
+
|
|
64
|
+
`zai-zread` indexes `owner/repo` on demand and answers structurally.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
// 1. orient — what's at the root?
|
|
68
|
+
await mcp.zai_zread.get_repo_structure({ repo_name: "9fans/go" })
|
|
69
|
+
|
|
70
|
+
// 2. find — semantic search for the concept
|
|
71
|
+
await mcp.zai_zread.search_doc({
|
|
72
|
+
repo_name: "9fans/go",
|
|
73
|
+
query: "9p protocol attach handshake",
|
|
74
|
+
language: "go",
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// 3. confirm — read the exact file
|
|
78
|
+
await mcp.zai_zread.read_file({
|
|
79
|
+
repo_name: "9fans/go",
|
|
80
|
+
file_path: "9p/9p.go",
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**When to prefer this over `git clone` + `rg`:**
|
|
85
|
+
- the repo is very large and you need one answer
|
|
86
|
+
- you want semantic ("how does auth work") not literal ("fn attach") search
|
|
87
|
+
- quick orientation on an unfamiliar codebase
|
|
88
|
+
|
|
89
|
+
**When to just clone:** you'll read many files, or need full local tooling
|
|
90
|
+
(lsp, type-check, run tests).
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Recipe 3 — OCR an error screenshot
|
|
95
|
+
|
|
96
|
+
> *User pastes a screenshot of a crash / log / stack trace.*
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
await mcp.zai_vision.extract_text_from_screenshot({
|
|
100
|
+
image_source: "/tmp/error.png",
|
|
101
|
+
prompt: "Transcribe the full stack trace verbatim, preserving indentation.",
|
|
102
|
+
programming_language: "rust",
|
|
103
|
+
})
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Then read the transcription into your reasoning. If it's a build/runtime error,
|
|
107
|
+
`diagnose_error_screenshot` adds a diagnosis on top of OCR:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
await mcp.zai_vision.diagnose_error_screenshot({
|
|
111
|
+
image_source: "/tmp/error.png",
|
|
112
|
+
prompt: "What's the root cause and the fix?",
|
|
113
|
+
context: "cargo build on nightly, feature gate async closure",
|
|
114
|
+
})
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Recipe 4 — Analyze a chart or technical diagram
|
|
120
|
+
|
|
121
|
+
> *Chart from a PDF / paper, or an architecture diagram you can't parse by eye.*
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
// data chart — read values and trend
|
|
125
|
+
await mcp.zai_vision.analyze_data_visualization({
|
|
126
|
+
image_source: "/tmp/chart.png",
|
|
127
|
+
prompt: "Read the y-axis values at each labeled x. State the trend.",
|
|
128
|
+
analysis_focus: "values",
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
// architecture / flow / schema
|
|
132
|
+
await mcp.zai_vision.understand_technical_diagram({
|
|
133
|
+
image_source: "/tmp/arch.png",
|
|
134
|
+
prompt: "Trace the request path from client to database, naming each hop.",
|
|
135
|
+
diagram_type: "architecture",
|
|
136
|
+
})
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Recipe 5 — UI diff (expected vs actual)
|
|
142
|
+
|
|
143
|
+
> *Visual regression check — compare a reference screenshot to current state.*
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
await mcp.zai_vision.ui_diff_check({
|
|
147
|
+
expected_image_source: "/tmp/expected.png",
|
|
148
|
+
actual_image_source: "/tmp/actual.png",
|
|
149
|
+
prompt: "List every visual difference: spacing, color, text, position. Ignore anti-aliasing.",
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Pairs well with the `layout-check` skill (coordinate-table layout verification)
|
|
154
|
+
for pixel-precise assertions.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Recipe 6 — Long-video analysis
|
|
159
|
+
|
|
160
|
+
> *Demo videos, conference talks — too long to watch, need a summary.*
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
await mcp.zai_vision.analyze_video({
|
|
164
|
+
video_source: "https://example.com/demo.mp4",
|
|
165
|
+
prompt: "Summarize the demo as a numbered step list. Note any UI shown and any numbers mentioned.",
|
|
166
|
+
})
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Prefer a **URL** for large videos (passing a big local file over STDIO is slow).
|
|
170
|
+
The first call may take a few seconds (cold start + processing).
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Recipe 7 — Screenshot → HTML/CSS artifact
|
|
175
|
+
|
|
176
|
+
> *Recreate a UI from a screenshot.*
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
// get code directly
|
|
180
|
+
await mcp.zai_vision.ui_to_artifact({
|
|
181
|
+
image_source: "/tmp/target-ui.png",
|
|
182
|
+
output_type: "code",
|
|
183
|
+
prompt: "Self-contained HTML+CSS; match the layout, spacing and colors exactly. No external assets.",
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
// or get a spec to implement yourself
|
|
187
|
+
await mcp.zai_vision.ui_to_artifact({
|
|
188
|
+
image_source: "/tmp/target-ui.png",
|
|
189
|
+
output_type: "spec",
|
|
190
|
+
prompt: "A component spec: layout grid, typography scale, color tokens, states.",
|
|
191
|
+
})
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`output_type` options: `code` (ready-to-paste), `prompt` (a prompt for another
|
|
195
|
+
model), `spec` (implementation spec), `description` (prose description).
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Recipe 8 — Render verification loop (chrome-devtools → zai-vision)
|
|
200
|
+
|
|
201
|
+
> *You rendered an HTML page / dashboard / chart and want to verify it looks
|
|
202
|
+
> right — without eyeballing the pixels yourself (or when your model can't
|
|
203
|
+
> see images). The two skills compose: chrome-devtools captures, zai-vision
|
|
204
|
+
> judges.*
|
|
205
|
+
|
|
206
|
+
This catches bugs that code review misses. The code *looked* correct — but a
|
|
207
|
+
JS charting library defaulted to a `category` axis where a numeric/`linear` one
|
|
208
|
+
was needed, so the axis labels showed the array indices (`0–9`) instead of the
|
|
209
|
+
real data range, and an annotation plugin silently never fired. The screenshot
|
|
210
|
+
+ vision analysis proved it was broken.
|
|
211
|
+
|
|
212
|
+
Whatever your stack — static HTML, a dev server, a built report, a generated
|
|
213
|
+
PDF opened in a browser — the loop is the same: **rebuild → screenshot the
|
|
214
|
+
live page → ask vision to check it against a structured checklist.**
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
// 1. rebuild the artifact through WHATEVER pipeline it uses
|
|
218
|
+
// (make, cargo, npm run build, a doc generator, a CI step…)
|
|
219
|
+
// <your build command>
|
|
220
|
+
|
|
221
|
+
// 2. load the page in chrome, FRESH each iteration.
|
|
222
|
+
// Append a cache-buster query param (?v=2, ?cb=3, ...) so chrome never
|
|
223
|
+
// serves a stale render of the old template from its HTTP cache.
|
|
224
|
+
const pages = await mcp.chrome_devtools.new_page({
|
|
225
|
+
url: "http://localhost:8000/path/to/page.html?v=2" });
|
|
226
|
+
const pageId = 1; // from list_pages / new_page
|
|
227
|
+
|
|
228
|
+
// 3. scroll the target region into view, then screenshot TO A FILE.
|
|
229
|
+
// (inline base64 bloats context; a file path stays cheap and reusable
|
|
230
|
+
// across iterations and comparisons.)
|
|
231
|
+
await mcp.chrome_devtools.evaluate_script({ pageId,
|
|
232
|
+
function: '() => { const el = document.querySelector("#target");
|
|
233
|
+
el.scrollIntoView({ block: "center" }); return { ok: true }; }' });
|
|
234
|
+
await mcp.chrome_devtools.take_screenshot({ pageId, filePath: "/tmp/shot.png" })
|
|
235
|
+
|
|
236
|
+
// 4. analyze with a STRUCTURED prompt — numbered yes/no beats vague prose.
|
|
237
|
+
// Pick the prompt to match what you changed; pick the tool to match what
|
|
238
|
+
// the artifact IS (see the table below).
|
|
239
|
+
await mcp.zai_vision.analyze_data_visualization({
|
|
240
|
+
image_source: "/tmp/shot.png",
|
|
241
|
+
prompt: "Answer each yes/no: 1) <expected visual fact>? 2) <label/axis/legend present and correct>? 3) <colors as intended>? 4) Anything clipped, overlapping, or missing? Final verdict: OK or list the concrete problems.",
|
|
242
|
+
})
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Tool choice by what you're verifying:
|
|
246
|
+
|
|
247
|
+
| Artifact | vision tool |
|
|
248
|
+
|---|---|
|
|
249
|
+
| Chart / plot / data table | `analyze_data_visualization` |
|
|
250
|
+
| General layout, spacing, typography | `analyze_image` |
|
|
251
|
+
| Regression vs a known-good reference | `ui_diff_check` (pass both images) |
|
|
252
|
+
| Text content / labels / numbers | `extract_text_from_screenshot` |
|
|
253
|
+
|
|
254
|
+
**The prompt is the lever.** A vague prompt ("does this look ok?") gets a vague
|
|
255
|
+
yes. A structured prompt with numbered, checkable assertions gets a reliable
|
|
256
|
+
per-item verdict and surfaces the one thing that's wrong. Write the checklist
|
|
257
|
+
you'd hand a human QA: "is the axis linear 0–100?", "is the legend on the
|
|
258
|
+
right?", "is the warning badge amber, not red?".
|
|
259
|
+
|
|
260
|
+
**Cold start:** the first `zai-vision` call after daemon restart may time out
|
|
261
|
+
(STDIO server spinning up). Retry once — STDIO servers cold-start per
|
|
262
|
+
fabric session; there is no daemon to restart.
|
|
263
|
+
|
|
264
|
+
Iterate: fix → rebuild → `?v=3` → screenshot → analyze, until the verdict is
|
|
265
|
+
OK. Two to four rounds is typical for a non-trivial artifact.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## See also
|
|
270
|
+
|
|
271
|
+
- `../SKILL.md` — top tools and the research loop
|
|
272
|
+
- `tools.md` — every tool, every param
|
|
273
|
+
- the `chrome-devtools` skill — capture half of this loop
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
> **Transport note.** Scenarios below use fabric-native syntax (mcp.<server>.<tool>()).
|
|
2
|
+
> On vanilla contours the same calls map 1:1 to: mcporter call <server> <tool> --args '<same JSON>'.
|
|
3
|
+
|
|
4
|
+
# Z.AI MCP — Full Tool Reference
|
|
5
|
+
|
|
6
|
+
> **Read on demand.** Every tool across the four servers, with full signatures.
|
|
7
|
+
> The common 87% (search + reader) lives in `../SKILL.md`; load this when a task
|
|
8
|
+
> needs `zai-zread` or `zai-vision`, or the exact optional params for search/reader.
|
|
9
|
+
|
|
10
|
+
## Tool surface
|
|
11
|
+
|
|
12
|
+
| server | transport | tools | use |
|
|
13
|
+
|---|---|---|---|
|
|
14
|
+
| `zai-search` | HTTP | 1 | web search |
|
|
15
|
+
| `zai-reader` | HTTP | 1 | page → markdown/html/text |
|
|
16
|
+
| `zai-zread` | HTTP | 3 | semantic read of a GitHub repo |
|
|
17
|
+
| `zai-vision` | STDIO | 8 | image/video analysis (GLM-4.6V) |
|
|
18
|
+
| | | **13** | |
|
|
19
|
+
|
|
20
|
+
**Confirm what's live on your box:**
|
|
21
|
+
```ts
|
|
22
|
+
await tools.call({ ref: "mcp.$servers" }); // live servers + tool counts
|
|
23
|
+
await tools.list({ provider: "mcp" }); // full catalog with schemas
|
|
24
|
+
```
|
|
25
|
+
If a tool is missing, the server isn't configured in `~/.mcporter/mcporter.json`.
|
|
26
|
+
|
|
27
|
+
All calls inside `fabric_exec`: `await mcp.zai_<server>.<tool>({ key: value, ... })` — server hyphens become underscores.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## zai-search — web search (1 tool)
|
|
32
|
+
|
|
33
|
+
### `web_search_prime` — web search
|
|
34
|
+
```ts
|
|
35
|
+
await mcp.zai_search.web_search_prime({ search_query: "GLM-4.6 benchmarks" })
|
|
36
|
+
await mcp.zai_search.web_search_prime({
|
|
37
|
+
search_query: "tokio runtime internals site:github.com",
|
|
38
|
+
content_size: "high",
|
|
39
|
+
search_recency_filter: "month",
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
Returns JSON array `[{title, link, content, refer}, ...]`.
|
|
43
|
+
|
|
44
|
+
| param | type | req | notes |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| `search_query` | string | ✓ | the query |
|
|
47
|
+
| `content_size` | string | | `low` \| `medium` \| `high` (detail/volume of results) |
|
|
48
|
+
| `search_recency_filter` | string | | `day` \| `week` \| `month` \| `year` |
|
|
49
|
+
| `search_domain_filter` | string | | e.g. `site:github.com` |
|
|
50
|
+
| `location` | string | | geo |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## zai-reader — page → markdown (1 tool)
|
|
55
|
+
|
|
56
|
+
### `webReader` — fetch a URL as markdown/html/text
|
|
57
|
+
```ts
|
|
58
|
+
await mcp.zai_reader.webReader({ url: "https://example.com/post" })
|
|
59
|
+
await mcp.zai_reader.webReader({
|
|
60
|
+
url: "https://example.com/post",
|
|
61
|
+
return_format: "markdown",
|
|
62
|
+
with_links_summary: true,
|
|
63
|
+
retain_images: true,
|
|
64
|
+
})
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
| param | type | req | notes |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `url` | string | ✓ | page to fetch |
|
|
70
|
+
| `return_format` | string | | `markdown` (default) \| `html` \| `text` |
|
|
71
|
+
| `retain_images` | bool | | keep images in output |
|
|
72
|
+
| `no_gfm` | bool | | disable GitHub-flavored markdown |
|
|
73
|
+
| `keep_img_data_url` | bool | | keep full image data URLs |
|
|
74
|
+
| `with_images_summary` | bool | | append an image inventory |
|
|
75
|
+
| `with_links_summary` | bool | | append a link inventory |
|
|
76
|
+
| `no_cache` | bool | | bypass cache (fresh fetch) |
|
|
77
|
+
| `timeout` | number | | seconds |
|
|
78
|
+
|
|
79
|
+
Returns: title, description, url, content (markdown/html/text), metadata
|
|
80
|
+
(Open Graph, Twitter card, viewport, theme-color, …), external assets.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## zai-zread — semantic GitHub-repo read (3 tools)
|
|
85
|
+
|
|
86
|
+
Read a repo **without cloning**. The server indexes `owner/repo` on demand and
|
|
87
|
+
answers structurally. Best for large repos or quick "how does X work" questions.
|
|
88
|
+
`repo_name` is always `owner/repo` (e.g. `9fans/go`, `tokio-rs/tokio`).
|
|
89
|
+
|
|
90
|
+
### `get_repo_structure` — list a directory
|
|
91
|
+
```ts
|
|
92
|
+
await mcp.zai_zread.get_repo_structure({ repo_name: "9fans/go" })
|
|
93
|
+
await mcp.zai_zread.get_repo_structure({
|
|
94
|
+
repo_name: "9fans/go",
|
|
95
|
+
dir_path: "9p",
|
|
96
|
+
})
|
|
97
|
+
```
|
|
98
|
+
| param | type | req | notes |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `repo_name` | string | ✓ | `owner/repo` |
|
|
101
|
+
| `dir_path` | string | | sub-directory (omit = root) |
|
|
102
|
+
|
|
103
|
+
### `search_doc` — semantic search of the repo's docs/code
|
|
104
|
+
```ts
|
|
105
|
+
await mcp.zai_zread.search_doc({
|
|
106
|
+
repo_name: "9fans/go",
|
|
107
|
+
query: "9p attach handshake",
|
|
108
|
+
})
|
|
109
|
+
await mcp.zai_zread.search_doc({
|
|
110
|
+
repo_name: "9fans/go",
|
|
111
|
+
query: "...",
|
|
112
|
+
language: "go",
|
|
113
|
+
})
|
|
114
|
+
```
|
|
115
|
+
| param | type | req | notes |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| `repo_name` | string | ✓ | `owner/repo` |
|
|
118
|
+
| `query` | string | ✓ | natural-language query |
|
|
119
|
+
| `language` | string | | hint the result language |
|
|
120
|
+
|
|
121
|
+
### `read_file` — fetch one file's content
|
|
122
|
+
```ts
|
|
123
|
+
await mcp.zai_zread.read_file({
|
|
124
|
+
repo_name: "9fans/go",
|
|
125
|
+
file_path: "README.md",
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
| param | type | req | notes |
|
|
129
|
+
|---|---|---|---|
|
|
130
|
+
| `repo_name` | string | ✓ | `owner/repo` |
|
|
131
|
+
| `file_path` | string | ✓ | path inside the repo |
|
|
132
|
+
|
|
133
|
+
Typical dive: `get_repo_structure` (orient) → `search_doc` (find) → `read_file`
|
|
134
|
+
(confirm). See `recipes.md`.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## zai-vision — image/video analysis (8 tools, GLM-4.6V)
|
|
139
|
+
|
|
140
|
+
`image_source` / `video_source` is a **URL or local file path**. Every tool
|
|
141
|
+
takes a `prompt`; some take an extra hint param. STDIO transport — cold start
|
|
142
|
+
adds a second or two on the first call.
|
|
143
|
+
|
|
144
|
+
### `analyze_image` — describe / answer questions about an image
|
|
145
|
+
```ts
|
|
146
|
+
await mcp.zai_vision.analyze_image({
|
|
147
|
+
image_source: "/tmp/diagram.png",
|
|
148
|
+
prompt: "What does this architecture show? List each component.",
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
| param | type | req | notes |
|
|
152
|
+
|---|---|---|---|
|
|
153
|
+
| `image_source` | string | ✓ | URL or path |
|
|
154
|
+
| `prompt` | string | ✓ | question / instruction |
|
|
155
|
+
|
|
156
|
+
### `analyze_video` — analyze / summarize a video
|
|
157
|
+
```ts
|
|
158
|
+
await mcp.zai_vision.analyze_video({
|
|
159
|
+
video_source: "/tmp/demo.mp4",
|
|
160
|
+
prompt: "Summarize the workflow shown, step by step.",
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
| param | type | req | notes |
|
|
164
|
+
|---|---|---|---|
|
|
165
|
+
| `video_source` | string | ✓ | URL or path (long videos → prefer URL) |
|
|
166
|
+
| `prompt` | string | ✓ | question / instruction |
|
|
167
|
+
|
|
168
|
+
### `extract_text_from_screenshot` — OCR (with optional language hint)
|
|
169
|
+
```ts
|
|
170
|
+
await mcp.zai_vision.extract_text_from_screenshot({
|
|
171
|
+
image_source: "/tmp/err.png",
|
|
172
|
+
prompt: "Transcribe every visible character, preserving layout.",
|
|
173
|
+
})
|
|
174
|
+
await mcp.zai_vision.extract_text_from_screenshot({
|
|
175
|
+
image_source: "/tmp/snippet.png",
|
|
176
|
+
prompt: "Transcribe the code.",
|
|
177
|
+
programming_language: "python",
|
|
178
|
+
})
|
|
179
|
+
```
|
|
180
|
+
| param | type | req | notes |
|
|
181
|
+
|---|---|---|---|
|
|
182
|
+
| `image_source` | string | ✓ | URL or path |
|
|
183
|
+
| `prompt` | string | ✓ | instruction |
|
|
184
|
+
| `programming_language` | string | | hint, improves code OCR |
|
|
185
|
+
|
|
186
|
+
### `understand_technical_diagram` — architecture / flow / schema diagrams
|
|
187
|
+
```ts
|
|
188
|
+
await mcp.zai_vision.understand_technical_diagram({
|
|
189
|
+
image_source: "/tmp/arch.png",
|
|
190
|
+
prompt: "Explain data flow end to end.",
|
|
191
|
+
diagram_type: "architecture",
|
|
192
|
+
})
|
|
193
|
+
```
|
|
194
|
+
| param | type | req | notes |
|
|
195
|
+
|---|---|---|---|
|
|
196
|
+
| `image_source` | string | ✓ | URL or path |
|
|
197
|
+
| `prompt` | string | ✓ | instruction |
|
|
198
|
+
| `diagram_type` | string | | e.g. `architecture`, `flowchart`, `schema` |
|
|
199
|
+
|
|
200
|
+
### `analyze_data_visualization` — charts / plots / dashboards
|
|
201
|
+
```ts
|
|
202
|
+
await mcp.zai_vision.analyze_data_visualization({
|
|
203
|
+
image_source: "/tmp/chart.png",
|
|
204
|
+
prompt: "What is the trend? Read off the key values.",
|
|
205
|
+
analysis_focus: "trend",
|
|
206
|
+
})
|
|
207
|
+
```
|
|
208
|
+
| param | type | req | notes |
|
|
209
|
+
|---|---|---|---|
|
|
210
|
+
| `image_source` | string | ✓ | URL or path |
|
|
211
|
+
| `prompt` | string | ✓ | instruction |
|
|
212
|
+
| `analysis_focus` | string | | e.g. `trend`, `outliers`, `values` |
|
|
213
|
+
|
|
214
|
+
### `diagnose_error_screenshot` — read an error screen with context
|
|
215
|
+
```ts
|
|
216
|
+
await mcp.zai_vision.diagnose_error_screenshot({
|
|
217
|
+
image_source: "/tmp/panic.png",
|
|
218
|
+
prompt: "What crashed and why?",
|
|
219
|
+
context: "rust build, nightly",
|
|
220
|
+
})
|
|
221
|
+
```
|
|
222
|
+
| param | type | req | notes |
|
|
223
|
+
|---|---|---|---|
|
|
224
|
+
| `image_source` | string | ✓ | URL or path |
|
|
225
|
+
| `prompt` | string | ✓ | instruction |
|
|
226
|
+
| `context` | string | | what you were doing when it happened |
|
|
227
|
+
|
|
228
|
+
### `ui_to_artifact` — screenshot → code / spec / description
|
|
229
|
+
```ts
|
|
230
|
+
await mcp.zai_vision.ui_to_artifact({
|
|
231
|
+
image_source: "/tmp/ui.png",
|
|
232
|
+
output_type: "code",
|
|
233
|
+
prompt: "Produce a self-contained HTML+CSS recreation.",
|
|
234
|
+
})
|
|
235
|
+
await mcp.zai_vision.ui_to_artifact({
|
|
236
|
+
image_source: "/tmp/ui.png",
|
|
237
|
+
output_type: "spec",
|
|
238
|
+
prompt: "Write a component spec a dev can implement from.",
|
|
239
|
+
})
|
|
240
|
+
```
|
|
241
|
+
| param | type | req | notes |
|
|
242
|
+
|---|---|---|---|
|
|
243
|
+
| `image_source` | string | ✓ | URL or path |
|
|
244
|
+
| `output_type` | string | ✓ | `code` \| `prompt` \| `spec` \| `description` |
|
|
245
|
+
| `prompt` | string | ✓ | shaping instruction |
|
|
246
|
+
|
|
247
|
+
### `ui_diff_check` — compare two screenshots
|
|
248
|
+
```ts
|
|
249
|
+
await mcp.zai_vision.ui_diff_check({
|
|
250
|
+
expected_image_source: "/tmp/expected.png",
|
|
251
|
+
actual_image_source: "/tmp/actual.png",
|
|
252
|
+
prompt: "List every visual difference.",
|
|
253
|
+
})
|
|
254
|
+
```
|
|
255
|
+
| param | type | req | notes |
|
|
256
|
+
|---|---|---|---|
|
|
257
|
+
| `expected_image_source` | string | ✓ | URL or path |
|
|
258
|
+
| `actual_image_source` | string | ✓ | URL or path |
|
|
259
|
+
| `prompt` | string | ✓ | what to focus on |
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## See also
|
|
264
|
+
|
|
265
|
+
- `../SKILL.md` — the 87% (search + reader) and the research-loop workflow
|
|
266
|
+
- `recipes.md` — worked end-to-end scenarios for zread and vision
|
package/README.md
DELETED