[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E0FQQXF96VM8QSW5099R22":3,"skill-same:01M6E0FQQXF96VM8QSW5099R22":63},{"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":18,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":14,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6E0FQQXF96VM8QSW5099R22","rag-index-rebuild",null,"Trigger a full or incremental reindex of the RAG corpus","LucasSantana-Dev\u002Fforgekit","LucasSantana-Dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F98131142?v=4","01M6E038X8H7VE9GCEJP9PT5CA","Lucas Santana","01M6E0391WB0JYZTWXEBR9WSXA",1,"MIT","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-rag-index-rebuild\u002FSKILL.md",[],[19,20,21,22,23,24],"rag","index","rebuild","rag index rebuild","full","trigger","2026-11-10 10:12:30",false,"---\nname: rag-index-rebuild\ndescription: Trigger a full or incremental reindex of the RAG corpus\ntriggers:\n  - rag rebuild\n  - reindex\n  - index rebuild\n  - force reindex\n---\n\n# RAG Index Rebuild\n\nReindex the local RAG corpus to add new documents, update stale chunks, or recover from corruption. Choose between **full rebuild** (clean slate, slow) and **incremental** (fast, targets specific files).\n\n## When to rebuild\n\n| Scenario | Command | Time |\n|----------|---------|------|\n| First setup or full refresh | Full rebuild | ~5–10 min |\n| Add new docs to corpus | Incremental | \u003C1 min |\n| Update stale chunks after editing files | Incremental | \u003C1 min |\n| Corpus corruption suspected | Full rebuild | ~5–10 min |\n| Drift accumulation >50 chunks | Full rebuild | ~5–10 min |\n\n## When NOT to rebuild\n\n- **Just queried and got bad results.** Likely a curation\u002Fcorpus gap, not an index bug. Try the `adt-rag-curate` skill first.\n- **Index is \u003C1 week old.** Drift detection runs automatically at session start. Manual rebuild only if you've made recent bulk edits.\n- **Testing retrieval logic.** Use a static index; don't rebuild during active development.\n\n## Full rebuild (clean slate)\n\nDrops the index and reconstructs all chunks from source files.\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython build.py\n```\n\n**What happens:**\n- Scans all source repos and doc dirs configured in `build.py`\n- Creates new `index.sqlite` with all chunks from scratch\n- Embeds each chunk with `all-MiniLM-L6-v2`\n- Outputs final chunk count and time\n\n**Expected output:**\n```\nIndex built successfully.\nTotal chunks: 14,355\nTime: 7m 42s\n```\n\n## Incremental rebuild (targeted files)\n\nAdd new documents or refresh stale ones without rebuilding the entire index.\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython build.py --incremental file1.md file2.md\n```\n\n**Examples:**\n\n```bash\n# Add a new skill\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fskills\u002Fmy-skill\u002FSKILL.md\n\n# Update multiple files\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fplans\u002Fproject.md ~\u002F.claude\u002Fstandards\u002Fcode.md\n\n# Update all Python files under a path\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002FDesenvolvimento\u002Fforgekit\u002Fsrc\u002F*.py\n```\n\n**What happens:**\n- Deletes any existing chunks from the named files\n- Re-embeds and inserts new chunks for those files only\n- Existing chunks from other files remain untouched\n- Much faster than full rebuild\n\n## Finding what needs reindexing\n\nRun the report script to see stale\u002Fmissing chunks:\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython report.py\n```\n\nCheck the output file for stale sections:\n\n```bash\ncat ~\u002F.claude\u002Frag-index\u002Fweekly.md | grep -A 20 \"Stale chunks\"\n```\n\nLook for:\n- **Missing files:** chunks indexed from a file that no longer exists\n- **Modified files:** files edited after the last index time (sha mismatch)\n\nIncremental reindex those files:\n\n```bash\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fstandards\u002Fupdated-file.md\n```\n\n## Post-rebuild verification\n\nTest a query against the fresh index:\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython query.py \"your test question\" --top 5\n```\n\nExpected output shows `rrf`, `cos`, `bm25` scores for each result. Cosine >0.55 indicates good retrieval quality.\n\n**Check chunk distribution:**\n\n```bash\nsqlite3 ~\u002F.claude\u002Frag-index\u002Findex.sqlite \\\n  \"SELECT source_type, COUNT(*) FROM chunks GROUP BY source_type ORDER BY COUNT(*) DESC;\"\n```\n\nCompare to baseline:\n- `skills`: ≥500 chunks\n- `handoffs`: ≥200 chunks\n- `standards`, `codex`: ≥50 chunks combined\n\nIf counts drop significantly, the rebuild may have skipped a source. Check `build.py` configuration.\n\n## Troubleshooting\n\n**\"No chunks added\"** after incremental rebuild\n- Verify the file path exists and is in a tracked source dir\n- Check that the file extension matches the parser (`.md`, `.py`, `.json`, etc.)\n- Run a full rebuild if unsure\n\n**Index size unchanged** after full rebuild\n- The corpus may not have changed. Check `weekly.md` for timestamps.\n- Verify tracked repos\u002Fdirs in `build.py` exist and have recent commits\n\n**Embedding fails** during rebuild\n- Ensure `venv` is active and `all-MiniLM-L6-v2` model is downloaded: `venv\u002Fbin\u002Fpython -c \"from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')\"`\n- If model is missing, download it: the first run will auto-download (~100MB)\n\n## See also\n\n- `adt-rag-quality` — evaluate retrieval quality and find zero-hit gaps\n- `adt-rag-drift` — detect and fix stale chunks\n- `adt-rag-curate` — improve corpus coverage by adding missing docs\n","# RAG Index Rebuild\n\nReindex the local RAG corpus to add new documents, update stale chunks, or recover from corruption. Choose between **full rebuild** (clean slate, slow) and **incremental** (fast, targets specific files).\n\n## When to rebuild\n\n| Scenario | Command | Time |\n|----------|---------|------|\n| First setup or full refresh | Full rebuild | ~5–10 min |\n| Add new docs to corpus | Incremental | \u003C1 min |\n| Update stale chunks after editing files | Incremental | \u003C1 min |\n| Corpus corruption suspected | Full rebuild | ~5–10 min |\n| Drift accumulation >50 chunks | Full rebuild | ~5–10 min |\n\n## When NOT to rebuild\n\n- **Just queried and got bad results.** Likely a curation\u002Fcorpus gap, not an index bug. Try the `adt-rag-curate` skill first.\n- **Index is \u003C1 week old.** Drift detection runs automatically at session start. Manual rebuild only if you've made recent bulk edits.\n- **Testing retrieval logic.** Use a static index; don't rebuild during active development.\n\n## Full rebuild (clean slate)\n\nDrops the index and reconstructs all chunks from source files.\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython build.py\n```\n\n**What happens:**\n- Scans all source repos and doc dirs configured in `build.py`\n- Creates new `index.sqlite` with all chunks from scratch\n- Embeds each chunk with `all-MiniLM-L6-v2`\n- Outputs final chunk count and time\n\n**Expected output:**\n```\nIndex built successfully.\nTotal chunks: 14,355\nTime: 7m 42s\n```\n\n## Incremental rebuild (targeted files)\n\nAdd new documents or refresh stale ones without rebuilding the entire index.\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython build.py --incremental file1.md file2.md\n```\n\n**Examples:**\n\n```bash\n# Add a new skill\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fskills\u002Fmy-skill\u002FSKILL.md\n\n# Update multiple files\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fplans\u002Fproject.md ~\u002F.claude\u002Fstandards\u002Fcode.md\n\n# Update all Python files under a path\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002FDesenvolvimento\u002Fforgekit\u002Fsrc\u002F*.py\n```\n\n**What happens:**\n- Deletes any existing chunks from the named files\n- Re-embeds and inserts new chunks for those files only\n- Existing chunks from other files remain untouched\n- Much faster than full rebuild\n\n## Finding what needs reindexing\n\nRun the report script to see stale\u002Fmissing chunks:\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython report.py\n```\n\nCheck the output file for stale sections:\n\n```bash\ncat ~\u002F.claude\u002Frag-index\u002Fweekly.md | grep -A 20 \"Stale chunks\"\n```\n\nLook for:\n- **Missing files:** chunks indexed from a file that no longer exists\n- **Modified files:** files edited after the last index time (sha mismatch)\n\nIncremental reindex those files:\n\n```bash\nvenv\u002Fbin\u002Fpython build.py --incremental ~\u002F.claude\u002Fstandards\u002Fupdated-file.md\n```\n\n## Post-rebuild verification\n\nTest a query against the fresh index:\n\n```bash\ncd ~\u002F.claude\u002Frag-index\nvenv\u002Fbin\u002Fpython query.py \"your test question\" --top 5\n```\n\nExpected output shows `rrf`, `cos`, `bm25` scores for each result. Cosine >0.55 indicates good retrieval quality.\n\n**Check chunk distribution:**\n\n```bash\nsqlite3 ~\u002F.claude\u002Frag-index\u002Findex.sqlite \\\n  \"SELECT source_type, COUNT(*) FROM chunks GROUP BY source_type ORDER BY COUNT(*) DESC;\"\n```\n\nCompare to baseline:\n- `skills`: ≥500 chunks\n- `handoffs`: ≥200 chunks\n- `standards`, `codex`: ≥50 chunks combined\n\nIf counts drop significantly, the rebuild may have skipped a source. Check `build.py` configuration.\n\n## Troubleshooting\n\n**\"No chunks added\"** after incremental rebuild\n- Verify the file path exists and is in a tracked source dir\n- Check that the file extension matches the parser (`.md`, `.py`, `.json`, etc.)\n- Run a full rebuild if unsure\n\n**Index size unchanged** after full rebuild\n- The corpus may not have changed. Check `weekly.md` for timestamps.\n- Verify tracked repos\u002Fdirs in `build.py` exist and have recent commits\n\n**Embedding fails** during rebuild\n- Ensure `venv` is active and `all-MiniLM-L6-v2` model is downloaded: `venv\u002Fbin\u002Fpython -c \"from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')\"`\n- If model is missing, download it: the first run will auto-download (~100MB)\n\n## See also\n\n- `adt-rag-quality` — evaluate retrieval quality and find zero-hit gaps\n- `adt-rag-drift` — detect and fix stale chunks\n- `adt-rag-curate` — improve corpus coverage by adding missing docs\n",{"name":5,"triggers":30,"description":7},[31,32,33,34],"rag rebuild","reindex","index rebuild","force reindex","main","4081c4af3adf7955205b04e1f4a7eb3cebaea9f6","packages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-rag-index-rebuild","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev","https:\u002F\u002Flucassantana.tech","Senior engineer. AI agent tooling and evals on Node\u002FTS backends. Brazil, UTC-3.","2026-11-11 07:05:28",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add LucasSantana-Dev\u002Fforgekit --skill rag-index-rebuild",{"tool":49,"command":50},"bunx","bunx skills add LucasSantana-Dev\u002Fforgekit --skill rag-index-rebuild",{"tool":52,"command":53},"pnpm","pnpm dlx skills add LucasSantana-Dev\u002Fforgekit --skill rag-index-rebuild","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-rag-index-rebuild\u002FSKILL.md",true,[57],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"manifest.json","REFERENCE","参考文档",869,"https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-rag-index-rebuild\u002Fmanifest.json",[64,96,128,151,160,178],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":75,"publishedAt":25},"01M6WR9SQGQ5WDEJY9HH3T93E8","token-audit","Audit historical Claude Code token usage from JSONL session files — shows total spend, cache hit rates, top costly sessions, weekly trends, and where tokens are going. Run after heavy sessions or weekly to measure optimization impact. Answers how many tokens a session used, how expensive was that session, session cost, and token usage report.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-token-audit\u002FSKILL.md",[70],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],"audit","token","token audit","session","rate","weekly","top","usage","jsonl","usage report","impact","tokens","files","cost","how","Optimization","cache","code","run","sessions",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":107,"publishedAt":25},"01M6WR919T3NGWMZ5R5XKWX9KN","smart-model-route","Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security\u002Farch\u002Fmigrations) to Opus. Handles model selection, for example choose model by task complexity.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-smart-model-route\u002FSKILL.md",[102],{"categoryNo":103,"categoryName":104,"taxonomyType":105,"taxonomyTypeDesc":106},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127],"smart model route","route","model route","model","security","model selection","tasks","critical","arch","classify","selection","fallback","complexity","auto","opus","haiku","choose","hook","agent tool","sonnet",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":135,"publishedAt":25},"01M6WR8TMGS9G79DFTX0K1ZA8T","smart-commands","Decision guide for when to proactively use Claude Code slash commands — \u002Fthink, \u002Fmodel, \u002Fcompact, \u002Fclear. Use when choosing whether to invoke a command before or during a task, or when a complexity-classifier hook has flagged a task as high or critical. Pairs with the complexity-classifier UserPromptSubmit hook. Answers when to compact, should I switch models, and whether to use extended thinking. Use to pick the right \u002Fmodel command and switch model.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcatalog\u002Fcatalog\u002Fskills\u002Fadt-smart-commands\u002FSKILL.md",[134],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},[136,137,138,139,140,141,125,115,142,143,144,145,120,146,147,148,149,150,111,93],"smart commands","commands","when","as","use","for","compact","thinking","switch","classifier","invoke","guide","command","decision","pick",{"skillNo":152,"name":153,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":25},"01M6E0ZGQ78S4SE6X6RCN1PR9A","spec-ship","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Fspec-ship\u002FSKILL.md",[],[157,158,159],"spec","ship","spec ship",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":25},"01M6E0ZD27S87Z954JTHECWG34","spec-new","Create a committed per-feature spec under `docs\u002Fspecs\u002FYYYY-MM-DD-\u003Cslug>\u002F{spec,tasks}.md` with frontmatter (status, created, owner, pr, tags). Promotes an ephemeral `.claude\u002Fplans\u002F\u003Cname>.md` into a persistent, searchable artifact. Use when starting a feature that's larger than a one-shot PR.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Fspec-new\u002FSKILL.md",[],[167,157,168,140,169,170,114,171,172,173,174,175,176,177],"spec new","artifact","dd","create","pr","status","docs","feature","tags","name","plans",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":187,"publishedAt":25},"01M6E0Z9B5YE1G4NM05JPNVWMK","roadmap-refresh","Regenerate `docs\u002Froadmap.md` for a repo from all specs under `docs\u002Fspecs\u002F` + their frontmatter (status, tags, pr). Produces Now\u002FNext\u002FRecently-shipped sections. Run after creating \u002F shipping a spec, or at the start of a new session for orientation.","https:\u002F\u002Fgithub.com\u002FLucasSantana-Dev\u002Fforgekit\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fkit\u002Fspecs\u002Fskills\u002Froadmap-refresh\u002FSKILL.md",[184],{"categoryNo":185,"categoryName":186,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000031","产品经理",[188,189,190,191,175,192,79,193,194,195,196,94,171,172,173,157],"roadmap refresh","roadmap","refresh","next","now","repo","new session","start","shipping"]