agentsclimarketplace

Qmd extended

Skill aAAaqwq/AGI-Super-Team/skills/qmd-extended

Extended QMD knowledge base with multi-backend embedding (Google AI Studio / Ollama / local). Use when managing QMD embeddings, switching backends, testing embedding quality, re-indexing, or troubleshooting QMD vector search. Triggers on "qmd embed", "embedding backend", "切换embedding", "embedding测试", "re-embed", "知识库embedding", "qmd扩展". For general QMD queries and knowledge retrieval, use memory-router skill instead.From its SKILL.md

Install
npx -y skills add aAAaqwq/AGI-Super-Team --skill qmd-extended

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

3.1 KB, 801 tokens by cl100k_base, as published. Nobody here has run it

QMD Extended — Multi-Backend Embedding Manager

Architecture

QMD's llm.js is patched (v2) to support three embedding backends:

QMD_EMBED_BACKEND=google|ollama|local

google  → Google AI Studio gemini-embedding-001 (3072-dim, free)
ollama  → Mac Studio Ollama qwen3-embedding:8b (4096-dim, LAN)
local   → node-llama-cpp embeddinggemma-300M (768-dim, CPU)

Auto-detect priority: google → ollama → local

Quick Commands

Test current backend

bash ~/clawd/skills/qmd-extended/scripts/embed-test.sh        # test current
bash ~/clawd/skills/qmd-extended/scripts/embed-test.sh all     # test all backends
bash ~/clawd/skills/qmd-extended/scripts/embed-test.sh google "自定义文本"

Switch backend

bash ~/clawd/skills/qmd-extended/scripts/embed-switch.sh google   # switch to Google
bash ~/clawd/skills/qmd-extended/scripts/embed-switch.sh ollama   # switch to Ollama
# ⚠️ After switching: qmd embed -f  (required — dimensions change)

Check status

bash ~/clawd/skills/qmd-extended/scripts/embed-status.sh

Environment Variables

VarDefaultPurpose
QMD_EMBED_BACKENDautoForce backend: google/ollama/local
QMD_GOOGLE_EMBED_KEYvia passGoogle API key (auto-read from pass store)
QMD_GOOGLE_EMBED_MODELgemini-embedding-001Google model name
QMD_OLLAMA_EMBED_URLOllama host (e.g. http://100.65.110.126:11434)
QMD_OLLAMA_EMBED_MODELqwen3-embedding:8bOllama model name

Patch Location

/home/aa/.npm-global/lib/node_modules/@tobilu/qmd/dist/llm.js
Backup: llm.js.bak (original pre-patch)

⚠️ npm update @tobilu/qmd will overwrite the patch. Re-apply from backup or re-run the patch script.

Backend Details

See references/backends.md for API docs, dimensions, rate limits, and comparison table.

Re-Embedding Workflow

When switching backends or after fresh install:

# 1. Switch backend
export QMD_EMBED_BACKEND=google

# 2. Force re-embed all collections
qmd embed -f

# 3. Verify
qmd status
bash ~/clawd/skills/qmd-extended/scripts/embed-status.sh

Troubleshooting

IssueFix
qmd embed hangs at compileFirst run builds node-llama-cpp. Wait ~10 min. Only affects local backend.
Google embed error: 429Rate limit hit. Wait 60s or reduce batch size.
Ollama embed: offlineMac Studio sleeping. Wake it or switch to google.
Dimension mismatch in searchBackend changed without re-embed. Run qmd embed -f.
pass: api/google-ai-studio not foundSet QMD_GOOGLE_EMBED_KEY env var directly instead.

What ships with it: 4 files

8.3 KB alongside SKILL.md, 3 of them executable

references/

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.