feat: Agent Reach 作为 Skill 安装
- 新增 agent-reach/SKILL.md — skills.sh 兼容格式 安装: npx skills add Panniantong/Agent-Reach@agent-reach - agent-reach install 自动检测 OpenClaw / Claude Code / 通用 Agent 并在对应 skill 目录注册 SKILL.md - SKILL.md 打包进 pip 包(agent_reach/skill/SKILL.md) - README 中英文都加了 Skill 安装方式
This commit is contained in:
@@ -98,6 +98,18 @@ agent-reach install --env=auto
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>以 Skill 形式安装(Claude Code / OpenClaw / 任何支持 Skills 的 Agent)</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx skills add Panniantong/Agent-Reach@agent-reach
|
||||||
|
```
|
||||||
|
|
||||||
|
安装后,Agent 会在 Skill 列表中看到 `agent-reach`,自动知道如何使用所有搜索和阅读能力。
|
||||||
|
|
||||||
|
> 如果通过 `agent-reach install` 安装,Skill 会自动注册,无需额外操作。
|
||||||
|
</details>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 装好就能用
|
## 装好就能用
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
name: agent-reach
|
||||||
|
description: >
|
||||||
|
Give your AI agent eyes to see the entire internet. Read and search across
|
||||||
|
Twitter/X, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu, RSS, and any web page
|
||||||
|
— all from a single CLI. Use when: (1) reading content from URLs (tweets, Reddit posts,
|
||||||
|
articles, videos), (2) searching across platforms (web, Twitter, Reddit, GitHub, YouTube,
|
||||||
|
Bilibili, XiaoHongShu), (3) checking channel health or updating Agent Reach.
|
||||||
|
Triggers: "search Twitter/Reddit/YouTube", "read this URL", "find posts about",
|
||||||
|
"搜索", "读取", "查一下", "看看这个链接".
|
||||||
|
---
|
||||||
|
|
||||||
|
# Agent Reach
|
||||||
|
|
||||||
|
Read and search the internet across 9+ platforms via unified CLI.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### Read any URL
|
||||||
|
```bash
|
||||||
|
agent-reach read <url>
|
||||||
|
agent-reach read <url> --json # structured output
|
||||||
|
```
|
||||||
|
Handles: tweets, Reddit posts, articles, YouTube (transcripts), GitHub repos, etc.
|
||||||
|
|
||||||
|
### Search
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach search "query" # web search (Exa)
|
||||||
|
agent-reach search-twitter "query" # Twitter/X
|
||||||
|
agent-reach search-reddit "query" # Reddit (--sub <subreddit>)
|
||||||
|
agent-reach search-github "query" # GitHub (--lang <language>)
|
||||||
|
agent-reach search-youtube "query" # YouTube
|
||||||
|
agent-reach search-bilibili "query" # Bilibili (B站)
|
||||||
|
agent-reach search-xhs "query" # XiaoHongShu (小红书)
|
||||||
|
```
|
||||||
|
|
||||||
|
All search commands support `-n <count>` for number of results.
|
||||||
|
|
||||||
|
### Management
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach doctor # channel status overview
|
||||||
|
agent-reach watch # quick health + update check (for scheduled tasks)
|
||||||
|
agent-reach check-update # check for new versions
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure channels
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach configure twitter-cookies "auth_token=xxx; ct0=yyy"
|
||||||
|
agent-reach configure proxy http://user:pass@ip:port
|
||||||
|
agent-reach configure --from-browser chrome # auto-extract cookies
|
||||||
|
```
|
||||||
|
|
||||||
|
## Channel Status Tiers
|
||||||
|
|
||||||
|
- **Tier 0 (zero config):** Web, YouTube, RSS, Twitter (read-only via Jina)
|
||||||
|
- **Tier 1 (free setup):** Exa web search (mcporter required)
|
||||||
|
- **Tier 2 (user config):** Twitter search (cookie), Reddit full (proxy), GitHub (token), Bilibili (proxy), XiaoHongShu (MCP)
|
||||||
|
|
||||||
|
Run `agent-reach doctor` to see which channels are active.
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
- Always try `agent-reach read <url>` first for any URL — it auto-detects the platform
|
||||||
|
- For Twitter cookies, recommend the user install [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) Chrome extension
|
||||||
|
- Reddit and Bilibili block server IPs — suggest a residential proxy (~$1/month) if on a server
|
||||||
|
- If a channel breaks, run `agent-reach doctor` to diagnose
|
||||||
@@ -234,6 +234,10 @@ def _cmd_install(args):
|
|||||||
print()
|
print()
|
||||||
print(format_report(results))
|
print(format_report(results))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
# ── Install agent skill ──
|
||||||
|
_install_skill()
|
||||||
|
|
||||||
print(f"✅ Installation complete! {ok}/{total} channels active.")
|
print(f"✅ Installation complete! {ok}/{total} channels active.")
|
||||||
|
|
||||||
if ok < total:
|
if ok < total:
|
||||||
@@ -241,6 +245,47 @@ def _cmd_install(args):
|
|||||||
print("🤖 Some channels are not active yet. If you're an AI Agent, try to fix them yourself — then run `agent-reach doctor` again.")
|
print("🤖 Some channels are not active yet. If you're an AI Agent, try to fix them yourself — then run `agent-reach doctor` again.")
|
||||||
|
|
||||||
|
|
||||||
|
def _install_skill():
|
||||||
|
"""Install Agent Reach as an agent skill (OpenClaw / Claude Code)."""
|
||||||
|
import os
|
||||||
|
import importlib.resources
|
||||||
|
|
||||||
|
# Determine skill install path
|
||||||
|
skill_dirs = [
|
||||||
|
os.path.expanduser("~/.openclaw/skills"), # OpenClaw
|
||||||
|
os.path.expanduser("~/.claude/skills"), # Claude Code (if exists)
|
||||||
|
os.path.expanduser("~/.agents/skills"), # Generic agents
|
||||||
|
]
|
||||||
|
|
||||||
|
installed = False
|
||||||
|
for skill_dir in skill_dirs:
|
||||||
|
if os.path.isdir(skill_dir):
|
||||||
|
target = os.path.join(skill_dir, "agent-reach")
|
||||||
|
try:
|
||||||
|
os.makedirs(target, exist_ok=True)
|
||||||
|
# Read SKILL.md from package data
|
||||||
|
skill_md = importlib.resources.files("agent_reach").joinpath("skill", "SKILL.md").read_text()
|
||||||
|
with open(os.path.join(target, "SKILL.md"), "w") as f:
|
||||||
|
f.write(skill_md)
|
||||||
|
platform_name = "OpenClaw" if "openclaw" in skill_dir else "Claude Code" if "claude" in skill_dir else "Agent"
|
||||||
|
print(f"🧩 Skill installed for {platform_name}: {target}")
|
||||||
|
installed = True
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if not installed:
|
||||||
|
# No known skill directory found — create for OpenClaw by default
|
||||||
|
target = os.path.expanduser("~/.openclaw/skills/agent-reach")
|
||||||
|
try:
|
||||||
|
os.makedirs(target, exist_ok=True)
|
||||||
|
skill_md = importlib.resources.files("agent_reach").joinpath("skill", "SKILL.md").read_text()
|
||||||
|
with open(os.path.join(target, "SKILL.md"), "w") as f:
|
||||||
|
f.write(skill_md)
|
||||||
|
print(f"🧩 Skill installed: {target}")
|
||||||
|
except Exception:
|
||||||
|
print(" ⬜ Could not install agent skill (optional)")
|
||||||
|
|
||||||
|
|
||||||
def _install_system_deps():
|
def _install_system_deps():
|
||||||
"""Install system-level dependencies: gh CLI, Node.js (for mcporter)."""
|
"""Install system-level dependencies: gh CLI, Node.js (for mcporter)."""
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
name: agent-reach
|
||||||
|
description: >
|
||||||
|
Give your AI agent eyes to see the entire internet. Read and search across
|
||||||
|
Twitter/X, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu, RSS, and any web page
|
||||||
|
— all from a single CLI. Use when: (1) reading content from URLs (tweets, Reddit posts,
|
||||||
|
articles, videos), (2) searching across platforms (web, Twitter, Reddit, GitHub, YouTube,
|
||||||
|
Bilibili, XiaoHongShu), (3) checking channel health or updating Agent Reach.
|
||||||
|
Triggers: "search Twitter/Reddit/YouTube", "read this URL", "find posts about",
|
||||||
|
"搜索", "读取", "查一下", "看看这个链接".
|
||||||
|
---
|
||||||
|
|
||||||
|
# Agent Reach
|
||||||
|
|
||||||
|
Read and search the internet across 9+ platforms via unified CLI.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### Read any URL
|
||||||
|
```bash
|
||||||
|
agent-reach read <url>
|
||||||
|
agent-reach read <url> --json # structured output
|
||||||
|
```
|
||||||
|
Handles: tweets, Reddit posts, articles, YouTube (transcripts), GitHub repos, etc.
|
||||||
|
|
||||||
|
### Search
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach search "query" # web search (Exa)
|
||||||
|
agent-reach search-twitter "query" # Twitter/X
|
||||||
|
agent-reach search-reddit "query" # Reddit (--sub <subreddit>)
|
||||||
|
agent-reach search-github "query" # GitHub (--lang <language>)
|
||||||
|
agent-reach search-youtube "query" # YouTube
|
||||||
|
agent-reach search-bilibili "query" # Bilibili (B站)
|
||||||
|
agent-reach search-xhs "query" # XiaoHongShu (小红书)
|
||||||
|
```
|
||||||
|
|
||||||
|
All search commands support `-n <count>` for number of results.
|
||||||
|
|
||||||
|
### Management
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach doctor # channel status overview
|
||||||
|
agent-reach watch # quick health + update check (for scheduled tasks)
|
||||||
|
agent-reach check-update # check for new versions
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure channels
|
||||||
|
|
||||||
|
```bash
|
||||||
|
agent-reach configure twitter-cookies "auth_token=xxx; ct0=yyy"
|
||||||
|
agent-reach configure proxy http://user:pass@ip:port
|
||||||
|
agent-reach configure --from-browser chrome # auto-extract cookies
|
||||||
|
```
|
||||||
|
|
||||||
|
## Channel Status Tiers
|
||||||
|
|
||||||
|
- **Tier 0 (zero config):** Web, YouTube, RSS, Twitter (read-only via Jina)
|
||||||
|
- **Tier 1 (free setup):** Exa web search (mcporter required)
|
||||||
|
- **Tier 2 (user config):** Twitter search (cookie), Reddit full (proxy), GitHub (token), Bilibili (proxy), XiaoHongShu (MCP)
|
||||||
|
|
||||||
|
Run `agent-reach doctor` to see which channels are active.
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
- Always try `agent-reach read <url>` first for any URL — it auto-detects the platform
|
||||||
|
- For Twitter cookies, recommend the user install [Cookie-Editor](https://chromewebstore.google.com/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) Chrome extension
|
||||||
|
- Reddit and Bilibili block server IPs — suggest a residential proxy (~$1/month) if on a server
|
||||||
|
- If a channel breaks, run `agent-reach doctor` to diagnose
|
||||||
@@ -88,6 +88,18 @@ agent-reach install --env=auto
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Install as a Skill (Claude Code / OpenClaw / any agent with Skills support)</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx skills add Panniantong/Agent-Reach@agent-reach
|
||||||
|
```
|
||||||
|
|
||||||
|
Once installed, your Agent will see `agent-reach` in its skill list and automatically know how to use all search and read capabilities.
|
||||||
|
|
||||||
|
> If you install via `agent-reach install`, the skill is registered automatically — no extra steps needed.
|
||||||
|
</details>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Works Out of the Box
|
## Works Out of the Box
|
||||||
|
|||||||
@@ -51,3 +51,4 @@ packages = ["agent_reach"]
|
|||||||
|
|
||||||
[tool.hatch.build.targets.wheel.force-include]
|
[tool.hatch.build.targets.wheel.force-include]
|
||||||
"agent_reach/guides" = "agent_reach/guides"
|
"agent_reach/guides" = "agent_reach/guides"
|
||||||
|
"agent_reach/skill" = "agent_reach/skill"
|
||||||
|
|||||||
Reference in New Issue
Block a user