[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D3A8MNA00TM9GN90T5AP3Z":3,"skill-same:01M6D3A8MNA00TM9GN90T5AP3Z":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6D3A8MNA00TM9GN90T5AP3Z","enable-semantic-search",null,"Enable local AI-powered semantic search with smart collection discovery","hemory\u002Famp-legacy-do-not-use","hemory","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21179881?v=4","01M6D31HFJ391DN8N0JP8AQGFE","Hemory Phifer","01M6D31HKXVTEN27AT6R4PP2ZJ",3,"MIT","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fenable-semantic-search\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30],"semantic search","search","enable semantic search","collection","discovery","local ai","local","2026-11-10 10:12:30",false,"---\nname: enable-semantic-search\ndescription: Enable local AI-powered semantic search with smart collection discovery\n---\n\n# Enable Semantic Search\n\nSet up local AI-powered semantic search for your vault. This is a **concierge experience** — it analyzes your vault, discovers what collections make sense, and creates a tailored search setup.\n\n## What You're Enabling\n\nSemantic search finds content by **meaning**, not just keywords:\n- Search \"product-led growth\" → finds notes saying \"PLG\", \"self-serve motion\", \"freemium adoption\"\n- Search \"customer churn\" → finds notes about \"retention problems\", \"users leaving\", \"cancellation patterns\"\n\nYour skills (`\u002Fdaily-plan`, `\u002Fmeeting-prep`, `\u002Ftriage`, etc.) automatically use semantic search when available, finding more relevant context than keyword matching alone.\n\n## Pre-Flight Checks\n\nRun these checks before proceeding:\n\n```bash\n# Check if qmd is already installed\nwhich qmd\n\n# Check if Bun is available (required)\nwhich bun\n\n# macOS only: Check SQLite via Homebrew\nbrew list sqlite 2>\u002Fdev\u002Fnull && echo \"SQLite OK\" || echo \"Need: brew install sqlite\"\n\n# Check available disk space (need ~2.5GB)\ndf -h ~ | tail -1\n```\n\n**If qmd is already installed**, run `qmd status` to check existing setup. If collections already exist, skip to the **Collection Health Check** section at the bottom.\n\n## Step 1: Explain What We're Installing\n\nPresent this to the user:\n\n```\n═══════════════════════════════════════════════════════════════════════\n                    SEMANTIC SEARCH FOR YOUR VAULT\n═══════════════════════════════════════════════════════════════════════\n\nWhat is this?\n─────────────\nRight now, finding notes requires knowing the exact words used.\nSearch \"product-led growth\" — won't find notes saying \"PLG\" or\n\"self-serve motion\".\n\nSemantic search understands meaning, not just keywords. It finds\nconceptually related content even when terminology differs.\n\n\nHow does it work?\n─────────────────\nYour notes get converted to \"embeddings\" — mathematical\nrepresentations of meaning. When you search, your query becomes\nan embedding too. The system finds notes whose meaning is close\nto your query's meaning.\n\nThink of it like: instead of matching letters, we're matching ideas.\n\n\nWhat gets installed?\n────────────────────\nThree small AI models run locally on your machine:\n\n  MODEL                      PURPOSE                    SIZE\n  ─────────────────────────────────────────────────────────────\n  EmbeddingGemma-300M        Converts text to meaning   ~300MB\n                             vectors. The core\n                             \"understanding\" model.\n\n  Qwen3-Reranker-0.6b       Re-orders results by       ~640MB\n                             true relevance. Improves\n                             result quality.\n\n  QMD-Query-Expansion-1.7B   Expands your search to     ~1.1GB\n                             include related terms.\n                             \"PLG\" → also searches\n                             \"product-led\", \"freemium\"\n\n  Total: ~2GB one-time download\n\n\nPrivacy & Security\n──────────────────\n- Everything runs locally — your notes never leave your machine\n- No API keys required\n- No cloud services\n- Models downloaded from HuggingFace (open source)\n- Index stored in ~\u002F.cache\u002Fqmd\u002F (not in your vault)\n\n\nWhat changes in your workflow?\n──────────────────────────────\nEnabling semantic search silently upgrades these skills:\n\n  \u002Fdaily-plan    — Enriches meeting prep with thematically\n                   related past discussions\n\n  \u002Fmeeting-prep  — Discovers past discussions related by\n                   meaning, not just name matching\n\n  \u002Ftriage        — Matches inbox items to goals by meaning,\n                   catches semantic duplicates\n\n  Person Lookup  — Finds \"the VP of Sales mentioned...\" even\n                   without a name\n\n  Search & Recall — All vault searches use hybrid retrieval\n                    (BM25 + vectors + LLM reranking)\n\n\nSystem Requirements\n───────────────────\n  ~2.5GB disk space (for models + index)\n  macOS: Homebrew SQLite required (brew install sqlite)\n  Bun runtime (will install if missing)\n```\n\n## Step 2: Get User Consent\n\nAsk: **\"Ready to enable semantic search? This will download ~2GB of models. [Y\u002Fn]\"**\n\nIf no, exit gracefully: \"No problem. Run `\u002Fenable-semantic-search` anytime.\"\n\n## Step 3: Install Dependencies\n\n```bash\n# Install Bun if missing\nif ! command -v bun &> \u002Fdev\u002Fnull; then\n    echo \"Installing Bun runtime...\"\n    curl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | bash\nfi\n\n# macOS: Install SQLite if missing\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n    if ! brew list sqlite &> \u002Fdev\u002Fnull; then\n        echo \"Installing SQLite via Homebrew...\"\n        brew install sqlite\n    fi\nfi\n\n# Install qmd globally\necho \"Installing qmd...\"\nbun install -g github:tobi\u002Fqmd\n```\n\n## Step 4: Download Models\n\n```bash\necho \"Downloading AI models (~2GB)...\"\necho \"This happens once. Future searches are instant.\"\necho \"\"\necho \"Models downloading:\"\necho \"  EmbeddingGemma-300M  — Converts text to meaning vectors\"\necho \"  Qwen3-Reranker-0.6b  — Improves result relevance\"\necho \"  QMD-Query-Expansion   — Expands searches with related terms\"\necho \"\"\n\n# Trigger model download with a simple embed operation\ncd \"$VAULT_PATH\" && qmd embed --help 2>\u002Fdev\u002Fnull || true\n```\n\n## Step 5: Smart Collection Discovery (THE CONCIERGE)\n\nThis is what makes Amp's semantic search better than generic indexing. Instead of dumping everything into one blob, we analyze the vault and create purpose-built collections.\n\n### Run the Vault Scanner\n\nExecute the vault scanner script to discover collection candidates:\n\n```bash\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\"\n```\n\nThe scanner returns a JSON structure like:\n\n```json\n{\n  \"candidates\": [\n    {\n      \"name\": \"people\",\n      \"path\": \"05-Areas\u002FPeople\",\n      \"glob\": \"**\u002F*.md\",\n      \"fileCount\": 23,\n      \"context\": \"Person pages with meeting history, relationship notes, action items, and role context\",\n      \"benefit\": \"Person lookup finds references by role\u002Ftitle, not just name\",\n      \"example\": \"Search 'VP of Sales' finds the person even if their name isn't mentioned\"\n    },\n    {\n      \"name\": \"accounts\",\n      \"path\": \"05-Areas\u002FCompanies\",\n      \"glob\": \"**\u002F*.md\",\n      \"fileCount\": 8,\n      \"context\": \"Company and account pages with deal status, relationship notes, and interaction history\",\n      \"benefit\": \"Deal prep pulls account-specific context without inbox noise\",\n      \"example\": \"Search 'renewal risk' finds accounts with churn signals\"\n    }\n  ],\n  \"skipped\": [\n    {\n      \"name\": \"career\",\n      \"reason\": \"Folder not set up (run \u002Fcareer-setup)\",\n      \"path\": \"05-Areas\u002FCareer\"\n    }\n  ],\n  \"totalFiles\": 156,\n  \"totalCandidates\": 6\n}\n```\n\n### Present Discovery Results\n\nFormat the scanner output as a concierge recommendation:\n\n```\nI scanned your vault and found candidates for [N] smart collections:\n\n  COLLECTION     FILES   WHAT IT ENABLES\n  ─────────────────────────────────────────────────────────────────\n  people         23      Person lookup finds references by\n                         role\u002Ftitle, not just name. Search\n                         \"VP of Sales\" finds the person even\n                         if their name isn't mentioned.\n\n  meetings       47      \"What was discussed about X?\" searches\n                         meeting notes specifically, not your\n                         entire vault.\n\n  tasks          1       Smart task matching for triage. Catches\n                         semantic duplicates like \"Review metrics\"\n                         ≈ \"Check quarterly numbers\".\n\n  projects       8       Project health pulls related docs\n                         without inbox noise.\n\n  goals          1       Goal alignment finds thematically\n                         related work across your vault.\n\n  priorities     1       Weekly planning discovers patterns\n                         in past priority choices.\n\n  Skipped (not enough content yet):\n  - accounts  — No company pages found (create some first)\n  - content   — No content files yet\n  - career    — Career folder not set up (run \u002Fcareer-setup)\n\n  Create all [N] collections? [Y]\n  Pick specific ones?         [P]\n  Just create a basic index?  [B]\n```\n\n### Handle User Choice\n\n**If [Y] - Create all:**\nCreate every candidate collection using `qmd collection add` with context.\n\n**If [P] - Pick specific:**\nPresent each candidate individually with a Y\u002FN toggle. Create only selected ones.\n\n**If [B] - Basic index:**\nCreate a single \"vault\" collection that indexes everything. This works but misses the precision of targeted collections.\n\n### Create Collections\n\nFor each accepted candidate, run:\n\n```bash\n# Create the collection\nqmd collection add \"$VAULT_PATH\u002F\u003Cpath>\" --name \u003Cname> --mask \"\u003Cglob>\"\n\n# Add semantic context (helps the reranker understand what's in the collection)\nqmd context add \u003Cname> \"\u003Ccontext description>\"\n```\n\n**Collection definitions (full list):**\n\n| Name | Path | Glob | Context | Min Files |\n|------|------|------|---------|-----------|\n| `people` | `05-Areas\u002FPeople` | `**\u002F*.md` | Person pages with meeting history, relationship notes, action items, and role context | 3 |\n| `accounts` | `05-Areas\u002FCompanies` | `**\u002F*.md` | Company and account pages with deal status, relationship notes, and interaction history | 1 |\n| `accounts` (alt) | `05-Areas\u002FRelationships\u002FKey_Accounts` | `**\u002F*.md` | Key Account pages with deal status, MEDDPICC, and engagement history | 1 |\n| `meetings` | `00-Inbox\u002FMeetings` | `**\u002F*.md` | Meeting notes with attendees, key discussion points, decisions made, and action items | 5 |\n| `tasks` | `03-Tasks` | `**\u002F*.md` | Task backlog with priorities (P0-P3), pillar alignment, status tracking, and linked goals | 1 |\n| `projects` | `04-Projects` | `**\u002F*.md` | Active project tracking with status, stakeholders, timelines, and related decisions | 1 |\n| `goals` | `01-Quarter_Goals` | `**\u002F*.md` | Quarterly strategic goals with success criteria, milestones, and progress tracking | 1 |\n| `priorities` | `02-Week_Priorities` | `**\u002F*.md` | Weekly priorities linked to quarterly goals with completion tracking | 1 |\n| `content` | `05-Areas\u002FContent` | `**\u002F*.md` | Content ideas, articles, LinkedIn posts, and thought leadership material | 1 |\n| `career` | `05-Areas\u002FCareer` | `**\u002F*.md` | Career development evidence, feedback received, skills tracking, and growth goals | 1 |\n| `prds` | `System\u002FPRDs` | `**\u002F*.md` | Product requirement documents, feature specs, and technical design docs | 1 |\n| `resources` | `06-Resources` | `**\u002F*.md` | Reference material, learnings, system documentation, and guides | 5 |\n\n**After all collections are created, embed the vectors:**\n\n```bash\necho \"Creating embeddings for all collections...\"\nqmd embed\n```\n\nShow progress to the user — this may take a few minutes for larger vaults.\n\n## Step 6: Configure MCP Server\n\nAdd qmd MCP server to the user's Claude\u002FCursor config.\n\n**For Claude Code (`~\u002F.claude.json`):**\n\n```json\n{\n  \"mcpServers\": {\n    \"qmd\": {\n      \"type\": \"stdio\",\n      \"command\": \"qmd\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n**For Cursor (`.cursor\u002Fmcp.json` in vault root):**\n\n```json\n{\n  \"mcpServers\": {\n    \"qmd\": {\n      \"command\": \"qmd\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\nTell the user: \"You'll need to restart your editor for the MCP server to be available. After restart, I can use semantic search automatically.\"\n\n## Step 7: Create Availability Check\n\nCreate `.scripts\u002Fsemantic-search\u002Fcheck-availability.cjs` (see companion file). This lets other skills check if semantic search is available before using it.\n\n## Step 8: Show Success Summary\n\n```\n═══════════════════════════════════════════════════════════════════════\n                    SEMANTIC SEARCH ENABLED\n═══════════════════════════════════════════════════════════════════════\n\nYour vault now has smart, meaning-aware search.\n\nCollections created:\n  [list each collection with file count]\n\nTry it:\n  qmd query \"product led growth strategies\"\n  qmd query \"customer churn patterns\" -c accounts\n  qmd search \"meeting with Sarah\" -c meetings\n\nWhat's different now:\n  \u002Fdaily-plan    — meeting context enriched with thematic connections\n  \u002Fmeeting-prep  — attendee lookup finds role\u002Ftitle references\n  \u002Ftriage        — semantic routing with goal-aware matching\n  Person Lookup  — finds \"the VP of Sales\" without needing the name\n  Search & Recall — hybrid retrieval (BM25 + vectors + reranking)\n\nIndex updates automatically when you run: qmd update\nTo check status anytime:                  qmd status\nTo force full rebuild:                     qmd embed -f\n\nAs your vault grows, I'll suggest new collections when there's\nenough content to benefit. Run this skill again anytime to check.\n```\n\n---\n\n## Collection Health Check (Returning Users)\n\nIf the user already has qmd installed and collections exist, this skill switches to health-check mode.\n\n### Run Health Check\n\n```bash\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\" --health-check\n```\n\nThis compares existing collections against current vault state and returns:\n\n```json\n{\n  \"existing\": [\"people\", \"meetings\", \"tasks\"],\n  \"newCandidates\": [\n    {\n      \"name\": \"accounts\",\n      \"path\": \"05-Areas\u002FCompanies\",\n      \"fileCount\": 5,\n      \"reason\": \"You've created 5 company pages since last check\"\n    }\n  ],\n  \"staleCollections\": [\n    {\n      \"name\": \"meetings\",\n      \"lastUpdated\": \"12 days ago\",\n      \"currentFiles\": 52,\n      \"indexedFiles\": 47,\n      \"drift\": 5\n    }\n  ],\n  \"pendingEmbeddings\": 8,\n  \"suggestions\": [\n    \"Run 'qmd update' to re-index changed files\",\n    \"Run 'qmd embed' to embed 8 pending documents\"\n  ]\n}\n```\n\n### Present Health Report\n\n```\nSEMANTIC SEARCH HEALTH CHECK\n─────────────────────────────────────────────────────────────────\n\nActive Collections:\n  people      54 files    Updated 2h ago     Healthy\n  meetings    47 files    Updated 12d ago    ⚠ Stale (5 new files)\n  tasks        4 files    Updated 1d ago     Healthy\n\nNew Collection Candidates:\n  accounts    5 files     You've built enough company pages for\n                          a dedicated collection. This means deal\n                          prep will pull account context specifically.\n\n                          → Create accounts collection? [Y\u002Fn]\n\nMaintenance:\n  8 documents need embedding (run 'qmd embed')\n  meetings collection is 12 days stale (run 'qmd update')\n\nQuick fix: qmd update && qmd embed\n```\n\n### Handle New Candidates\n\nFor each new candidate:\n1. Explain what it enables (use the benefit text from the scanner)\n2. Ask if they want to create it\n3. If yes, create collection + context + embed\n\n### Growth Suggestions (Called by Other Skills)\n\nOther skills can call the scanner in suggestion mode during workflows:\n\n**During `\u002Fdaily-plan`:**\n```\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\" --suggestions-only\n```\n\nIf new candidates are found, append to the daily plan:\n\n```\n? Semantic search suggestion: You now have 5 company pages.\n   Want me to create an 'accounts' collection? This means deal\n   prep will search account context specifically.\n   Run \u002Fenable-semantic-search to set it up.\n```\n\n---\n\n## For Skill Authors: Using Semantic Search\n\nSkills should check availability before using semantic search:\n\n```javascript\n\u002F\u002F In your skill or hook\nconst { execSync } = require('child_process');\n\nfunction isSemanticSearchAvailable() {\n  try {\n    execSync('which qmd', { stdio: 'pipe' });\n    const status = execSync('qmd status', { stdio: 'pipe' }).toString();\n    return status.includes('Documents');\n  } catch {\n    return false;\n  }\n}\n\n\u002F\u002F Use in search logic\nif (isSemanticSearchAvailable()) {\n  \u002F\u002F Use qmd query for semantic search\n  const results = execSync(`qmd query \"${query}\" -c people`, { stdio: 'pipe' });\n} else {\n  \u002F\u002F Fall back to grep\u002Ffile search\n}\n```\n\nOr use the check-availability script:\n\n```javascript\nconst { checkSemanticSearch } = require('.scripts\u002Fsemantic-search\u002Fcheck-availability.cjs');\nconst status = checkSemanticSearch();\nif (status.available) {\n  \u002F\u002F Use semantic search\n}\n```\n\n---\n\n## Troubleshooting\n\nIf setup fails:\n\n1. **Bun install fails**: Try `npm install -g bun` or download from bun.sh\n2. **SQLite missing (macOS)**: Run `brew install sqlite`\n3. **Model download fails**: Check internet, retry with `qmd embed -f`\n4. **Index takes too long**: Large vaults (5000+ files) may take 10+ minutes first time\n5. **Collections empty**: Check paths match your vault structure — run the scanner to verify\n6. **MCP not connecting**: Restart your editor after adding the config\n\n---\n\n## Disabling\n\nTo remove semantic search:\n\n```bash\n# Remove index\nqmd cleanup\n\n# Remove the qmd binary\nbun remove -g qmd\n\n# Remove MCP config (manual — delete the \"qmd\" entry from your config)\n```\n\nYour vault files are never modified — removing qmd just removes the search index.\n","# Enable Semantic Search\n\nSet up local AI-powered semantic search for your vault. This is a **concierge experience** — it analyzes your vault, discovers what collections make sense, and creates a tailored search setup.\n\n## What You're Enabling\n\nSemantic search finds content by **meaning**, not just keywords:\n- Search \"product-led growth\" → finds notes saying \"PLG\", \"self-serve motion\", \"freemium adoption\"\n- Search \"customer churn\" → finds notes about \"retention problems\", \"users leaving\", \"cancellation patterns\"\n\nYour skills (`\u002Fdaily-plan`, `\u002Fmeeting-prep`, `\u002Ftriage`, etc.) automatically use semantic search when available, finding more relevant context than keyword matching alone.\n\n## Pre-Flight Checks\n\nRun these checks before proceeding:\n\n```bash\n# Check if qmd is already installed\nwhich qmd\n\n# Check if Bun is available (required)\nwhich bun\n\n# macOS only: Check SQLite via Homebrew\nbrew list sqlite 2>\u002Fdev\u002Fnull && echo \"SQLite OK\" || echo \"Need: brew install sqlite\"\n\n# Check available disk space (need ~2.5GB)\ndf -h ~ | tail -1\n```\n\n**If qmd is already installed**, run `qmd status` to check existing setup. If collections already exist, skip to the **Collection Health Check** section at the bottom.\n\n## Step 1: Explain What We're Installing\n\nPresent this to the user:\n\n```\n═══════════════════════════════════════════════════════════════════════\n                    SEMANTIC SEARCH FOR YOUR VAULT\n═══════════════════════════════════════════════════════════════════════\n\nWhat is this?\n─────────────\nRight now, finding notes requires knowing the exact words used.\nSearch \"product-led growth\" — won't find notes saying \"PLG\" or\n\"self-serve motion\".\n\nSemantic search understands meaning, not just keywords. It finds\nconceptually related content even when terminology differs.\n\n\nHow does it work?\n─────────────────\nYour notes get converted to \"embeddings\" — mathematical\nrepresentations of meaning. When you search, your query becomes\nan embedding too. The system finds notes whose meaning is close\nto your query's meaning.\n\nThink of it like: instead of matching letters, we're matching ideas.\n\n\nWhat gets installed?\n────────────────────\nThree small AI models run locally on your machine:\n\n  MODEL                      PURPOSE                    SIZE\n  ─────────────────────────────────────────────────────────────\n  EmbeddingGemma-300M        Converts text to meaning   ~300MB\n                             vectors. The core\n                             \"understanding\" model.\n\n  Qwen3-Reranker-0.6b       Re-orders results by       ~640MB\n                             true relevance. Improves\n                             result quality.\n\n  QMD-Query-Expansion-1.7B   Expands your search to     ~1.1GB\n                             include related terms.\n                             \"PLG\" → also searches\n                             \"product-led\", \"freemium\"\n\n  Total: ~2GB one-time download\n\n\nPrivacy & Security\n──────────────────\n- Everything runs locally — your notes never leave your machine\n- No API keys required\n- No cloud services\n- Models downloaded from HuggingFace (open source)\n- Index stored in ~\u002F.cache\u002Fqmd\u002F (not in your vault)\n\n\nWhat changes in your workflow?\n──────────────────────────────\nEnabling semantic search silently upgrades these skills:\n\n  \u002Fdaily-plan    — Enriches meeting prep with thematically\n                   related past discussions\n\n  \u002Fmeeting-prep  — Discovers past discussions related by\n                   meaning, not just name matching\n\n  \u002Ftriage        — Matches inbox items to goals by meaning,\n                   catches semantic duplicates\n\n  Person Lookup  — Finds \"the VP of Sales mentioned...\" even\n                   without a name\n\n  Search & Recall — All vault searches use hybrid retrieval\n                    (BM25 + vectors + LLM reranking)\n\n\nSystem Requirements\n───────────────────\n  ~2.5GB disk space (for models + index)\n  macOS: Homebrew SQLite required (brew install sqlite)\n  Bun runtime (will install if missing)\n```\n\n## Step 2: Get User Consent\n\nAsk: **\"Ready to enable semantic search? This will download ~2GB of models. [Y\u002Fn]\"**\n\nIf no, exit gracefully: \"No problem. Run `\u002Fenable-semantic-search` anytime.\"\n\n## Step 3: Install Dependencies\n\n```bash\n# Install Bun if missing\nif ! command -v bun &> \u002Fdev\u002Fnull; then\n    echo \"Installing Bun runtime...\"\n    curl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | bash\nfi\n\n# macOS: Install SQLite if missing\nif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n    if ! brew list sqlite &> \u002Fdev\u002Fnull; then\n        echo \"Installing SQLite via Homebrew...\"\n        brew install sqlite\n    fi\nfi\n\n# Install qmd globally\necho \"Installing qmd...\"\nbun install -g github:tobi\u002Fqmd\n```\n\n## Step 4: Download Models\n\n```bash\necho \"Downloading AI models (~2GB)...\"\necho \"This happens once. Future searches are instant.\"\necho \"\"\necho \"Models downloading:\"\necho \"  EmbeddingGemma-300M  — Converts text to meaning vectors\"\necho \"  Qwen3-Reranker-0.6b  — Improves result relevance\"\necho \"  QMD-Query-Expansion   — Expands searches with related terms\"\necho \"\"\n\n# Trigger model download with a simple embed operation\ncd \"$VAULT_PATH\" && qmd embed --help 2>\u002Fdev\u002Fnull || true\n```\n\n## Step 5: Smart Collection Discovery (THE CONCIERGE)\n\nThis is what makes Amp's semantic search better than generic indexing. Instead of dumping everything into one blob, we analyze the vault and create purpose-built collections.\n\n### Run the Vault Scanner\n\nExecute the vault scanner script to discover collection candidates:\n\n```bash\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\"\n```\n\nThe scanner returns a JSON structure like:\n\n```json\n{\n  \"candidates\": [\n    {\n      \"name\": \"people\",\n      \"path\": \"05-Areas\u002FPeople\",\n      \"glob\": \"**\u002F*.md\",\n      \"fileCount\": 23,\n      \"context\": \"Person pages with meeting history, relationship notes, action items, and role context\",\n      \"benefit\": \"Person lookup finds references by role\u002Ftitle, not just name\",\n      \"example\": \"Search 'VP of Sales' finds the person even if their name isn't mentioned\"\n    },\n    {\n      \"name\": \"accounts\",\n      \"path\": \"05-Areas\u002FCompanies\",\n      \"glob\": \"**\u002F*.md\",\n      \"fileCount\": 8,\n      \"context\": \"Company and account pages with deal status, relationship notes, and interaction history\",\n      \"benefit\": \"Deal prep pulls account-specific context without inbox noise\",\n      \"example\": \"Search 'renewal risk' finds accounts with churn signals\"\n    }\n  ],\n  \"skipped\": [\n    {\n      \"name\": \"career\",\n      \"reason\": \"Folder not set up (run \u002Fcareer-setup)\",\n      \"path\": \"05-Areas\u002FCareer\"\n    }\n  ],\n  \"totalFiles\": 156,\n  \"totalCandidates\": 6\n}\n```\n\n### Present Discovery Results\n\nFormat the scanner output as a concierge recommendation:\n\n```\nI scanned your vault and found candidates for [N] smart collections:\n\n  COLLECTION     FILES   WHAT IT ENABLES\n  ─────────────────────────────────────────────────────────────────\n  people         23      Person lookup finds references by\n                         role\u002Ftitle, not just name. Search\n                         \"VP of Sales\" finds the person even\n                         if their name isn't mentioned.\n\n  meetings       47      \"What was discussed about X?\" searches\n                         meeting notes specifically, not your\n                         entire vault.\n\n  tasks          1       Smart task matching for triage. Catches\n                         semantic duplicates like \"Review metrics\"\n                         ≈ \"Check quarterly numbers\".\n\n  projects       8       Project health pulls related docs\n                         without inbox noise.\n\n  goals          1       Goal alignment finds thematically\n                         related work across your vault.\n\n  priorities     1       Weekly planning discovers patterns\n                         in past priority choices.\n\n  Skipped (not enough content yet):\n  - accounts  — No company pages found (create some first)\n  - content   — No content files yet\n  - career    — Career folder not set up (run \u002Fcareer-setup)\n\n  Create all [N] collections? [Y]\n  Pick specific ones?         [P]\n  Just create a basic index?  [B]\n```\n\n### Handle User Choice\n\n**If [Y] - Create all:**\nCreate every candidate collection using `qmd collection add` with context.\n\n**If [P] - Pick specific:**\nPresent each candidate individually with a Y\u002FN toggle. Create only selected ones.\n\n**If [B] - Basic index:**\nCreate a single \"vault\" collection that indexes everything. This works but misses the precision of targeted collections.\n\n### Create Collections\n\nFor each accepted candidate, run:\n\n```bash\n# Create the collection\nqmd collection add \"$VAULT_PATH\u002F\u003Cpath>\" --name \u003Cname> --mask \"\u003Cglob>\"\n\n# Add semantic context (helps the reranker understand what's in the collection)\nqmd context add \u003Cname> \"\u003Ccontext description>\"\n```\n\n**Collection definitions (full list):**\n\n| Name | Path | Glob | Context | Min Files |\n|------|------|------|---------|-----------|\n| `people` | `05-Areas\u002FPeople` | `**\u002F*.md` | Person pages with meeting history, relationship notes, action items, and role context | 3 |\n| `accounts` | `05-Areas\u002FCompanies` | `**\u002F*.md` | Company and account pages with deal status, relationship notes, and interaction history | 1 |\n| `accounts` (alt) | `05-Areas\u002FRelationships\u002FKey_Accounts` | `**\u002F*.md` | Key Account pages with deal status, MEDDPICC, and engagement history | 1 |\n| `meetings` | `00-Inbox\u002FMeetings` | `**\u002F*.md` | Meeting notes with attendees, key discussion points, decisions made, and action items | 5 |\n| `tasks` | `03-Tasks` | `**\u002F*.md` | Task backlog with priorities (P0-P3), pillar alignment, status tracking, and linked goals | 1 |\n| `projects` | `04-Projects` | `**\u002F*.md` | Active project tracking with status, stakeholders, timelines, and related decisions | 1 |\n| `goals` | `01-Quarter_Goals` | `**\u002F*.md` | Quarterly strategic goals with success criteria, milestones, and progress tracking | 1 |\n| `priorities` | `02-Week_Priorities` | `**\u002F*.md` | Weekly priorities linked to quarterly goals with completion tracking | 1 |\n| `content` | `05-Areas\u002FContent` | `**\u002F*.md` | Content ideas, articles, LinkedIn posts, and thought leadership material | 1 |\n| `career` | `05-Areas\u002FCareer` | `**\u002F*.md` | Career development evidence, feedback received, skills tracking, and growth goals | 1 |\n| `prds` | `System\u002FPRDs` | `**\u002F*.md` | Product requirement documents, feature specs, and technical design docs | 1 |\n| `resources` | `06-Resources` | `**\u002F*.md` | Reference material, learnings, system documentation, and guides | 5 |\n\n**After all collections are created, embed the vectors:**\n\n```bash\necho \"Creating embeddings for all collections...\"\nqmd embed\n```\n\nShow progress to the user — this may take a few minutes for larger vaults.\n\n## Step 6: Configure MCP Server\n\nAdd qmd MCP server to the user's Claude\u002FCursor config.\n\n**For Claude Code (`~\u002F.claude.json`):**\n\n```json\n{\n  \"mcpServers\": {\n    \"qmd\": {\n      \"type\": \"stdio\",\n      \"command\": \"qmd\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n**For Cursor (`.cursor\u002Fmcp.json` in vault root):**\n\n```json\n{\n  \"mcpServers\": {\n    \"qmd\": {\n      \"command\": \"qmd\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\nTell the user: \"You'll need to restart your editor for the MCP server to be available. After restart, I can use semantic search automatically.\"\n\n## Step 7: Create Availability Check\n\nCreate `.scripts\u002Fsemantic-search\u002Fcheck-availability.cjs` (see companion file). This lets other skills check if semantic search is available before using it.\n\n## Step 8: Show Success Summary\n\n```\n═══════════════════════════════════════════════════════════════════════\n                    SEMANTIC SEARCH ENABLED\n═══════════════════════════════════════════════════════════════════════\n\nYour vault now has smart, meaning-aware search.\n\nCollections created:\n  [list each collection with file count]\n\nTry it:\n  qmd query \"product led growth strategies\"\n  qmd query \"customer churn patterns\" -c accounts\n  qmd search \"meeting with Sarah\" -c meetings\n\nWhat's different now:\n  \u002Fdaily-plan    — meeting context enriched with thematic connections\n  \u002Fmeeting-prep  — attendee lookup finds role\u002Ftitle references\n  \u002Ftriage        — semantic routing with goal-aware matching\n  Person Lookup  — finds \"the VP of Sales\" without needing the name\n  Search & Recall — hybrid retrieval (BM25 + vectors + reranking)\n\nIndex updates automatically when you run: qmd update\nTo check status anytime:                  qmd status\nTo force full rebuild:                     qmd embed -f\n\nAs your vault grows, I'll suggest new collections when there's\nenough content to benefit. Run this skill again anytime to check.\n```\n\n---\n\n## Collection Health Check (Returning Users)\n\nIf the user already has qmd installed and collections exist, this skill switches to health-check mode.\n\n### Run Health Check\n\n```bash\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\" --health-check\n```\n\nThis compares existing collections against current vault state and returns:\n\n```json\n{\n  \"existing\": [\"people\", \"meetings\", \"tasks\"],\n  \"newCandidates\": [\n    {\n      \"name\": \"accounts\",\n      \"path\": \"05-Areas\u002FCompanies\",\n      \"fileCount\": 5,\n      \"reason\": \"You've created 5 company pages since last check\"\n    }\n  ],\n  \"staleCollections\": [\n    {\n      \"name\": \"meetings\",\n      \"lastUpdated\": \"12 days ago\",\n      \"currentFiles\": 52,\n      \"indexedFiles\": 47,\n      \"drift\": 5\n    }\n  ],\n  \"pendingEmbeddings\": 8,\n  \"suggestions\": [\n    \"Run 'qmd update' to re-index changed files\",\n    \"Run 'qmd embed' to embed 8 pending documents\"\n  ]\n}\n```\n\n### Present Health Report\n\n```\nSEMANTIC SEARCH HEALTH CHECK\n─────────────────────────────────────────────────────────────────\n\nActive Collections:\n  people      54 files    Updated 2h ago     Healthy\n  meetings    47 files    Updated 12d ago    ⚠ Stale (5 new files)\n  tasks        4 files    Updated 1d ago     Healthy\n\nNew Collection Candidates:\n  accounts    5 files     You've built enough company pages for\n                          a dedicated collection. This means deal\n                          prep will pull account context specifically.\n\n                          → Create accounts collection? [Y\u002Fn]\n\nMaintenance:\n  8 documents need embedding (run 'qmd embed')\n  meetings collection is 12 days stale (run 'qmd update')\n\nQuick fix: qmd update && qmd embed\n```\n\n### Handle New Candidates\n\nFor each new candidate:\n1. Explain what it enables (use the benefit text from the scanner)\n2. Ask if they want to create it\n3. If yes, create collection + context + embed\n\n### Growth Suggestions (Called by Other Skills)\n\nOther skills can call the scanner in suggestion mode during workflows:\n\n**During `\u002Fdaily-plan`:**\n```\nnode \"$VAULT_PATH\u002F.scripts\u002Fsemantic-search\u002Fscan-vault.cjs\" --suggestions-only\n```\n\nIf new candidates are found, append to the daily plan:\n\n```\n? Semantic search suggestion: You now have 5 company pages.\n   Want me to create an 'accounts' collection? This means deal\n   prep will search account context specifically.\n   Run \u002Fenable-semantic-search to set it up.\n```\n\n---\n\n## For Skill Authors: Using Semantic Search\n\nSkills should check availability before using semantic search:\n\n```javascript\n\u002F\u002F In your skill or hook\nconst { execSync } = require('child_process');\n\nfunction isSemanticSearchAvailable() {\n  try {\n    execSync('which qmd', { stdio: 'pipe' });\n    const status = execSync('qmd status', { stdio: 'pipe' }).toString();\n    return status.includes('Documents');\n  } catch {\n    return false;\n  }\n}\n\n\u002F\u002F Use in search logic\nif (isSemanticSearchAvailable()) {\n  \u002F\u002F Use qmd query for semantic search\n  const results = execSync(`qmd query \"${query}\" -c people`, { stdio: 'pipe' });\n} else {\n  \u002F\u002F Fall back to grep\u002Ffile search\n}\n```\n\nOr use the check-availability script:\n\n```javascript\nconst { checkSemanticSearch } = require('.scripts\u002Fsemantic-search\u002Fcheck-availability.cjs');\nconst status = checkSemanticSearch();\nif (status.available) {\n  \u002F\u002F Use semantic search\n}\n```\n\n---\n\n## Troubleshooting\n\nIf setup fails:\n\n1. **Bun install fails**: Try `npm install -g bun` or download from bun.sh\n2. **SQLite missing (macOS)**: Run `brew install sqlite`\n3. **Model download fails**: Check internet, retry with `qmd embed -f`\n4. **Index takes too long**: Large vaults (5000+ files) may take 10+ minutes first time\n5. **Collections empty**: Check paths match your vault structure — run the scanner to verify\n6. **MCP not connecting**: Restart your editor after adding the config\n\n---\n\n## Disabling\n\nTo remove semantic search:\n\n```bash\n# Remove index\nqmd cleanup\n\n# Remove the qmd binary\nbun remove -g qmd\n\n# Remove MCP config (manual — delete the \"qmd\" entry from your config)\n```\n\nYour vault files are never modified — removing qmd just removes the search index.\n",{"name":5,"description":7},"main","5417cad9215b767627c7c947dcb3a0bbe3ebe52d",".claude\u002Fskills\u002Fenable-semantic-search",0,"https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use","https:\u002F\u002Fgithub.com\u002Fhemory","https:\u002F\u002Fwww.heminthehat.com\u002F","The People Developer | L&D Program Manager | Software Engineer","2026-06-04 23:46:30",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add hemory\u002Famp-legacy-do-not-use --skill enable-semantic-search",{"tool":51,"command":52},"bunx","bunx skills add hemory\u002Famp-legacy-do-not-use --skill enable-semantic-search",{"tool":54,"command":55},"pnpm","pnpm dlx skills add hemory\u002Famp-legacy-do-not-use --skill enable-semantic-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fenable-semantic-search\u002FSKILL.md",true,[],[60,92,101,115,130,142],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":72,"publishedAt":31},"01M6D3DVEAHJTTK4W21B15ZZKK","zoom-setup","Connect Zoom to Amp for meeting recordings, scheduling, and transcript context","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fzoom-setup\u002FSKILL.md",[66,67],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":68,"categoryName":69,"taxonomyType":70,"taxonomyTypeDesc":71},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[73,74,75,76,77,78,79,25,80,81,82,83,84,85,86,87,88,89,90,91],"zoom setup","setup","schedule","MCP","review","connect","transcript","stats","oauth2","confirmation","context","meetings","process","recordings","surfaces","scheduling","granola","time","distribution",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":31},"01M6D3DRAK8VWESYDZDF8JJDSH","xray","Understand what just happened under the hood - learn AI by seeing it in action","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fxray\u002FSKILL.md",[],[94,99,100],"learn","just",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":108,"publishedAt":31},"01M6D3DN7BZQDY6143A2QSDP9A","week-review","Review week's progress with concrete accomplishments (not fake percentages), pattern detection, and goal tracking.","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweek-review\u002FSKILL.md",[107],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[109,77,110,111,112,113,114],"week review","pattern detection","detection","tracking","goal","pattern",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":31},"01M6D3DJ7F1TCFXBBSTQW82WE7","week-plan","Set weekly priorities and plan the week ahead with intelligent suggestions based on goals, calendar shape, and task effort.","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweek-plan\u002FSKILL.md",[],[122,123,124,125,126,127,128,129],"week plan","plan","calendar","SET","shape","goals","task","priorities",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":31},"01M6D3DF90D7RC8ZJE4AW2P9VC","triage","Strategically route orphaned files and extract scattered tasks","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftriage\u002FSKILL.md",[],[132,137,138,139,140,141],"tasks","fast","extract","files","route",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":152,"publishedAt":31},"01M6D3DC9BBHK5TASE34SQYXSQ","trello-setup","Connect Trello to Amp for visual Kanban task sync","https:\u002F\u002Fgithub.com\u002Fhemory\u002Famp-legacy-do-not-use\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftrello-setup\u002FSKILL.md",[148,151],{"categoryNo":149,"categoryName":150,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[153,154,74,155,78,76,156,128,157,158,159,160,161],"trello","trello setup","sync","token","kanban","bun","visual","api","server"]