agent-reach-wrapper · diff

v1.0 to v1.0

71 added, 79 removed. Audit A to A.

---
name: agent-reach-wrapper
- description: Thin wrapper around Panniantong Agent-Reach so Grok can read YouTube, X, Reddit, Bilibili, Xiaohongshu, RSS, GitHub public pages, and Exa search without paying platform APIs. Triggered by Agent-Reach, agent reach, YouTube transcript, Reddit without API, Bilibili, Xiaohongshu, give the agent eyes, or live social read. Does not replace VintedListingAnalyzer, web-scraper, or humanization-stealth-browsing. Never stores cookies in the skill repo. Run doctor before any live call. Default install is check-only — never use --system unless the user explicitly allows machine writes.
+ description: Thin wrapper around Panniantong/Agent-Reach for live web, YouTube transcripts, RSS, GitHub, Bilibili, Exa search, and optional login-state platforms (X, Reddit, Facebook, Instagram, Xiaohongshu, LinkedIn). Triggered by agent-reach, reach this URL, YouTube transcript, Reddit thread, Bilibili, Xiaohongshu, RSS feed, or give the agent eyes. Does not replace VintedListingAnalyzer or humanization-stealth-browsing. Doctor-first. Never run install --system unless the user explicitly allows machine changes. Cookies stay local and never go in the skill repo.
+ license: MIT
metadata:
- type: integration
version: "1.0"
- source: https://github.com/Panniantong/Agent-Reach
+ type: integration
+ upstream: https://github.com/Panniantong/Agent-Reach
owner: Stijnman
created: "2026-08-28"
- license: MIT
---
# Agent Reach Wrapper
- ## Overview
-
- Route live-internet reads through Agent-Reach when Grok built-in tools are the wrong surface (YouTube transcripts, Bilibili, Xiaohongshu, Reddit after anonymous APIs died, X search that needs login-state, RSS). Keep Vinted work on Stijnman/VintedListingAnalyzer + humanization-stealth-browsing.
+ Capability layer over [Panniantong/Agent-Reach](https://github.com/Panniantong/Agent-Reach). Routes a request to the current working backend. You do not scrape those platforms yourself when the CLI is healthy.
- Upstream — https://github.com/Panniantong/Agent-Reach (MIT). This skill does not vendor their code.
+ ## Do not
- ## Hard rules
+ - Do not treat this as a Vinted tool. Vinted stays `VintedListingAnalyzer` + `humanization-stealth-browsing`.
+ - Do not run `agent-reach install --system` unless the user explicitly says to modify the machine.
+ - Do not put cookies, tokens, or `~/.agent-reach/config.yaml` into git, Drive, or this skill directory.
+ - Do not use a main personal account for X / Reddit / IG / Xiaohongshu cookie backends. Throwaways only.
+ - Do not `pip install agent-reach` from PyPI. That package is not this project. Install from the GitHub repo only.
- 1. Run `agent-reach doctor` (or `doctor --json`) before the first live call in a session.
- 2. Never run `agent-reach install --system` unless the user explicitly authorizes writes to the machine.
- 3. Never commit cookies, tokens, or `~/.agent-reach/config.yaml` into skills, Drive dumps, or GitHub.
- 4. Login-state platforms (X, Reddit, Facebook, Instagram, Xiaohongshu) use throwaway accounts only.
- 5. Do not install the PyPI package named `agent-reach`. That is a different project. Install from the GitHub repo.
- 6. Do not use this skill for Vinted listing analysis. Use VintedListingAnalyzer.
+ ## Routing
- ## When to use vs when not to
+ | Need | Platform key | Default path | Fallback if CLI missing |
+ |---|---|---|---|
+ | Read a page | web | Jina Reader via Reach | `browse_page` or `https://r.jina.ai/URL` |
+ | YouTube talk track | youtube | yt-dlp via Reach | `browse_page` on the watch page; no fake transcript |
+ | RSS / Atom | rss | feedparser via Reach | fetch + parse if available |
+ | Public GitHub | github | `gh` via Reach | connected GitHub tools |
+ | Bilibili | bilibili | bili-cli | say blocked; do not invent |
+ | Semantic web search | search | Exa via mcporter | `web_search` |
+ | X / Twitter | twitter | twitter-cli / OpenCLI | built-in `x_keyword_search` / `x_semantic_search` first |
+ | Reddit | reddit | OpenCLI / rdt-cli | `browse_page` / search; anonymous API is dead |
+ | Facebook / Instagram / Xiaohongshu / LinkedIn deep | facebook / instagram / xhs / linkedin | OpenCLI or MCP after user login | public page via Jina / browse only |
- Use this skill
- - YouTube "what does this video say"
- - Bilibili search or video detail
- - Reddit / X / Xiaohongshu after built-in search is empty or blocked
- - RSS ingest
- - Exa-style semantic web search via their MCP path
- - Public GitHub when `gh` is already the selected backend
+ ## Workflow
- Do not use this skill
- - Vinted profiles, listings, stealth HTML download
- - Anything already covered cleanly by Grok `web_search`, `x_keyword_search`, or connected GitHub tools
- - Account creation, mass scraping, or multi-account farming
+ 1. Decide platform from the user request. If mixed (e.g. "summarize this YT and search X"), split into parallel calls.
+ 2. Probe CLI
+ ```bash
+ command -v agent-reach && agent-reach doctor
+ ```
+ If `doctor` fails or the binary is missing, use the fallback column. Do not pretend Reach is installed.
+ 3. If doctor shows the channel red, report the active/failed backend and the repair hint. Do not silently switch to a banned-account cookie flow.
+ 4. Execute the smallest Reach command that answers the question. Prefer read/search over "configure".
+ 5. Return clean structured output
+ - source URL
+ - platform + backend used (or fallback name)
+ - extracted text / items
+ - what failed
+ 6. Retry with exp backoff + jitter on transient failures — 10s / 30s / 60s ±25%. After 3 failures, stop and report.
- ## Install posture (sandbox-aware)
+ ## Install plan (local machine, user must allow)
- Default, safe
+ Safe check only
```bash
- # inspect only
- agent-reach doctor
+ pip install "git+https://github.com/Panniantong/Agent-Reach.git"
agent-reach install --env=auto --dry-run
+ agent-reach doctor
```
- If the binary is missing, tell the user the one-liner they can paste to their coding agent. Do not silently `--system` from this sandbox.
+ System writes (skills dir, MCP, packages) only after explicit user OK
- ```
- Install Agent Reach from https://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/install.md
- Do not use --system unless I say so.
+ ```bash
+ agent-reach install --env=auto --system
+ agent-reach doctor
```
- OpenClaw note — exec must be enabled (`tools.profile = coding`) or the CLI never runs.
+ Update
- Retry failed doctor/install probes with exp backoff 10s / 30s / 60s ±25%. Report which backend `doctor` selected. Do not invent a healthy backend.
+ ```
+ 帮我更新 Agent Reach:https://raw.githubusercontent.com/Panniantong/Agent-Reach/main/docs/update.md
+ ```
- ## Routing table
+ OpenClaw users need `tools.profile = coding` or the CLI cannot exec.
- | Need | Preferred backend (current upstream default) | Fallback inside this ecosystem |
- |---|---|---|
- | Any public URL as readable text | Jina Reader via Agent-Reach web channel | `browse_page` / `web-scraper` |
- | YouTube transcript + search | yt-dlp | `video-analyzer` if a local file exists |
- | Bilibili | bili-cli | say blocked, do not resurrect yt-dlp for Bilibili |
- | RSS / Atom | feedparser | `browse_page` on the feed URL |
- | Semantic web search | Exa via mcporter | `web_search` + `deep-search-enabler` |
- | Public GitHub | `gh` | connected `github___*` tools |
- | X / Twitter beyond a single public post | twitter-cli then OpenCLI | `x_keyword_search` first |
- | Reddit | OpenCLI then rdt-cli (login required) | `web_search` site-reddit.com |
- | Xiaohongshu | OpenCLI then xiaohongshu-mcp | do not steal browser cookies |
- | LinkedIn public page | Jina Reader | `web-scraper` + stealth skill |
- | Vinted | OUT OF SCOPE | VintedListingAnalyzer + stealth downloader |
+ ## Cookie / login channels
- Exact commands live in `references/commands.md`.
+ When the user asks to "configure Twitter/Reddit/XHS"
- ## Execution pattern
+ 1. Warn about ban risk. Demand a dedicated account.
+ 2. Let the user export cookies via Cookie-Editor themselves. Do not steal browser cookies.
+ 3. Store only in `~/.agent-reach/config.yaml` (mode 600) on their machine.
+ 4. Re-run `agent-reach doctor` and show which backend became active.
- 1. Classify the request to a channel in the table.
- 2. If a first-party Grok tool already solves it cheaper, use that and stop.
- 3. If Agent-Reach is the right channel, check `command -v agent-reach`.
- 4. If missing — report install status, do not fake results.
- 5. If present — `agent-reach doctor --json` (or plain doctor). Record `active_backend`.
- 6. Call the upstream tool the doctor selected. Do not wrap output in extra fiction.
- 7. On 403 / 412 / empty — try the documented fallback backend once, then stop and say which path died.
- 8. Never persist credentials. Quote only public content.
+ This sandbox usually cannot complete those login steps. Say so and fall back.
- ## Output format
+ ## Output contract
```
- Channel: youtube
- Backend: yt-dlp
- Doctor: ok
- Result: <transcript or structured extract>
- Notes: <ban risk / missing login / next action>
+ platform: youtube
+ backend: yt-dlp | fallback-browse
+ url: ...
+ status: ok | degraded | failed
+ notes: ...
+ content:
+ ...
```
- ## Security
-
- Cookies belong only in `~/.agent-reach/config.yaml` mode 600 on the user's machine. This skill must not extract Chrome cookies, must not dump env tokens, and must not echo `TWITTER_AUTH_TOKEN` / `TWITTER_CT0`.
-
- If the user asks to "just grab my logged-in session", refuse the grab and point them at Cookie-Editor export + throwaway account.
-
- ## Persistence
-
- After any edit to this skill, push
- - GitHub `Stijnman/grok-custom-skills` path `.grok/skills/agent-reach-wrapper/`
- - Drive folder `1jEivRtcNo-x9sd--2l1qe1bVox-TSnYK` when a pack is built
+ ## Sibling skills
- Do not upload `~/.agent-reach/`.
+ - Vinted listings / seller scoring → VintedListingAnalyzer + humanization-stealth-browsing
+ - Generic page scrape / image download → web-scraper
+ - Live X posts already in Grok tools → use those before Reach Twitter
+ - Connected GitHub → use `search_connected_tools` / `call_connected_tool` for Stijnman repos