From rag-service
Interactive knowledge base curation loop — reviews pending items (reports, unverified chunks, failed queries, negative feedback) and walks through fixes one by one. Use when asked to "maintain the knowledge base", "review pending items", "run a curation round", "process reports", "clean up the KB", or any request to improve KB quality. This is the main entry point for the expand → organize → reflect cycle, and requires admin scope.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rag-service:zeabur-rag-curateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Interactive curation loop for the knowledge base. This skill orchestrates other skills (`triage`, `inspect`, `edit`, `learn`, `search`) plus a few inline admin API calls to walk the user through fixing pending issues one by one.
Interactive curation loop for the knowledge base. This skill orchestrates other skills (triage, inspect, edit, learn, search) plus a few inline admin API calls to walk the user through fixing pending issues one by one.
This is NOT an API wrapper. It's a workflow guide. Follow the steps below as a conversation with the user.
Base URL: $ZEABUR_RAG_URL
Auth: Authorization: Bearer $RAG_API_KEY — admin scope required
zeabur-rag-triage to get the pending items list.chunk_id is null (type=missing) → skip to step 3.zeabur-rag-inspect on the referenced chunk. Show the chunk content + report detail side by side.| Classification | Action |
|---|---|
| Fixable — content is wrong or outdated | Draft fix with user → zeabur-rag-edit → close report |
| Wholly wrong — chunk should not exist | Reject chunk (see Inline commands) → close report |
| Duplicate of another chunk | Reject this one → point user to the correct chunk → close report |
| Type=missing — knowledge gap | Draft new content with user → zeabur-rag-learn → close report |
| Report is invalid — chunk is fine | Close report directly (no chunk changes needed) |
zeabur-rag-inspect on the chunk. Show full content, tags, text_content.| Classification | Action |
|---|---|
| Correct and well-formed | Verify (see Inline commands) |
| Correct but needs polish | zeabur-rag-edit to fix → then verify |
| Low quality or wrong | Reject (see Inline commands) |
zeabur-rag-search with the original query to confirm the gap.| Classification | Action |
|---|---|
| True gap — no relevant chunk exists | Draft new content with user → zeabur-rag-learn |
| Chunk exists but ranks poorly | zeabur-rag-inspect the chunk → zeabur-rag-edit to improve text_content |
| Irrelevant or spam query | Dismiss — no action, move to next item |
zeabur-rag-inspect on each chunk in top_chunk_ids. If top_chunk_ids is null or empty, skip to step 3.| Classification | Action |
|---|---|
| Chunk content is wrong | zeabur-rag-edit to fix |
| Chunk should not have been returned | Reject chunk (see Inline commands) |
| Answer was right but user query was ambiguous | Dismiss — no action |
| No chunks to inspect (null top_chunk_ids) | Treat as knowledge gap → zeabur-rag-learn |
A chunk was ingested from a source file that has no frontmatter. Its ID is a
temporary path-hash (MAN-tmp-*), and it is excluded from some reorg-safety
guarantees. The fix is to add frontmatter to the source file in the origin
repo (e.g. zebra-manual), then re-ingest.
zeabur-rag-inspect to show the chunk's url and content.url field points at the repo-relative
path, e.g. docs/customer-support/xxx.md).zebra-manual, that
tool lives in zebra-manual/scripts/ and walks through one file at a time
with LLM-drafted frontmatter + human confirmation.bun run pipeline --adapter zebra-manual --input /path/to/zebra-manual/docstmp-* chunks
and insert the new permanent-ID chunks in place. No manual DB surgery.| Classification | Action |
|---|---|
| File is real and worth keeping | User adds frontmatter in origin repo → re-ingest |
| File is not worth keeping in KB | Reject the chunk (see Inline commands); user also deletes the source file |
| File is a duplicate of another chunk | Reject this chunk; point user at the canonical one |
These actions don't have dedicated skills. Execute them as direct API calls:
curl -s -X POST "$ZEABUR_RAG_URL/api/admin/learned/<id>/verify" \
-H "Authorization: Bearer $RAG_API_KEY"
Returns {"success": true}. The chunk now ranks at full weight in search (unverified learned chunks are downranked to ×0.7 score).
curl -s -X DELETE "$ZEABUR_RAG_URL/api/admin/learned/<id>" \
-H "Authorization: Bearer $RAG_API_KEY"
Returns {"success": true}. Sets status='rejected', excluded from all search.
curl -s -X PATCH "$ZEABUR_RAG_URL/api/admin/chunks/<id>" \
-H "Authorization: Bearer $RAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"rejected"}'
Returns {"success": true, ...}. For docs/forum chunks, this rejection survives pipeline rebuilds.
curl -s -X POST "$ZEABUR_RAG_URL/api/admin/reports/<id>/close" \
-H "Authorization: Bearer $RAG_API_KEY"
Returns {"success": true}. Closing an already-closed report is treated as success.
text_content to construct a new one. The edit endpoint returns 400 if you change title/question/answer without providing text_content.npx claudepluginhub zeabur/rag-service --plugin rag-serviceUpgrades existing Knowledge Base to latest Claude plugin practices: Obsidian graph-view links, structured 'When to Load' format, CLAUDE.md preamble, index schema, frontmatter health. Safe, preview-first, re-runnable.
Processes external resources like articles, blogs, and papers into stored knowledge via quality evaluation, curation, tidying, and routing to storage or codebase application. Use for capturing session knowledge into memory structures.
Use when compiling raw sources into the wiki, querying the knowledge base, running health checks or lint on the wiki, evolving or improving wiki coverage, or when user says 'compile', 'update the wiki', 'query', 'lint', 'health check', 'evolve', 'what's missing', or 'suggest improvements'. Also triggers on questions that should be answered from the knowledge base.