SuperAPI AI Directory

lexiang-knowledge-base

General & other

View repository

Updated 10-16 05:00

About this skill

Lexiang Knowledge Base MCP Skill

When the user mentions "Lexiang」「knowledge base」「personal knowledge base」「my knowledge base」「lexiang", or provides lexiangla.com link, or gives space_id、entry_id、/spaces/、/pages/ and other Lexiang identifiers, read this Skill.


⛔ MANDATORY RULES — must be followed

  1. Encountering 401 / connection dropped: immediately stop retrying, read references/setup.md; built-in connector platforms (WorkBuddy/QClaw, etc.) guide re-authorization, other platforms guide renewal
  2. Write operations: must be based on a target explicitly provided by the user (URL/ID/name confirmation),forbiddento traverse or guess the target on your own
  3. Link generation: must use whoami() returned by company.company_domain as the domain,forbiddento use the MCP endpoint to concatenate user links
  4. company_from: cannot be concatenated as a subdomain, can only be used as ?company_from=xxx query parameter
  5. Mandatory retrieval: when the user message simultaneously contains platform words such as "Lexiang/knowledge base" + content words such as "document/paper/article/content/material/notes/previously written/last time/style",must first call search_kb_search or search_kb_embedding_search to obtain the actual content, and must not analyze out of thin air or directly generate an answer
  6. Large-batch protection: when the number of files/entries > 20,must execute in batches(each batch ≤ 20); before the operation, inform the user of the quantity and strategy; do not submit all at once and cause the token limit to be exceeded, see references/files.md

🔗 Link generation rules (globally applicable)

When returning links after all operations are completed, uniformly follow:

company.company_domain type link format example
includes a third-level domain (such as csig.lexiangla.com) {domain}/pages/{entry_id} https://csig.lexiangla.com/pages/abc
top-level domain (such as lexiangla.com) {domain}/pages/{entry_id}?company_from={company_from} https://lexiangla.com/pages/abc?company_from=csig

{company_from} retrieval priority:

  1. mcp.json url in the company_from parameter in the field
  2. if none, use whoami().company.code

🛡️ Write safety red lines (globally applicable)

  • 🚫 Forbidden to traverse the team/knowledge base list and then choose a write target on your own
  • 🚫 Forbidden to decide to write based on a name "looking suitable"
  • 🚫 Forbidden to execute a write without confirmation

For complete safety rules (conditions allowing writes, tool classification), see references/base.md


📋 Intent routing table

According to user intent, Read the corresponding reference file:

User intent Read file Typical trigger words
Configure Lexiang / 401 error / Token expired references/setup.md "Configure Lexiang" "token expired" "cannot connect" "401"
Search / find / read / browse references/search.md "find it" "search" "read this page" "open link"
Create document / write / save / import references/writer.md "Write to Lexiang", "Create document", "Save to knowledge base", "Save to my knowledge base", "Save to personal knowledge base", "Import"
Edit existing page / Block operations references/blocks.md "Modify this page", "Add a title", "Delete this section", "In /pages/xxx..."
Upload/download files (PDF/Word/images, etc.) references/files.md "Send a PDF", "Upload file", "Download this file"
Import Tencent Meeting references/connectors.md "Import the meeting recording", "Import meeting recording"
Data model / URL rules / complete security rules references/base.md Referenced internally by the above modules

⚠️ Easily confused scenarios

Scenario Correct module Description
User provides /pages/xxx link + requests "add content/modify" references/blocks.md OperationExisting page
User provides /spaces/xxx link + requests "write/create" references/writer.md Under knowledge baseCreate new document
User provides /pages/xxx link + only requests "read/summarize" references/search.md Read-onlyOperation
Upload PDF/Word/image references/files.md Binary file, not a text document
Create Markdown text document references/writer.md Text content, not binary
"There is a document about X in Lexiang" references/search.md → search first Must search first, cannot answer directly
"Look at the writing style of XX in Lexiang" references/search.md → read first Must read the content first, cannot analyze out of thin air
"Analyze the content about X in my knowledge base" references/search.md → search first Must search first, cannot generate out of thin air

⚠️ Cross-module tasks

When multiple files need to be read at the same time, read them in process order:

  • Write after search: first references/search.md → then references/writer.md
  • Edit after read: first references/search.md → then references/blocks.md
  • Record after upload: first references/files.md → then references/writer.md
  • Generate content + save: user requests "help me write an article about X and save it to the knowledge base/personal knowledge base" → generate the content first, then read references/writer.md to perform the save; if no target is specified, write to the personal knowledge base by default (see "write to personal knowledge base when no knowledge base is specified" in writer.md)

🔑 Credential check

Before performing any Lexiang operation, confirm that MCP is connected. Check via whoami() :

MCP Tool: whoami
 → 成功:返回用户信息,继续执行
 → 401:读取 references/setup.md,引导续期(点续期按钮,无需重新配置)
 → 连接失败:读取 references/setup.md,引导完成初始配置

📚 Reference file index

Load on demand: according to the intent routing table, only Read the corresponding file, no need to load all at once.

File Responsibility
references/setup.md Token configuration, renewal, WorkBuddy OAuth, troubleshooting
references/search.md Keyword/semantic search, content reading, directory browsing
references/writer.md Create new documents, import content, WeChat official account favorites
references/blocks.md Block-level add, delete, modify, and move for existing pages
references/files.md Binary file upload/download (three-step process)
references/connectors.md Tencent Meeting recording import
references/base.md Data model, complete security rules, Block structure, tool discovery
references/index.md Complete index + recommended loading order by scenario

Supplementary reference documentation

Documentation Description
references/block-schema.md Complete field definitions for Block types
references/mcp-examples.md Complex Block structure examples
references/markdown-to-block.md Markdown to Block guide
references/block-update.md Batch Block update methods
references/content-reorganize.md Document structure reorganization plan
references/folder-sync.md Folder synchronization plan
references/markdown-import.md Markdown import detailed explanation
references/common-errors.md Common error troubleshooting (high-frequency error quick reference table)
references/doc-templates.md Document types and outline templates
references/theme-config.md Theme color configuration
references/skill-maintenance.md Skill maintenance guide

Skill version: 2.1.0