SuperAPI AI Directory

lx-url-route

Office & productivity

View repository

Updated 10-16 09:30

About this skill

URL routing

Prerequisite: Requires the lx CLI to be configured and logged in.

⚡ When to use this skill?

Entry scenarios

  • The user only sent a link and did not explicitly say whether they want to view, edit, import, or comment
  • Need to first determine whether this is a page, knowledge base, team, or official account article link

Prohibited in this skill

  • Do not route scenarios with a clear intent: the user has already said they want to "edit the page"/"view comments"/"create a page" → switch directly to the corresponding skill
  • Do not show internal MCP domains to the user: when generating user-visible links, only use lexiang.tencent.com

⚡ How to choose a command? (Decision tree)

收到 URL →
├── /pages/{entry_id}        → 默认 `lx entry describe-ai-parse-content`
├── /spaces/{space_id}       → `lx space describe-space`
├── /t/{team_id}/spaces      → `lx space list-spaces`
├── mp.weixin.qq.com/*       → 先补齐目标位置,再 `lx file create-hyperlink`
├── lexiang.tencent.com/ai/claw → Token 配置引导,不调用命令
├── mcp.lexiang-app.com/*    → 内部端点,不展示给用户
└── 其他                     → 告知不是可处理的乐享链接

⚠️ High-risk operations and default preferred paths

Default behavior:

  • The user only sent a page link and did not say what to do → default to viewing the content, use lx entry describe-ai-parse-content
  • The user only sent a knowledge base link → first use lx space describe-space to get the root_entry_id, then decide whether to switch to lx-entry
  • The user only sent a team link → first list the knowledge bases under that team, do not directly guess the target knowledge base

Information that must be completed:

  • Before importing a WeChat official account article, you must first confirm space_id and parent_entry_id
  • If the user wants to edit page content, view comments, or create a page, do not stay in this skill; immediately switch to the downstream skill

URL types and default actions

URL pattern Extracted fields Default action Destination when user intent is clear
/pages/{entry_id} entry_id lx entry describe-ai-parse-content --entry-id <ID> View details → lx entry describe-entry; edit content → lx-block; view comments → lx-connector
/spaces/{space_id} space_id lx space describe-space --space-id <ID> Browse directory / create page → lx-space → lx-entry
/t/{team_id}/spaces team_id lx space list-spaces --team-id <ID> After selecting a knowledge base, continue with lx-space / lx-entry
mp.weixin.qq.com/* Original URL First complete the target location, then lx file create-hyperlink --url ... --space-id ... --parent-entry-id ... After import is complete, if the page needs to be edited, then switch to lx-entry / lx-block
lexiang.tencent.com/ai/claw None Prompt the user to go to that page to obtain the Token Do not invoke a command
mcp.lexiang-app.com/* None Internal service endpoint Do not show to the user

🎯 Execution rules

  1. First determine whether routing is needed: use this skill only when "the user provided a URL, but the intent is unclear".
  2. Page links default to viewing content: the default action is describe-ai-parse-content, not describe-entry。
  3. Importing a WeChat official account article must first complete the target location: when space_id / parent_entry_id is missing, you cannot import directly.
  4. Do not expose internal domains:mcp.lexiang-app.com is only used for internal service identification and must not be echoed back to the user.
  5. Exit once routing is complete: after obtaining the target ID or determining the downstream command, you should switch to the corresponding skill and not continue performing complex operations within this skill.