sn-search-code

用于查找代码示例、开源项目、GitHub Issue、技术问答、开发者讨论、HuggingFace 模型/数据集/Space。

SenseNova-Skills

@sensenova-skills

Install

$ openclaw skills install @sensenova-skills/sn-search-code

sn-search-code - 开发者搜索

凭证配置

API key、token 与 cookie 统一建议写在仓库根目录 .env(参考 .env.example),并由 runtime 或用户在执行前加载为同名环境变量。脚本仍只从环境变量或显式 CLI 参数读取凭证;不要把真实密钥写入 skill payload、报告、日志或提交。

搜索 GitHub、Stack Overflow、Hacker News、HuggingFace 四个开发者核心平台。所有脚本无需 API 密钥 即可使用,但 GitHub --type code 搜索是例外(见下方说明)。

可用脚本

脚本平台用途API 密钥
github_search.pyGitHub仓库、代码、Issue 搜索code 类型必须;其他类型可选(提高限额)
stackoverflow_search.pyStack Overflow技术问答搜索无需
hackernews_search.pyHacker News技术新闻和讨论无需
huggingface_search.pyHuggingFace模型、数据集、Space 搜索可选 HF_TOKEN(提高限额)

依赖

首次运行或脚本提示缺库时,使用本技能的依赖清单安装到当前 Python 环境:

python3 -m pip install -r requirements.txt

不要在脚本内部自动安装依赖。若安装失败、网络不可用或包不可用,停止使用对应脚本并改用网页搜索,说明缺少依赖。

参数说明

github_search.py

python3 scripts/github_search.py <query> [选项]
参数说明默认值
query搜索关键词(必填)
--limit, -n返回结果数量10
--type, -t搜索类型:repositories, code, issues, repo, issuerepositories
--tokenGitHub Token(也可通过 GITHUB_TOKEN 环境变量设置)

注意:--type code 必须提供 token。
GitHub API 对代码搜索接口强制要求认证,未提供 token 会返回 401。
repositoriesissues 类型无需 token,但有 token 可提高速率限制(未认证 10 次/分钟 → 认证 30 次/分钟)。

python3 scripts/github_search.py "machine learning framework" --type repositories --limit 5
python3 scripts/github_search.py "import asyncio" --type code --token ghp_xxx --limit 5
# 或通过环境变量:
GITHUB_TOKEN=ghp_xxx python3 scripts/github_search.py "import asyncio" --type code --limit 5

stackoverflow_search.py

python3 scripts/stackoverflow_search.py <query> [选项]
参数说明默认值
query搜索关键词(必填)
--limit, -n返回结果数量10
--sort排序方式:relevance, votes, creation, activityrelevance
--tagged按标签过滤,多个用分号分隔(如 python;asyncio
--api-keyStack Exchange API 密钥(也可通过 SO_API_KEY 环境变量设置,可选,提高限额)
python3 scripts/stackoverflow_search.py "python async await" --limit 5
python3 scripts/stackoverflow_search.py "rust lifetime" --sort votes --tagged rust --limit 10

huggingface_search.py

python3 scripts/huggingface_search.py <query> [选项]
参数说明默认值
query搜索关键词(必填)
--limit, -n返回结果数量10
--type, -t搜索类型:models, datasets, spaces(及别名 model, dataset, spacemodels
--tokenHuggingFace Token(也可通过 HF_TOKEN 环境变量设置,可选,提高限额)
python3 scripts/huggingface_search.py "bert" --type models --limit 5
python3 scripts/huggingface_search.py "text classification" --type datasets --limit 5
python3 scripts/huggingface_search.py "stable diffusion" --type spaces --limit 5

hackernews_search.py

python3 scripts/hackernews_search.py <query> [选项]
参数说明默认值
query搜索关键词(必填)
--limit, -n返回结果数量10
--sort排序方式:relevance, daterelevance
--tagsHN 标签过滤:story, comment, ask_hn, show_hn
python3 scripts/hackernews_search.py "LLM agents" --limit 10
python3 scripts/hackernews_search.py "GPT-5" --sort date --tags story --limit 5

输出格式

所有脚本输出标准 JSON:

{
  "success": true,
  "query": "...",
  "provider": "github|stackoverflow|hackernews",
  "items": [
    {"title": "...", "url": "...", "snippet": "...", ...}
  ],
  "error": null
}

Top skills in this category

Playwright (Automation + MCP + Scraper)

@ivangdavila

Automates, tests, and debugs browsers with Playwright: locators, auto-waiting, traces, CI runs, and MCP browser control. Use when a test is flaky, times out, or fails only in CI or headless; when a locator matches multiple elements or the wrong one (strict mode violation); when clicks need force, waits become sleeps, or networkidle never settles; for storageState and login setup, request mocking and HAR replay, uploads and downloads, iframes and shadow DOM, popups and dialogs, screenshot diffs that change per machine, trace and report artifacts, sharding a slow suite, device and permission emulation, accessibility checks, driving a real browser through Playwright MCP, extracting data from JS-rendered pages, or porting a Cypress, Puppeteer, or Selenium suite to Playwright. Not for maintaining an existing Cypress or Puppeteer suite (cypress, puppeteer) or for work a plain HTTP request answers (http).

12941k

Scrapling Official Skill

@d4vinci

Scrape web pages using Scrapling with anti-bot bypass (like Cloudflare Turnstile), stealth headless browsing, spiders framework, adaptive scraping, and JavaScript rendering. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Pyth

2814k

Agent Browser Core

@codedao12

OpenClaw skill for the agent-browser CLI (Rust-based with Node.js fallback) enabling AI-friendly web automation with snapshots, refs, and structured commands.

2214k

Polymarket

@mvanhorn

Query and trade on Polymarket prediction markets — check odds, trending markets, search events, view order books, place trades, and manage positions. Now ava...

249.7k

Last30days Skill

@mvanhorn

Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, G...

208.6k