weknora-shared
Skill này làm gì
Skill này thiết lập truy cập đến máy chủ cơ sở tri thức WeKnora qua công cụ dòng lệnh. Skill dành cho người cần kết nối với WeKnora trước khi quản lý hoặc tìm kiếm nội dung.
Khi nào nên dùng
- ✓Khi bạn cần kết nối công cụ dòng lệnh WeKnora với máy chủ lần đầu tiên.
- ✓Khi bạn muốn quản lý cơ sở tri thức, tài liệu, phiên hoặc agent trong WeKnora.
- ✓Khi bạn cần hiểu đầu ra JSON hoặc mã thoát của công cụ.
Liên kết skill
https://github.com/Tencent/WeKnora/blob/main/cli/skills/weknora-shared/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Giúp tôi đăng nhập vào máy chủ WeKnora của chúng tôi từ dòng lệnh và kiểm tra xem nó có hoạt động không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích cách đặt địa chỉ máy chủ và khóa API, hoặc lưu một hồ sơ có tên. Nó cũng mô tả cách đọc đầu ra có cấu trúc và các mã lỗi của công cụ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
WeKnora CLI — shared base
weknora is the agent-first CLI for a WeKnora RAG server. Every command prints
a JSON envelope and uses a typed exit code, so you branch on machine-readable
output, not prose. Read this skill before any task-specific weknora-* skill.
1. Authenticate (do this first — order matters)
Agents usually skip profiles entirely: set WEKNORA_API_KEY (or
WEKNORA_TOKEN) + WEKNORA_HOST and every command authenticates statelessly and
zero-disk — no profile add / auth login needed. auth token echoes that env
credential; auth status / doctor confirm it. The steps below set up a
persistent named profile instead (interactive / multi-environment use).
Authentication is a two-step sequence. weknora auth login operates on the
active profile, so the profile must exist first:
# 1. register a connection target and make it active
weknora profile add prod --host https://kb.example.com --use
# 2a. API key (agent default — pipe the key on stdin, non-interactive):
echo "$WEKNORA_API_KEY" | weknora auth login --with-token
# 2b. OR email+password (interactive prompt only — no flags; not for agents)
weknora auth login
weknora auth status # verify: who am I, which tenant
- Target a non-active profile for one command with the global
--profile NAME(e.g.weknora --profile staging auth refresh). There is no per-command--name/--hoston auth commands. - Get the raw token for scripting with
WEKNORA_TOKEN=$(weknora auth token)(raw token by default; works with an env credential too;--format jsongives the{token, mode, profile}envelope). weknora auth logoutclears a profile's stored credentials but keeps the profile registered (re-auth later withauth login); useprofile removeto delete the profile entirely.weknora doctorruns 4 health checks (reachability, credential, version, storage).
2. Selecting a knowledge base (--kb)
--kb accepts a name or a UUID (resolved server-side). Resolution order:
--kb flag → WEKNORA_KB_ID env → directory link (weknora link --kb X binds
the cwd) → error. Read/create commands that operate "inside a project" inherit
the link; search * and destructive --all operations always require an
explicit --kb (so an agent never silently hits the wrong corpus).
A KB must have an embedding model bound to be searchable. A freshly created
KB is retrieval_ready:false — uploaded docs stay unindexed and search/chat
return nothing until you bind models. Create it ready in one step
(kb create --embedding-model <m> --chat-model <m>, discover ids with
weknora model list) or bind after the fact
(kb config set <kb> --embedding-model <m> --chat-model <m>). kb status /
kb check report retrieval_ready, and kb create hints the fix when it is
false — so an unconfigured KB is never silently "healthy".
3. Output contract — every command
Default output is --format json: a single envelope.
| Field | Meaning |
|---|---|
ok |
true/false — branch on this first (see batch/wait caveat below) |
data |
success payload (object or array; absent on mutation-only success) |
meta |
count / has_more / dry_run / plan … |
error |
on failure: {type, message, hint?, retry_argv?, retryable?, risk?} |
profile |
active profile name |
error.typeis a stable typed code (e.g.local.kb_not_found,input.invalid_argument,input.confirmation_required,server.error). Branch on it;error.hintusually tells you the next action.--format text= a live human-readable projection.chatandsession askbuffer a bounded answer-event projection into one JSON envelope by default; pass--referencefor indexed citations,--verbosefor execution detail, or--format ndjsonfor raw event lines.session resumeremains an NDJSON streaming command.--jq '<expr>'filters the envelope (e.g.weknora kb list --jq '.data[].id').- Exception:
weknora auth tokenemits the raw token by default (it's a scripting helper); pass--format jsonfor the{token, mode, profile}envelope. - Batch / wait caveat: multi-item commands come in two shapes, but for
both you branch on the exit code, not
ok:doc/chunk/session deletewith several ids → a batch envelope:statusissuccess/partial/error,okistrueonly when every item succeeded (ok:falseon any failure),datais a per-
Câu hỏi thường gặp
Tôi có cần hồ sơ để bắt đầu không?
Không. Đặt khóa API và máy chủ trong biến môi trường cũng hoạt động mà không cần tạo hồ sơ.
Thứ tự các bước có quan trọng không?
Có. Lệnh đăng nhập làm việc trên hồ sơ đang hoạt động, nên hồ sơ đó phải tồn tại trước.
Đầu ra có định dạng gì?
Mỗi lệnh in ra một kết quả JSON, và agent đọc trực tiếp.
Chi tiết
Mô tả gốc của tác giả
Use when driving a WeKnora RAG server through the `weknora` CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora-* skill.
repo: Tencent/WeKnora
Độ phổ biến
- Sao GitHub
- 36k
- Vị trí xếp hạng
- #7586
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
weknora-rag-search
36kHướng dẫn agent của bạn tìm kiếm trong cơ sở tri thức WeKnora, chọn giữa câu trả lời viết sẵn, đoạn văn bản thô, kết quả tài liệu hoặc tra cứu phiên.
agent-browser
36kGiúp agent của bạn dùng một trình duyệt web thật bên trong sandbox để mở trang, nhấp chuột, điền biểu mẫu, chụp ảnh màn hình và trích dữ liệu, kể cả các trang cần đăng nhập.
Skill tương tự
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
notcrawl
394kCho phép agent của bạn tìm trong bản sao đã lưu của workspace Notion, tra cứu trang và database, rồi xuất trang ra file Markdown.
knowledge-entities
394kGiúp agent của bạn xác định người, công ty và dự án, rồi viết trang hồ sơ có nguồn cho họ trong kho Knowledge của bạn.