SuperAPI AI Directory

lx-space

Office & productivity

View repository

Updated 10-16 08:52

About this skill

Knowledge base and team management

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

⚡ When to use this skill?

Entry scenarios:

  • User says "my knowledge base"/"help me open my knowledge base" → Directly use lx space mine
  • User says "what are in my knowledge base"/"help me check the knowledge bases of XX team"
  • User says "find YY knowledge base"/"recent knowledge bases"
  • User says "what is the root node of this knowledge base"

Prohibited in this skill:

  • Do not create pages in this skill: user says "create a page" → Immediately switch to the lx-entry skill
  • Do not edit pages in this skill: user says "edit a page" → Immediately switch to the lx-block skill
  • Do not search content in this skill: user says "search knowledge base content" → Immediately switch to the lx-search skill

⚡ How to choose a command? (decision tree)

识别场景 →
├── "我的知识库"/"帮我打开我的知识库"? → lx space mine(一等公民,最优先)
├── 不知道在哪个团队? → lx team list-teams 或 lx team list-frequent-teams
├── 知道团队,找知识库? → lx space list-spaces --team-id <ID>
├── 知道知识库 ID? → lx space describe-space --space-id <ID>
├── 快速定位最近用的知识库? → lx space list-recently-spaces
└── 需要获取知识库根节点(后续操作条目)? → lx space describe-space → 取 root_entry_id

⚠️ High-risk operations and default preferred paths

"My knowledge base" is a first-class tool:

  • When the user mentions "my knowledge base",Directly use lx space mine, this is the fastest path
  • This command automatically gets (or creates) the user's personal knowledge base, returning space_id and root_entry_id
  • If it returns is_creating: true, it means the knowledge base is being created asynchronously, and you need to use task_id to poll

Getting root_entry_id is key:

  • Subsequent entry operations (creating pages, browsing the directory tree) all need to first use lx space describe-space to get root_entry_id
  • This is the most important prerequisite step

Default preferred paths:

  1. User says "my knowledge base" → directly use lx space mine
  2. User says "recent knowledge bases" → directly use lx space list-recently-spaces, do not go through the full team → space chain
  3. Need to create a page → first get root_entry_id, then switch to the lx-entry skill

Hierarchical relationship:

  • Team → Space → Entry
  • A knowledge base must belong to a team
  • The personal knowledge base also belongs to a special personal team

Available tools

Command Description Reference
lx space mine 🌟 Get my knowledge base (auto-create) space-team.md
lx team list-teams List all teams the user can access space-team.md
lx team list-frequent-teams Get frequently used teams (sorted by frequency) space-team.md
lx team describe-team Get team details space-team.md
lx space list-spaces List knowledge bases under a team space-team.md
lx space describe-space Get knowledge base details (including root_entry_id) space-team.md
lx space list-recently-spaces Get recently accessed knowledge bases space-team.md

🎯 Execution rules

  1. "My knowledge base" takes priority: when the user mentions "my knowledge base", directly use lx space mine, no need to first query teams or lists.
  2. Hierarchical relationship: Team → Space → Entry. A space must belong to a team.
  3. Obtaining root_entry_id is key: subsequent operations on entries (creating pages, browsing the directory tree) all require first using lx space describe-space to obtain root_entry_id。
  4. Fast path takes priority: when the user says "recent space", directly use lx space list-recently-spaces, do not go through the full team → space chain.
  5. Team homepage link:{domain}/t/{team_id}/spaces
  6. Space access link:{domain}/spaces/{space_id}

Typical combined workflow

🌟 Quickly enter my spaces

# 一键获取个人知识库(自动创建)
lx space mine

# 返回 space_id 和 root_entry_id,可直接后续操作
lx entry list-children --parent-id root_entry_xxx

From team to space to document

# 获取团队列表,让用户选择目标团队
lx team list-teams

# 获取该团队下的知识库列表
lx space list-spaces --team-id team_xxx

# 获取知识库 root_entry_id
lx space describe-space --space-id sp_xxx

# 遍历文档目录树(→ lx-entry skill)
lx entry list-children --parent-id root_entry_xxx

Quickly locate the most recently used space

# 获取最近访问的知识库
lx space list-recently-spaces

# 获取详情和 root_entry_id
lx space describe-space --space-id sp_xxx