@1aboveio/skills 0.20.4 → 0.21.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 +8 -4
- package/package.json +1 -1
- package/runtime/skills/distribution/generated/recipes.json +136 -24
- package/runtime/skills/distribution/scripts/bundles.mjs +26 -25
- package/runtime/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
- package/skills/compliance/doc-authenticity/SKILL.md +2 -1
- package/skills/compliance/doc-authenticity/agents/openai.yaml +8 -0
- package/skills/content-creator/article-review/LICENSE +3 -0
- package/skills/content-creator/article-review/SKILL.md +65 -0
- package/skills/content-creator/article-review/references/report-format.md +68 -0
- package/skills/content-creator/article-review/references/template-guide.md +79 -0
- package/skills/content-creator/article-review/references/template-wechat-payments.md +125 -0
- package/skills/content-creator/article-to-image/LICENSE +3 -0
- package/skills/content-creator/article-to-image/SKILL.md +90 -0
- package/skills/content-creator/article-to-image/references/formats.md +53 -0
- package/skills/content-creator/wechat-article-writer/LICENSE +3 -0
- package/skills/content-creator/wechat-article-writer/SKILL.md +50 -0
- package/skills/content-creator/wechat-article-writer/references/style-comparison.md +64 -0
- package/skills/content-creator/wechat-article-writer/references/style-howto.md +64 -0
- package/skills/content-creator/wechat-article-writer/references/style-insight.md +63 -0
- package/skills/content-creator/wechat-article-writer/references/style-pitfall.md +60 -0
- package/skills/content-creator/wechat-article-writer/references/style-selector.md +133 -0
- package/skills/content-creator/wechat-article-writer/references/writing-rules.md +150 -0
- package/skills/content-creator/wechat-publisher/LICENSE +3 -0
- package/skills/content-creator/wechat-publisher/SKILL.md +170 -0
- package/skills/content-creator/wechat-publisher/references/api.md +105 -0
- package/skills/content-creator/wechat-publisher/references/layout-rules.md +57 -0
- package/skills/content-creator/wechat-publisher/references/wechat-safe-template.html +86 -0
- package/skills/content-creator/wechat-publisher/scripts/md_to_wechat_html.py +194 -0
- package/skills/content-creator/wechat-publisher/scripts/publish.py +239 -0
- package/skills/content-creator/wechat-search/LICENSE +3 -0
- package/skills/content-creator/wechat-search/SKILL.md +210 -0
- package/skills/content-creator/wechat-search/scripts/start-chrome.sh +83 -0
- package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +1 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wechat-search
|
|
3
|
+
description: "Search WeChat 公众号 articles via Sogou Weixin, or read/summarize an article from a mp.weixin.qq.com URL (读/分析/总结) — suggest proactively when such a URL appears. Use for Chinese WeChat content, industry reports, competitor or trending topics. Requires Chrome Browser Relay. NOT general web search (web_search)."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WeChat Article Search & Reader (搜狗微信搜索)
|
|
7
|
+
|
|
8
|
+
Two modes:
|
|
9
|
+
1. **Search mode** — search 公众号 articles via Sogou WeChat Search
|
|
10
|
+
2. **Read mode** — read a full article from a `mp.weixin.qq.com` URL
|
|
11
|
+
|
|
12
|
+
## Step 0: Ensure Chrome is Running (MANDATORY — run before anything else)
|
|
13
|
+
|
|
14
|
+
**Every session must start here.** Do not skip this step.
|
|
15
|
+
|
|
16
|
+
### Check if Chrome CDP is available
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
curl -s --max-time 2 http://localhost:18801/json/version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- **Returns JSON** → Chrome is ready, proceed to the workflow
|
|
23
|
+
- **Fails / empty** → Chrome is not running, start it now (see below)
|
|
24
|
+
|
|
25
|
+
### Start Chrome (Linux)
|
|
26
|
+
|
|
27
|
+
Run the bundled script — it auto-detects the Chrome binary and waits until CDP is ready:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bash {baseDir}/scripts/start-chrome.sh
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Expected output:
|
|
34
|
+
```
|
|
35
|
+
🚀 Starting Chrome...
|
|
36
|
+
⏳ Waiting for CDP... ready!
|
|
37
|
+
✅ Chrome CDP available at http://localhost:18801
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If the script errors with "Chrome not found", install Chrome:
|
|
41
|
+
```bash
|
|
42
|
+
# Debian/Ubuntu
|
|
43
|
+
sudo apt install google-chrome-stable
|
|
44
|
+
# Fedora
|
|
45
|
+
sudo dnf install google-chrome-stable
|
|
46
|
+
# Snap
|
|
47
|
+
sudo snap install chromium
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Start Chrome (macOS / Windows)
|
|
51
|
+
|
|
52
|
+
**macOS:**
|
|
53
|
+
```bash
|
|
54
|
+
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
|
|
55
|
+
--remote-debugging-port=18801 \
|
|
56
|
+
--user-data-dir=/tmp/chrome-cdp-profile \
|
|
57
|
+
--no-first-run &
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Windows:**
|
|
61
|
+
```bat
|
|
62
|
+
"C:\Program Files\Google\Chrome\Application\chrome.exe" ^
|
|
63
|
+
--remote-debugging-port=18801 ^
|
|
64
|
+
--user-data-dir=%TEMP%\chrome-cdp-profile ^
|
|
65
|
+
--no-first-run
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
> **Tip:** Reuse the same `--user-data-dir` across sessions to preserve WeChat login state.
|
|
69
|
+
|
|
70
|
+
### Get tab ID (required for all browser calls)
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
browser action=tabs profile=chrome
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Use the first `targetId` from the response in all subsequent `browser` calls.
|
|
77
|
+
|
|
78
|
+
**Key parameters:**
|
|
79
|
+
```
|
|
80
|
+
profile=chrome # CDP on localhost:18801 (real browser — avoids anti-bot)
|
|
81
|
+
targetId=<id> # from browser action=tabs
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Mode 1: Read Article from URL
|
|
87
|
+
|
|
88
|
+
Triggered when user provides a `mp.weixin.qq.com` URL.
|
|
89
|
+
|
|
90
|
+
### Step 1: Try web_fetch first
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
web_fetch url="<mp.weixin.qq.com URL>"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If successful, extract and present:
|
|
97
|
+
- **标题** — article title
|
|
98
|
+
- **公众号** — account name (author)
|
|
99
|
+
- **发布时间** — publish date
|
|
100
|
+
- **正文** — full body text
|
|
101
|
+
|
|
102
|
+
### Step 2: If web_fetch blocked (requires login), use browser
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
# Get attached tab ID
|
|
106
|
+
browser action=tabs profile=chrome
|
|
107
|
+
# → use the first targetId from the response
|
|
108
|
+
|
|
109
|
+
browser action=navigate profile=chrome targetId=<id> targetUrl="<mp.weixin.qq.com URL>"
|
|
110
|
+
# Wait ~2s for page to load
|
|
111
|
+
browser action=snapshot profile=chrome targetId=<id>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Extract title, 公众号 name, date, and body text from the snapshot.
|
|
115
|
+
|
|
116
|
+
### Output format (Read mode)
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
📄 **[标题]**
|
|
120
|
+
公众号:[账号名] · [发布时间]
|
|
121
|
+
|
|
122
|
+
[正文内容,完整呈现或摘要视长度而定]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Mode 2: Search Articles
|
|
128
|
+
|
|
129
|
+
Triggered when user wants to search for WeChat content by keyword.
|
|
130
|
+
|
|
131
|
+
### Step 1: Get tab ID
|
|
132
|
+
|
|
133
|
+
Complete **Step 0** first. Then get the tab ID:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
browser action=tabs profile=chrome
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Use the first `targetId` for all subsequent browser calls.
|
|
140
|
+
|
|
141
|
+
### Step 2: Navigate to Sogou WeChat Search
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
browser action=navigate profile=chrome targetId=<id> targetUrl="https://weixin.sogou.com/"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Step 3: Snapshot to find search box
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
browser action=snapshot profile=chrome targetId=<id>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Look for the `textbox` element (search input).
|
|
154
|
+
|
|
155
|
+
### Step 4: Type query and submit
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
browser action=act profile=chrome targetId=<id>
|
|
159
|
+
request: { kind: "type", ref: "<search_box_ref>", text: "<query>", submit: true }
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Wait ~2 seconds for results to load, then snapshot.
|
|
163
|
+
|
|
164
|
+
### Step 5: Parse results
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
browser action=snapshot profile=chrome targetId=<id> compact=true
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
If no results (empty list or "未找到相关结果"), report "未找到与「<query>」相关的公众号文章" and suggest refining the keyword.
|
|
171
|
+
|
|
172
|
+
Extract from snapshot:
|
|
173
|
+
- **Title**: from `heading` elements (h3)
|
|
174
|
+
- **Source** (公众号名): text after the article summary
|
|
175
|
+
- **Date**: text next to source name
|
|
176
|
+
- **Link**: the `/link?url=...` href (Sogou redirect URL)
|
|
177
|
+
|
|
178
|
+
### Step 6: Pagination (optional)
|
|
179
|
+
|
|
180
|
+
Click page links to get more results. Max 10 pages.
|
|
181
|
+
|
|
182
|
+
### Search Types
|
|
183
|
+
|
|
184
|
+
- **搜文章** (default): `https://weixin.sogou.com/` and search
|
|
185
|
+
- **搜公众号**: navigate to `https://weixin.sogou.com/weixin?type=1&query=<keyword>`
|
|
186
|
+
|
|
187
|
+
### Output format (Search mode)
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
1. **<Title>** — <Source> (<Date>)
|
|
191
|
+
<Link>
|
|
192
|
+
2. **<Title>** — <Source> (<Date>)
|
|
193
|
+
<Link>
|
|
194
|
+
...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Limitations
|
|
200
|
+
|
|
201
|
+
- **Rate limiting**: Space out searches — no more than a few per minute
|
|
202
|
+
- **Captcha**: If triggered, screenshot and ask the user to solve it manually
|
|
203
|
+
- **Max 10 pages** per query (~100 results)
|
|
204
|
+
- **Sogou redirect URLs expire** — extract real `mp.weixin.qq.com` URLs promptly if needed
|
|
205
|
+
|
|
206
|
+
## Anti-Detection Tips
|
|
207
|
+
|
|
208
|
+
- Use natural delays between actions
|
|
209
|
+
- Don't paginate through all 10 pages rapidly
|
|
210
|
+
- If captcha triggers, wait a few minutes before retrying
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# start-chrome.sh — Launch Chrome with CDP enabled for weixin-search skill
|
|
3
|
+
# Usage: ./start-chrome.sh [--port 18801] [--profile /tmp/chrome-cdp]
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
CDP_PORT="${CDP_PORT:-18801}"
|
|
8
|
+
USER_DATA_DIR="${USER_DATA_DIR:-/tmp/chrome-cdp-profile}"
|
|
9
|
+
|
|
10
|
+
# Parse args
|
|
11
|
+
while [[ $# -gt 0 ]]; do
|
|
12
|
+
case "$1" in
|
|
13
|
+
--port) CDP_PORT="$2"; shift 2 ;;
|
|
14
|
+
--profile) USER_DATA_DIR="$2"; shift 2 ;;
|
|
15
|
+
*) echo "Unknown arg: $1"; exit 1 ;;
|
|
16
|
+
esac
|
|
17
|
+
done
|
|
18
|
+
|
|
19
|
+
# Find Chrome binary
|
|
20
|
+
CHROME=""
|
|
21
|
+
for candidate in \
|
|
22
|
+
google-chrome \
|
|
23
|
+
google-chrome-stable \
|
|
24
|
+
chromium \
|
|
25
|
+
chromium-browser \
|
|
26
|
+
/usr/bin/google-chrome \
|
|
27
|
+
/usr/bin/chromium \
|
|
28
|
+
/snap/bin/chromium; do
|
|
29
|
+
if command -v "$candidate" &>/dev/null || [ -x "$candidate" ]; then
|
|
30
|
+
CHROME="$candidate"
|
|
31
|
+
break
|
|
32
|
+
fi
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
if [ -z "$CHROME" ]; then
|
|
36
|
+
echo "❌ Chrome/Chromium not found. Install with:"
|
|
37
|
+
echo " sudo apt install google-chrome-stable # Debian/Ubuntu"
|
|
38
|
+
echo " sudo dnf install google-chrome-stable # Fedora"
|
|
39
|
+
echo " sudo snap install chromium # Snap"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Check if CDP port already in use
|
|
44
|
+
if curl -s --max-time 1 "http://localhost:${CDP_PORT}/json/version" &>/dev/null; then
|
|
45
|
+
echo "✅ Chrome already running on CDP port ${CDP_PORT}"
|
|
46
|
+
echo " Tabs: http://localhost:${CDP_PORT}/json"
|
|
47
|
+
exit 0
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
mkdir -p "$USER_DATA_DIR"
|
|
51
|
+
|
|
52
|
+
echo "🚀 Starting Chrome..."
|
|
53
|
+
echo " Binary: $CHROME"
|
|
54
|
+
echo " CDP port: $CDP_PORT"
|
|
55
|
+
echo " Profile: $USER_DATA_DIR"
|
|
56
|
+
|
|
57
|
+
"$CHROME" \
|
|
58
|
+
--remote-debugging-port="${CDP_PORT}" \
|
|
59
|
+
--user-data-dir="${USER_DATA_DIR}" \
|
|
60
|
+
--no-first-run \
|
|
61
|
+
--no-default-browser-check \
|
|
62
|
+
--disable-background-networking \
|
|
63
|
+
--disable-client-side-phishing-detection \
|
|
64
|
+
--disable-sync \
|
|
65
|
+
&
|
|
66
|
+
|
|
67
|
+
# Wait for Chrome to become ready
|
|
68
|
+
echo -n "⏳ Waiting for CDP..."
|
|
69
|
+
for i in $(seq 1 15); do
|
|
70
|
+
if curl -s --max-time 1 "http://localhost:${CDP_PORT}/json/version" &>/dev/null; then
|
|
71
|
+
echo " ready!"
|
|
72
|
+
echo ""
|
|
73
|
+
echo "✅ Chrome CDP available at http://localhost:${CDP_PORT}"
|
|
74
|
+
echo " Verify tabs: curl http://localhost:${CDP_PORT}/json"
|
|
75
|
+
exit 0
|
|
76
|
+
fi
|
|
77
|
+
echo -n "."
|
|
78
|
+
sleep 1
|
|
79
|
+
done
|
|
80
|
+
|
|
81
|
+
echo ""
|
|
82
|
+
echo "⚠️ Chrome started but CDP not responding after 15s."
|
|
83
|
+
echo " Check manually: curl http://localhost:${CDP_PORT}/json/version"
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"id": "first-party",
|
|
343
343
|
"type": "first-party",
|
|
344
344
|
"package": "@1aboveio/skills",
|
|
345
|
-
"version": "0.
|
|
345
|
+
"version": "0.21.0"
|
|
346
346
|
},
|
|
347
347
|
"contentDigest": "eff6c7b5931bce5b2265a619bccddd371a89df6ce7bc2edc74f11d00060a71dd",
|
|
348
348
|
"digestExcludes": []
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
"id": "first-party",
|
|
356
356
|
"type": "first-party",
|
|
357
357
|
"package": "@1aboveio/skills",
|
|
358
|
-
"version": "0.
|
|
358
|
+
"version": "0.21.0"
|
|
359
359
|
},
|
|
360
360
|
"contentDigest": "d97abeff7bdc5ae2e4be2f631d09dba46d4753ce1e67334793364329af59f066",
|
|
361
361
|
"digestExcludes": []
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
"id": "first-party",
|
|
369
369
|
"type": "first-party",
|
|
370
370
|
"package": "@1aboveio/skills",
|
|
371
|
-
"version": "0.
|
|
371
|
+
"version": "0.21.0"
|
|
372
372
|
},
|
|
373
373
|
"contentDigest": "fe2ec3bae2bfec2dbef19db30ab0272391d7c1d9b6893341a76a9f339adefc57",
|
|
374
374
|
"digestExcludes": []
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
"id": "first-party",
|
|
382
382
|
"type": "first-party",
|
|
383
383
|
"package": "@1aboveio/skills",
|
|
384
|
-
"version": "0.
|
|
384
|
+
"version": "0.21.0"
|
|
385
385
|
},
|
|
386
386
|
"contentDigest": "58b0556228a9271cf9e33727a05fc08a4fdfd29512ec0936b169f0a55d60e6ef",
|
|
387
387
|
"digestExcludes": []
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
"id": "first-party",
|
|
395
395
|
"type": "first-party",
|
|
396
396
|
"package": "@1aboveio/skills",
|
|
397
|
-
"version": "0.
|
|
397
|
+
"version": "0.21.0"
|
|
398
398
|
},
|
|
399
399
|
"contentDigest": "d28dd4d3c4394df0cc7e6b48d0e5daa7d2277701ea459e39fba99acf1d8ff670",
|
|
400
400
|
"digestExcludes": []
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
"id": "first-party",
|
|
408
408
|
"type": "first-party",
|
|
409
409
|
"package": "@1aboveio/skills",
|
|
410
|
-
"version": "0.
|
|
410
|
+
"version": "0.21.0"
|
|
411
411
|
},
|
|
412
412
|
"contentDigest": "56fb5843788c9073b0d5a65ffa72bd7d2fa80dc6a1ff06fb0e19fab513c51502",
|
|
413
413
|
"digestExcludes": []
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
"id": "first-party",
|
|
421
421
|
"type": "first-party",
|
|
422
422
|
"package": "@1aboveio/skills",
|
|
423
|
-
"version": "0.
|
|
423
|
+
"version": "0.21.0"
|
|
424
424
|
},
|
|
425
425
|
"contentDigest": "f048fd00c69f2dc666fc7a3096cfeee6dfba73933bfb69602f3f0e26159798cc",
|
|
426
426
|
"digestExcludes": []
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
"id": "first-party",
|
|
434
434
|
"type": "first-party",
|
|
435
435
|
"package": "@1aboveio/skills",
|
|
436
|
-
"version": "0.
|
|
436
|
+
"version": "0.21.0"
|
|
437
437
|
},
|
|
438
438
|
"contentDigest": "d533684db4483cfc90be2aa7161980b6548057ef18a4b54f0cdbcd53c79dd46d",
|
|
439
439
|
"digestExcludes": []
|
|
@@ -446,15 +446,15 @@
|
|
|
446
446
|
"id": "first-party",
|
|
447
447
|
"type": "first-party",
|
|
448
448
|
"package": "@1aboveio/skills",
|
|
449
|
-
"version": "0.
|
|
449
|
+
"version": "0.21.0"
|
|
450
450
|
},
|
|
451
|
-
"contentDigest": "
|
|
451
|
+
"contentDigest": "e4a907bd6c3eec9fbfb1c03e785c0e58b81fbae6e2d739469ea24be2be748e45",
|
|
452
452
|
"digestExcludes": [
|
|
453
453
|
"coherence/workflow.json"
|
|
454
454
|
]
|
|
455
455
|
}
|
|
456
456
|
],
|
|
457
|
-
"releaseIdentity": "
|
|
457
|
+
"releaseIdentity": "d2ddb6d571f5b326aca54fbb7c11b5417f4ad23d09842ee629f0181138cd6d11",
|
|
458
458
|
"lifecycleAuthority": "native-skills-cli",
|
|
459
459
|
"repairRecipe": {
|
|
460
460
|
"id": "engineering-workflow-dependency-first",
|
|
@@ -512,7 +512,7 @@
|
|
|
512
512
|
"sourceId": "first-party",
|
|
513
513
|
"sourceType": "first-party",
|
|
514
514
|
"package": "@1aboveio/skills",
|
|
515
|
-
"version": "0.
|
|
515
|
+
"version": "0.21.0",
|
|
516
516
|
"installPath": null,
|
|
517
517
|
"members": [
|
|
518
518
|
"harness-runtime",
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
"commands": [
|
|
529
529
|
{
|
|
530
530
|
"transport": "npm",
|
|
531
|
-
"command": "npx @1aboveio/skills@0.
|
|
531
|
+
"command": "npx @1aboveio/skills@0.21.0 install --group engineering-workflow --yes"
|
|
532
532
|
}
|
|
533
533
|
],
|
|
534
534
|
"onFailure": {
|