--- name: unicli-smart-search description: > Route search queries to the best platform via unicli. Use when searching across websites, social media, tech forums, news, finance, shopping, or academic sources. version: 1.1.0 triggers: - "search" - "find information" - "trending" - "hot topics" - "unicli search" allowed-tools: [Bash] protocol: 2.0 --- ## When to Use Searching for information, checking trending topics, or gathering data across platforms. Commands return a v2 AgentEnvelope; pass `-f json` when you need JSON for parsing. ## Pre-Check ```bash unicli search "" # Discover from live registry first unicli list --site # Verify subcommands exist unicli describe # Check args, auth, invocation, and recovery unicli list --personalized # Discover signed-in user data operations ``` ## Search Routing | Category | Command | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Web** | `unicli duckduckgo search `, `unicli yahoo search `, `unicli brave search `, `unicli baidu search ` | | **AI Infra** | `unicli ai profiles`, `unicli ai landscape`, `unicli ai pulse`, `unicli ai search `, `unicli ai sources`, `unicli ai read `, covering first-party labs, hardware, runtimes, model hubs, papers, code, talks, and communities | | **Tech** | `unicli hackernews top`, `unicli hackernews search `, `unicli stackoverflow hot`, `unicli lobsters hot`, `unicli v2ex hot`, `unicli linux-do hot` | | **Social** | `unicli twitter search `, `unicli twitter trending`, `unicli reddit search `, `unicli reddit hot`, `unicli weibo hot`, `unicli zhihu hot`, `unicli tieba hot`, `unicli threads hot` | | **Finance** | `unicli xueqiu hot`, `unicli xueqiu hot-stock`, `unicli binance hot`, `unicli eastmoney hot`, `unicli bloomberg markets`, `unicli yahoo-finance search ` | | **Academic** | `unicli arxiv search `, `unicli arxiv paper ` | | **Shopping** | `unicli amazon search `, `unicli jd search `, `unicli taobao search `, `unicli smzdm hot`, `unicli xianyu search ` | | **Video** | `unicli bilibili hot`, `unicli bilibili search `, `unicli youtube search `, `unicli tiktok search ` | | **News** | `unicli toutiao hot`, `unicli 36kr hot`, `unicli bbc hot`, `unicli cnn top`, `unicli nytimes top`, `unicli reuters top` | | **Dev** | `unicli github-trending daily`, `unicli producthunt hot`, `unicli docker-hub search ` | | **Reading** | `unicli douban search `, `unicli douban top250`, `unicli weread ranking`, `unicli wikipedia search ` | | **Jobs** | `unicli boss search `, `unicli linkedin search `, `unicli maimai search ` | ## Multi-Source Pattern For comprehensive research, query 2-3 complementary sources. ```bash # Tech topic unicli hackernews search "LLM agents" --limit 10 unicli reddit search "LLM agents" --limit 10 unicli arxiv search "LLM agents" --limit 5 # Current AI infrastructure evidence with normalized provenance unicli ai profiles -f json unicli ai landscape --profile world-models -f json unicli ai pulse --profile inference --window week -f json unicli ai pulse --profile world-models --window day --include-auth -f json unicli ai search "CUDA ROCm CANN release notes" --vendors nvidia,amd,huawei-ascend -f json unicli ai search "interactive generative environment" --profile world-models --sort latest -f json unicli ai search "distributed inference" --repo vllm-project/vllm --kind community -f json unicli ai search "ROCm" --sources hf --kind model -f json unicli ai search "inference runtime" --sort latest --since 2026-01-01 -f json unicli ai read "https://rocm.docs.amd.com/en/latest/about/release-notes.html" -f json # Chinese trending unicli weibo hot --limit 20 unicli zhihu hot --limit 20 # Market research unicli producthunt hot --limit 10 unicli hackernews search "startup" --limit 10 ``` ## Personalized Search Restrict discovery to signed-in user data when the request names the user's feed, saved library, network, account, or activity. ```bash unicli search "my recommendations on Zhihu" --personalized unicli search "my saved Instagram posts" --personalized unicli list --site xiaohongshu --personalized unicli describe xiaohongshu saved ``` Run the returned `auth_setup` command when `auth` is `required`, then retry the exact `usage` command from the result. ## Output Handling ```bash unicli hackernews top --limit 5 -f json | jq '.data[].title' unicli xueqiu hot -f json | jq '.data[] | {name, change}' ``` ## Fallback - Exit 77 -> execute the envelope's exact `next_actions`; executable-native auth such as GitHub uses `gh auth login` / `gh auth status`, while cookie/browser strategies use `unicli auth import --domain ` or `unicli browser cookies --profile-id ` - Exit 69 -> `unicli browser doctor --json`, `unicli browser doctor --repair`, then retry - Exit 66 from `ai search` -> follow `next_actions`; broaden the query/source scope, or remove `--since` only when the envelope says candidates lacked verifiable timestamps - With `--since`, dated source fields and explicitly prefixed search-index dates carry `timestamp_origin`. Undated records are excluded. `ai read ` refreshes the canonical candidate - Partial `unicli ai search` failure -> successful sources remain in `data`; `partial_failure_count` is on every row and `data[0].source_errors` carries each exact retry command once - Adapter failure -> classify `error.code`; auth/network/rate-limit errors stay at their owning boundary, while selector/schema/endpoint drift is edited from `adapter_path` and then verified with `unicli repair ` - Site down -> switch to alternative from routing table ## Budget Use 1-2 primary sources and 1 supplementary source per question. Query each site once.