360 Secure SkillHub
360 安全技能中心

Search Before Ask

该 Skill 要求在回答“我不知道”或向用户追问前先判断信息缺口和问题类型,选择百度、GitHub、微信文章或通用网络等来源并行检索,再综合结果作答;内含检索决策表、GitHub 搜索脚本与限速、透明说明等使用规则。

x1a0q1sx
x1a0q1sx
热度 21.29
最近更新 2026-06-06 11:15:02
分类:搜索依赖:代码执行 / 第三方 API应用场景:研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add search-before-ask
Metadata
name
search-before-ask
description
Before replying 'I don't know' or asking the user for clarification, search the web first: Baidu, GitHub, WeChat articles, and general web. Covers all domains. Use automatically whenever the assistant lacks knowledge on a topic.

Search Before Ask

Golden rule: Don't ask the user what you can search for.

When faced with an unfamiliar topic, tool, technique, or concept, follow this workflow before giving up or asking the user:

Workflow

  1. Identify gaps — What specific information are you missing? Extract key search terms.
  2. Choose sources — Pick the most relevant search sources based on the question type:
    • Chinese content / general knowledge → Baidu (via web_search with search_lang: "zh")
    • Open-source projects / code → GitHub search script
    • Security articles / 安全技术 → WeChat article search
    • English / international → General web_search
  3. Search in parallel — Run multiple searches at once when appropriate
  4. Synthesize — Combine results into a clear answer
  5. Only if nothing found — Then and only then, tell the user what you tried and ask for guidance

Search Tools

1. General Web Search (Baidu-prioritized)

# Baidu search for Chinese results
web_search query="<keywords>" search_lang="zh" count=10

# General web search (Google/Bing fallback)
web_search query="<keywords>" count=10

2. GitHub Search

python3 skills/search-before-ask/scripts/github-search.py "<keywords>" [--type repos|code|issues] [--limit 10]
  • --type repos: search repositories (default)
  • --type code: search code
  • --type issues: search issues
  • --limit: max results, default 10

Requires GITHUB_TOKEN env var for higher rate limits (optional, works without but at lower rate limit).

3. WeChat Article Search

python3 skills/wechat-search/scripts/search.py "<keywords>" [days] [limit]

For security/Chinese tech topics. See wechat-search skill for details.

Decision Matrix

Question type Search first
Security technique / CVE / 渗透 WeChat + Baidu + GitHub
Programming / framework / library GitHub + Baidu + general web
Chinese policy / news / 百科 Baidu + WeChat
Open-source tool usage GitHub (code search) + web
General knowledge / how-to Baidu + web
English docs / international General web_search

Rules

  • Always search before saying "I don't know" — unless the answer is genuinely unknowable
  • Batch searches — run GitHub + Baidu + WeChat in parallel when topic spans multiple domains
  • Be transparent — tell the user "我查了一下..." so they know you searched
  • Respect rate limits — don't spam the same API with repeated identical queries
  • Fallback gracefully — if one source fails, try another; don't block on a single failure

Notes

  • GitHub search API allows 10 req/min unauthenticated, 30 req/min with token
  • WeChat search via doonsec.com; no auth needed
  • Baidu search uses web_search built-in tool with search_lang: "zh"
  • This skill is always on — the assistant should internalize the "search before ask" mindset