Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent_reach/guides/setup-exa.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mcporter config add exa https://mcp.exa.ai/mcp --scope home
### 3. 验证
```bash
agent-reach doctor | grep "Search"
mcporter call 'exa.web_search_exa(query: "test", numResults: 1)'
mcporter call exa.web_search_exa query="test" numResults=1
```

## 需要用户手动做的步骤
Expand Down
2 changes: 1 addition & 1 deletion agent_reach/guides/setup-reddit.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ rdt read POST_ID
如果你已经配置了 Exa(通过 mcporter),也可以通过 Exa 搜索 Reddit 内容:

```bash
mcporter call 'exa.web_search_exa(query: "python best practices", numResults: 5, includeDomains: ["reddit.com"])'
mcporter call exa.web_search_exa query="site:reddit.com python best practices" numResults=5
```

rdt-cli 是当前推荐方案,无需额外配置即可使用。
2 changes: 1 addition & 1 deletion agent_reach/skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ metadata:

```bash
# Exa 网页搜索
mcporter call 'exa.web_search_exa(query: "query", numResults: 5)'
mcporter call exa.web_search_exa query="query" numResults=5

# 通用网页阅读
curl -s "https://r.jina.ai/URL"
Expand Down
2 changes: 1 addition & 1 deletion agent_reach/skill/SKILL_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ these platforms — do not invent your own approach.**

```bash
# Exa web search
mcporter call 'exa.web_search_exa(query: "query", numResults: 5)'
mcporter call exa.web_search_exa query="query" numResults=5

# Read any web page
curl -s "https://r.jina.ai/URL"
Expand Down
8 changes: 4 additions & 4 deletions agent_reach/skill/references/career.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ LinkedIn。

```bash
# 获取个人资料
mcporter call 'linkedin-scraper.get_person_profile(linkedin_url: "https://linkedin.com/in/username")'
mcporter call linkedin-scraper.get_person_profile linkedin_url="https://linkedin.com/in/username"

# 搜索人才
mcporter call 'linkedin-scraper.search_people(keyword: "AI engineer", limit: 10)'
mcporter call linkedin-scraper.search_people keyword="AI engineer" limit=10

# 获取公司资料
mcporter call 'linkedin-scraper.get_company_profile(linkedin_url: "https://linkedin.com/company/xxx")'
mcporter call linkedin-scraper.get_company_profile linkedin_url="https://linkedin.com/company/xxx"

# 搜索职位
mcporter call 'linkedin-scraper.search_jobs(keyword: "software engineer", limit: 10)'
mcporter call linkedin-scraper.search_jobs keyword="software engineer" limit=10
```

> **需要登录**: LinkedIn scraper 需要有效的登录态。
Expand Down
4 changes: 2 additions & 2 deletions agent_reach/skill/references/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Exa AI 搜索引擎。
高质量 AI 搜索引擎,擅长技术和代码搜索。

```bash
mcporter call 'exa.web_search_exa(query: "query", numResults: 5)'
mcporter call 'exa.get_code_context_exa(query: "code question", tokensNum: 3000)'
mcporter call exa.web_search_exa query="query" numResults=5
mcporter call exa.get_code_context_exa query="code question" tokensNum=3000
```

### 使用场景
Expand Down
6 changes: 3 additions & 3 deletions agent_reach/skill/references/social.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ opencli xiaohongshu user USER_ID -f yaml
agent-reach configure xhs-cookies "导出的 Cookie Header String"

# 只读检查当前状态
mcporter call 'xiaohongshu.check_login_status()' --timeout 120000
mcporter call xiaohongshu.check_login_status --timeout 120000

# 搜索
mcporter call 'xiaohongshu.search_feeds(keyword: "query")' --timeout 120000
mcporter call xiaohongshu.search_feeds keyword="query" --timeout 120000

# 笔记详情+评论(feed_id 和 xsec_token 从搜索结果取)
mcporter call 'xiaohongshu.get_feed_detail(feed_id: "...", xsec_token: "...")' --timeout 120000
mcporter call xiaohongshu.get_feed_detail feed_id="..." xsec_token="..." --timeout 120000
```

> 首次调用会自动下载约 150MB 无头浏览器,务必带 `--timeout 120000`。
Expand Down
6 changes: 3 additions & 3 deletions agent_reach/skill/references/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ curl -s "https://r.jina.ai/https://example.com/article"

```bash
# 读取网页内容 (Markdown 格式)
mcporter call 'web-reader.webReader(url: "https://example.com")'
mcporter call web-reader.webReader url="https://example.com"

# 保留图片
mcporter call 'web-reader.webReader(url: "https://example.com", retain_images: true)'
mcporter call web-reader.webReader url="https://example.com" retain_images=true

# 纯文本格式
mcporter call 'web-reader.webReader(url: "https://example.com", return_format: "text")'
mcporter call web-reader.webReader url="https://example.com" return_format=text
```

**适用场景**: 需要更精确控制输出格式时使用。
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ After installation, use upstream tools directly. See SKILL.md for the full comma
| Instagram | `opencli` | `opencli instagram user nasa -f yaml` |
| GitHub | `gh` | `gh search repos "query"` |
| Web | `curl` + Jina | `curl -s "https://r.jina.ai/URL"` |
| Exa Search | `mcporter` | `mcporter call 'exa.web_search_exa(...)'` |
| Exa Search | `mcporter` | `mcporter call exa.web_search_exa query="..." numResults=5` |
| 小红书 | `opencli`(服务器 `mcporter`) | `opencli xiaohongshu search "query" -f yaml` |
| 小宇宙播客 | `transcribe.sh` | `bash ~/.agent-reach/tools/xiaoyuzhou/transcribe.sh <URL>` |
| LinkedIn | `mcporter` | `mcporter call 'linkedin.get_person_profile(...)'` |
| LinkedIn | `mcporter` | `mcporter call linkedin.get_person_profile linkedin_url="..."` |
| RSS | `feedparser` | `python3 -c "import feedparser; ..."` |

> 多后端平台以 `agent-reach doctor --json` 的 `active_backend` 为准。
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ proxychains twitter search "test" -n 1
twitter-cli 不可用时,可以直接用 Exa 搜索 Twitter 内容:

```bash
mcporter call 'exa.web_search_exa(query: "site:x.com 搜索词", numResults: 5)'
mcporter call exa.web_search_exa query="site:x.com 搜索词" numResults=5
```

### 方案 4:检查认证
Expand Down
18 changes: 18 additions & 0 deletions tests/test_skill_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

import importlib.resources
import os
import re
import tempfile
import unittest
from pathlib import Path
from unittest.mock import patch

from agent_reach.cli import _install_skill, _uninstall_skill
Expand All @@ -23,6 +25,22 @@ def test_skill_resources_include_both_locales(self):
self.assertTrue(default_skill.strip())
self.assertTrue(english_skill.strip())

def test_mcporter_examples_use_shell_safe_named_arguments(self):
"""Packaged guidance must avoid function-call syntax that breaks in PowerShell."""
repo_root = Path(__file__).resolve().parents[1]
markdown_files = [
*(repo_root / "agent_reach" / "skill").rglob("*.md"),
*(repo_root / "agent_reach" / "guides").rglob("*.md"),
repo_root / "docs" / "install.md",
repo_root / "docs" / "troubleshooting.md",
]
function_call = re.compile(r"mcporter call\s+['\"][^'\"\r\n]+\(")

for markdown_file in markdown_files:
with self.subTest(markdown_file=markdown_file):
content = markdown_file.read_text(encoding="utf-8")
self.assertNotRegex(content, function_call)

def test_install_skill_creates_skill_md(self):
"""_install_skill should create SKILL.md in the first available skill dir."""
with tempfile.TemporaryDirectory() as tmpdir:
Expand Down