Agent skill

Bailian Web Search Routing

by modelstudioai in modelstudioai/cli

Decides whether a web search in Alibaba Cloud Bailian (Model Studio) workflows uses the model's built-in search or the Bailian MCP, based on the connection type.

Apache-2.0Auto-check passedProductivity & Automation

Install Bailian Web Search Routing

skills CLI
$ npx skills add modelstudioai/cli --skill bailian-web-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install modelstudioai/cli bailian-web-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/modelstudioai/cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bailian-web-search .claude/skills/bailian-web-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bailian-web-search
GitHub stars
541
Token cost
~1.8k tokens
SKILL.md length
747 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

Decides whether a web search in Alibaba Cloud Bailian (Model Studio) workflows uses the model's built-in search or the Bailian MCP, based on the connection type.

  • Works in 2 steps: Identify the active model identity → Route by identity
  • Running a web search or looking up recent news from a Bailian CLI workflow
  • SKILL.md covers Routing workflow, Quick examples, Routing reminders and references
  • Reaches token-plan.cn-beijing.maas.aliyuncs.com

What it does

This skill owns one decision: which path a web search takes inside agent-driven bl (Model Studio CLI) workflows. The agent first runs bl config show --output json and treats the connection as Token Plan when the active profile is named token-plan or when the base_url host is a token-plan host under maas.aliyuncs.com, which also catches profiles with custom names.

Token Plan connections go to the model's built-in search, because their keys cannot authorize Bailian MCP search. Even if you ask for bl search web, the agent explains that and uses the built-in path, or asks once about switching profile or key. Every other connection defaults to the MCP path and falls back to built-in search exactly once, only for listed failure types. Before anything runs, the agent must read the shared bailian-protocol skill for consent, version checks and auth. Exact flags are left to the bailian-cli skill or the help output.

When your agent uses it

  • Running a web search or looking up recent news from a Bailian CLI workflow
  • Debugging a Token Plan web search that fails or mixes up authentication
  • Choosing between the model's built-in search and Bailian MCP search

Example prompts

  • “Search the web for the latest news about Alibaba Cloud Model Studio pricing.”
  • “My Token Plan key fails on bl search web, so which search path should I use?”
  • “Look up recent coverage of Qwen releases with whichever Bailian search route fits my profile.”

Requirements

  • The Model Studio CLI (`bl`) with a configured profile
  • The shared bailian-protocol skill, installed with `bl skill init`
  • A Bailian or DashScope API key

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Identify the active model identity
  2. Route by identity

What it can do on your machine

Read from SKILL.md and the folder at commit 8bbbbc7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • token-plan.cn-beijing.maas.aliyuncs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bailian Web Search Routing loads about 1.8k tokens when it runs. Until then it costs about 146 tokens; SKILL.md has 747 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~146
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from modelstudioai/cli at commit 8bbbbc7, republished under its Apache-2.0 licence (© modelstudioai). 747 words, ~1,762 tokens.

Download SKILL.mdSave it as .claude/skills/bailian-web-search/SKILL.md (or your agent's skills folder).
name
bailian-web-search
description
阿里云百炼联网搜索(web search)入口:为联网搜索 / 网页搜索 / 查最新资讯做路径分发。 先识别当前连接身份:Token Plan(profile `token-plan` 或 base_url host 为 `token-plan.<region>.maas.aliyuncs.com`)→ 模型自带搜索 (`bl text chat --api responses --tool '{"type":"web_search"}'`);其他 / 默认 → Bailian MCP(`bl search web`);仅在 MCP 鉴权失败、未开通或传输失败时兜底一次到模型自带搜索。 Token Plan 联网搜索失败、两条路径鉴权混淆的排查也走本技能。 反触发:宿主可完成的 普通问答 / 编程 / 写作 → 不触发;知识库 RAG → bailian-cli (`bl knowledge`);生图/生视频/语音 → bailian-gen;精调/训练 → bailian-finetune; agents.yaml → bailian-managed-agent。 共享协议(consent / 版本预检 / 鉴权 / 错误上报)在 bailian-protocol;官方安装 `bl skill init`。
metadata.version
2.1.0

CRITICAL — Before executing, MUST read the shared protocol in ../bailian-protocol/SKILL.md: Provider selection and consent, Version & updates (pre-flight checklist), Setup & auth, and CLI errors: report an issue. If that protocol file is missing, stop and run bl skill init; do not guess auth/consent.

Scope: model-aware routing for web search inside Agent-driven bl workflows — this skill owns the routing decision only. Command flags / usage / examples: Read skill bailian-cli reference if installed; else bl search web --help / bl text chat --help — do not guess flags.

Install (supported): bl skill init

Token Plan keys do not authorize Bailian MCP search — never route them to bl search web.

Routing workflow

Step 1 — Identify the active model identity

Run (no auth needed):

bash
bl config show --output json

Treat the connection as Token Plan when either condition holds — this mirrors the CLI's own endpoint detection (usesTokenPlanEndpoint), so routing stays consistent with command behavior:

  • config (active profile name) is token-plan, or
  • the hostname of base_url matches token-plan.<region>.maas.aliyuncs.com (e.g. https://token-plan.cn-beijing.maas.aliyuncs.com).

Do not rely on the profile name alone: users can create additional Token Plan profiles under custom names, and only the Base URL host check catches those. Anything else → default identity.

Step 2 — Route by identity
ConditionRouteNotes
Token Plan model identityModel-native pathPreferred — the only path Token Plan keys authorize
Any other model / defaultMCP pathDefault for regular DashScope API keys
MCP path (eligible fail)Model-native path, exactly onceFallback — only for the failure classes below

User override: if the user names a specific path or command, follow it except under Token Plan identity: do not call bl search web even if the user asks for MCP — explain that Token Plan keys cannot authorize Bailian MCP search, then use the model-native path (or ask once whether to switch profile / key).

Model-native path (Token Plan preferred / fallback target)
bash
bl text chat --api responses --tool '{"type":"web_search"}' --message "搜索近期的阿里云新闻"
  • The Responses API enables native web search via the tool definition {"type":"web_search"}.
  • Requires a model with native web search support (Qwen3.7+). Do not hardcode --model: omit it so the CLI uses default_text_model / built-in default; only pass --model when the user named one.
  • Write --message in the user's language; the reply language follows the prompt (see bailian-protocol → Respond in the user's language).
  • Flags / usage: Read skill bailian-cli if installed, else bl text chat --help.
MCP path (default)
bash
bl search web --query "阿里云百炼最新功能"
  • Requires the WebSearch MCP to be activated for the current key; on the not-activated error the CLI appends an activation hint with the marketplace URL — relay it to the user.
  • Flags / usage: Read skill bailian-cli if installed, else bl search web --help.
Show full SKILL.md (327 more words)Show less
Fallback (MCP → model-native, exactly once)

Do not fall back on every non-zero exit. Fall back only when bl search web fails for one of these classes (match stderr / message):

  • auth / permission — key not valid for the MCP service (e.g. Token Plan key misrouted by identity detection),
  • MCP not activated — MCP request failed: 404 with 未开通 / MCP不存在 / MCP_IS_INVALID (CLI may append an activation hint),
  • MCP transport — 405 / Streamable-HTTP unsupported, or clear network / timeout / DNS failures reaching the MCP endpoint.

Do not fall back for: missing --query / USAGE errors, rate limits, content-policy / business errors from a successful MCP session, or empty-but-successful result sets. Report those verbatim and stop (or ask the user); do not burn a Responses call.

Fallback discipline:

  1. Re-issue the same query via the model-native path (omit --model unless the user named one).
  2. If the fallback succeeds, tell the user the MCP path failed and — when the not-activated hint appeared — that activating the WebSearch MCP restores the default path.
  3. If the fallback also fails, stop and report both errors verbatim; follow the issue-reporting flow in bailian-protocol (ask once). Never loop retries.

Quick examples

bash
# Step 1: identify the active model identity
bl config show --output json

# Token Plan identity → model-native web search (no --model unless user named one)
bl text chat --api responses --tool '{"type":"web_search"}' --message "搜索近期的阿里云新闻"

# Default identity → Bailian MCP search
bl search web --query "阿里云百炼最新功能"

# Eligible MCP failure → fall back once (same rule: no hardcoded --model)
bl text chat --api responses --tool '{"type":"web_search"}' --message "阿里云百炼最新功能"

Routing reminders

  • Generic web research the host can do, ordinary Q&A, coding, writing → host-first; do not invoke bl (class 1 in bailian-protocol). Route only when the user names Bailian / DashScope / bl or continues an existing bl workflow (class 4).
  • Knowledge-base / RAG over Bailian corpora → hub skill bailian-cli (bl knowledge), not this skill.
  • Summarize search results in the user's language; on the model-native path the CLI injects no default language — if a fixed language is required, pass --system in that language (do not hardcode 简体中文).
  • Other Bailian workflows (apps / usage / config) → hub skill bailian-cli; media generation → bailian-gen; fine-tuning → bailian-finetune; agents.yaml → bailian-managed-agent. Soft hand-off by skill name: Read if installed, else bl … --help or prompt bl skill init.

references

  • bailian-protocol — shared protocol (install via bl skill init)
  • skill bailian-cli — hub command reference for bl search web / bl text chat (soft hand-off; fallback: --help)

© modelstudioai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/bailian-web-search of modelstudioai/cli.

Open the folder on GitHubat commit 8bbbbc7

Compare with similar skills

Bailian Web Search Routing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bailian Web Search Routing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bailian Web Search Routing this skillmodelstudioai/cli541—~1.8kAutomated safety check: PassApache-2.0
Huge AI Searchwangwingzero/huge-ai-search144—~563Automated safety check: PassMIT
Perplexity Web MCP Bridgejacob-bd/perplexity-web-mcp195—~7.6kAutomated safety check: PassMIT
Mysearchskernelx/MySearch-Proxy159—~3kAutomated safety check: NotesNone
Agent Searchlennney/agent-search-mcp110—~1.9kAutomated safety check: PassApache-2.0
Bright Data MCPbrightdata/skills2641 repos~3.7kAutomated safety check: PassMIT

Similar skills

  • Huge AI Search

    wangwingzero/huge-ai-search

    Searches the live web through Google AI Mode via Huge AI Search (MCP or CLI).

    144 GitHub stars~563 tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Perplexity Web MCP Bridge

    jacob-bd/perplexity-web-mcp

    Searches the web and queries premium AI models through Perplexity's own web interface, tracking quota carefully across quick, Pro and Deep Research tiers.

    195 GitHub stars~7.6k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Mysearch

    skernelx/MySearch-Proxy

    Install, verify, debug, and use MySearch MCP/Skill. An agent skill from skernelx/MySearch-Proxy.

    159 GitHub stars~3k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check: notes
  • Agent Search

    lennney/agent-search-mcp

    Use Agent Search MCP for free-first English and Chinese web search with compact evidence and minimal tool calls.

    110 GitHub stars~1.9k tokensUpdated 16 days ago
    Productivity & AutomationAuto-check passed
  • Bright Data MCP

    brightdata/skills

    Bright Data MCP handles ALL web data operations. An agent skill from brightdata/skills.

    264 GitHub starsUsed in 1 repo~3.7k tokens
    Productivity & AutomationAuto-check passed
  • Skill

    redf0x1/camofox-mcp

    Anti-detection browser automation MCP skill for OpenClaw agents with 47 tools for navigation, interaction, observation, extraction, downloads, profiles, sessions, and stealth web search.

    117 GitHub stars~3.1k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed

More from modelstudioai/cli

All 8 skills in this repo
  • Bailian Media Generation

    modelstudioai/cli

    Chinese-language entry point into Alibaba Cloud Bailian's image, video and speech generation and understanding, routed through separate image, video, speech and vision commands.

    541 GitHub stars~2k tokensUpdated 7 days ago
    Auto-check passed
  • Bailian Shared Protocol

    modelstudioai/cli

    Shared execution protocol for the Alibaba Cloud Bailian bl skill family, covering consent, version checks, authentication and install, issue reporting and output conventions.

    541 GitHub stars~2.9k tokensUpdated 7 days ago
    Auto-check passed
  • Aliyun Model Studio CLI

    modelstudioai/cli

    Hub for the bl CLI of Alibaba Cloud Model Studio (Bailian): app calls, knowledge bases, model catalog, usage and quota, workspaces, MCP market, auth and skill installs.

    541 GitHub stars~4.2k tokensUpdated 7 days ago
    Auto-check passed
  • Drives fine-tuning on Alibaba Cloud Model Studio with the bl CLI: validate and upload data, create a job, watch it, export results and deploy the model.

    541 GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Manages Alibaba Cloud Bailian knowledge bases with the bl command line: create bases, upload documents, deploy search services, fix chunks and handle data center files.

    541 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed
  • Bailian Managed Agent CLI

    modelstudioai/cli

    Manages Alibaba Cloud Bailian managed agents as infrastructure as code with the bl managed-agent command, previewing every change before apply or destroy.

    541 GitHub stars~3.5k tokensUpdated 7 days ago
    Auto-check: notes

Questions about Bailian Web Search Routing

What does Bailian Web Search Routing do?

Decides whether a web search in Alibaba Cloud Bailian (Model Studio) workflows uses the model's built-in search or the Bailian MCP, based on the connection type. This skill owns one decision: which path a web search takes inside agent-driven bl (Model Studio CLI) workflows.com, which also catches profiles with custom names.

When should I use Bailian Web Search Routing?

Bailian Web Search Routing fits situations like: running a web search or looking up recent news from a Bailian CLI workflow; debugging a Token Plan web search that fails or mixes up authentication; choosing between the model's built-in search and Bailian MCP search.

How do I install Bailian Web Search Routing in Claude Code?

Run `npx skills add modelstudioai/cli --skill bailian-web-search -a claude-code`. Or copy the skill folder (skills/bailian-web-search in modelstudioai/cli) into .claude/skills/bailian-web-search in your project. Claude Code loads it when a task matches its description.

How do I install Bailian Web Search Routing in Codex?

Run `npx skills add modelstudioai/cli --skill bailian-web-search -a codex`. Or copy the skill folder (skills/bailian-web-search in modelstudioai/cli) into .agents/skills/bailian-web-search in your project. Codex loads it when a task matches its description.

Can I use Bailian Web Search Routing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modelstudioai/cli --skill bailian-web-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bailian-web-search, .gemini/skills/bailian-web-search, .github/skills/bailian-web-search and .opencode/skills/bailian-web-search in your project.

What does Bailian Web Search Routing need to run?

SKILL.md names no scripts, command-line tools or credentials: Bailian Web Search Routing is instructions for the agent only. Our summary lists: The Model Studio CLI (`bl`) with a configured profile; The shared bailian-protocol skill, installed with `bl skill init`; A Bailian or DashScope API key.

Does Bailian Web Search Routing access the network?

SKILL.md names 1 domain. In commands or code: token-plan.cn-beijing.maas.aliyuncs.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Bailian Web Search Routing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bailian Web Search Routing use?

Bailian Web Search Routing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bailian Web Search Routing use?

About 1.8k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bailian Web Search Routing?

Skills that share tags, products or a category with Bailian Web Search Routing: Huge AI Search (wangwingzero/huge-ai-search, 144 stars), Perplexity Web MCP Bridge (jacob-bd/perplexity-web-mcp, 195 stars), Mysearch (skernelx/MySearch-Proxy, 159 stars) and Agent Search (lennney/agent-search-mcp, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bailian Web Search Routing?

modelstudioai (a GitHub organization) maintains it in modelstudioai/cli, which has 541 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 30, 2026.

Source: modelstudioai/cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.