[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ADTZ2CMT686B1SAZ0QZ5VX":3,"skill-same:01M7ADTZ2CMT686B1SAZ0QZ5VX":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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7ADTZ2CMT686B1SAZ0QZ5VX","rag",null,"Use when building retrieval over a project corpus (docs, code, notes), when answering chunking\u002Fembedding\u002Fvector-store questions, when evaluating whether retrieval actually works, or when an agent \"can't find things in the docs\" and grep alone is not cutting it.","Leostruka\u002Fdevin-bundle","Leostruka","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F81370685?v=4","01M7AD8MAK63VDNAWRDRRRW04N","leandro ostruka","01M7AD8MBS65YDS1KMMV7YPM07",0,"MIT","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Frag\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rag\ndescription: Use when building retrieval over a project corpus (docs, code, notes), when answering chunking\u002Fembedding\u002Fvector-store questions, when evaluating whether retrieval actually works, or when an agent \"can't find things in the docs\" and grep alone is not cutting it.\ntriggers: [user, model]\n---\n\n# RAG\n\nBuild retrieval over arbitrary project corpora, offline-first and\nprovider-neutral. Evidence base: research dispatched via\n`.devin\u002Fledgers\u002Fagent-docs-rag.md` but the output doc was never committed;\ntreat C-number claims as unverified secondary sources (#530).\n\n## The tier ladder\n\nEscalate only on **measured failure** of the current tier: golden-set\nrecall\u002Fhit-rate misses, not vibes. Before tiering up, re-run the eval on\nthe current tier - lexical tiers are stronger than assumed.\n\n| Tier | Retrieval | Deps | Escalate when |\n|---|---|---|---|\n| 0 - Agentic lexical | glob\u002Fgrep\u002Fread loops over the live tree | none | corpus outgrows ad-hoc exploration; repeated identical queries |\n| 1 - Lexical index | BM25 over chunked corpus (SQLite FTS5 `bm25()`, or a BM25 pip package) | stdlib or one pip pkg | paraphrase\u002Fsynonym queries miss on the golden set |\n| 2 - Local hybrid | local embeddings + in-process store + RRF fusion with BM25 + optional local cross-encoder rerank | opt-in deps | corpus\u002Fops scale beyond local, or latency budget needs approximate indexes |\n| 3 - Hosted \u002F server | hosted embeddings or a server vector DB | consent + credentials | managed ops required; never the default |\n\nRationale: agentic filesystem exploration leads at small corpus scale but\ncosts far more query tokens; a BM25 index overtakes it as corpora grow\n(C24). For code, index-free ripgrep-style retrieval matches graph-based\nRAG baselines (C26), and a shipped coding agent uses live-tree ripgrep\nsearch instead of a vector index (C28 [secondary]). A well-tuned BM25\nretriever inside an agent loop can beat released dense-retriever agents\n(C25 [abs]).\n\nDetailed recipes per tier: `reference\u002Ftier-recipes.md`.\n\n## Build order (all tiers)\n\n1. **Golden set first.** Before any embedding or index work, write a\n   golden set of query -> expected-passage pairs and measure hit rate \u002F\n   recall@k \u002F MRR deterministically (C18). Retrieval below a precision\n   threshold actively degrades a coding agent, not just wastes tokens\n   (C27 [abs]).\n2. **Structure-aware chunking.** Default: split on document structure\n   (Markdown headers, code language separators), then recursive\n   character splitting (`\"\\n\\n\" -> \"\\n\" -> \" \"`) as the size cap (C2).\n   Chunking choice has significant impact on retrieval accuracy and some\n   popular defaults perform poorly (C3); the chunking delta can exceed\n   the embedding-model delta, so fix splitting before swapping models\n   (C4 [single-corpus]). No strategy fits all corpora (C1); semantic\n   chunking improves cohesion at added cost and unpredictable sizes (C5).\n3. **Provenance on every chunk.** Each stored chunk carries\n   `path:start_line-end_line` plus enough text to quote it back, matching\n   the `knowledge-modeling` extracted-fact convention. Retrieval that\n   cannot cite where a chunk came from is not shippable here.\n4. **Tier entry.** Start at tier 0. Add a BM25 index (tier 1) when the\n   corpus is large or queries repeat; verify the target Python actually\n   ships FTS5 compiled in - it is a build-time, platform-dependent option -\n   before relying on `bm25()` (C36). Hybrid +\n   rerank (tier 2) only when the golden set shows lexical misses on\n   paraphrase; pick embedding models from MTEB filtered by domain - code\n   retrieval tasks exist there - never by hype (C6).\n\nEval-harness sketch and metric definitions: `reference\u002Feval-and-failures.md`.\n\n## Failure-mode checklist\n\nWalk this list before blaming the model (full catalog with C-numbers in\n`reference\u002Feval-and-failures.md`; the seven canonical failure points are\nC34):\n\n- Missing content: the answer is not in the corpus (C34).\n- Missed top rank: present but retrieval never surfaces it - a recall\n  problem, fixable by chunking\u002Ffusion, not generation (C34).\n- Not consolidated: retrieved but lost among too many chunks - answer\n  quality vs chunk count is an inverted U (C31); order best chunks at\n  the beginning and end of context, mid-context is used worst (C33).\n- Not extracted \u002F wrong format \u002F wrong specificity: prompt or\n  post-processing issues, not index issues (C34).\n- Stale or duplicated index entries drifting from the live tree (C34\n  family) - rebuild or incremental-merge with conflict reporting.\n- Too much retrieved context: accuracy degrades past large retrieved\n  volumes in most models (C32 [abs]); retrieval is chosen over long\n  context for cost, not quality (C30).\n- Agentic-loop risks: compounding errors, memory poisoning, cascading\n  tool failures - bound the loop (C23 [abs]).\n\n## Agentic pattern\n\nRetrieval-as-tool inside the reasoning loop is the current paradigm\n(C22): the agent issues search calls, reads results, refines queries.\nAgentic reasoning works best *after* ranked discovery, not in place of\nit (C24). Keep loops bounded and apply context-hygiene cost guards.\n\n## Teach vs omit\n\nTeach: the tier ladder with measured escalation; golden-set eval before\nembeddings; structure-aware chunking; provenance; hybrid + rerank recipe\nat tier 2; staleness\u002Fdedup; the failure checklist.\n\nOmit (project boundaries): vendor walkthroughs and hosted-service setup\n(provider-neutral per vision); any named \"best\" embedding model (point\nat MTEB - leaderboards churn); shipped runtimes, indexes, or MCP\nconfigs; GraphRAG and retriever fine-tuning (construction cost, scope);\nimplementation code (this skill is guidance, not a runtime).\n","# RAG\n\nBuild retrieval over arbitrary project corpora, offline-first and\nprovider-neutral. Evidence base: research dispatched via\n`.devin\u002Fledgers\u002Fagent-docs-rag.md` but the output doc was never committed;\ntreat C-number claims as unverified secondary sources (#530).\n\n## The tier ladder\n\nEscalate only on **measured failure** of the current tier: golden-set\nrecall\u002Fhit-rate misses, not vibes. Before tiering up, re-run the eval on\nthe current tier - lexical tiers are stronger than assumed.\n\n| Tier | Retrieval | Deps | Escalate when |\n|---|---|---|---|\n| 0 - Agentic lexical | glob\u002Fgrep\u002Fread loops over the live tree | none | corpus outgrows ad-hoc exploration; repeated identical queries |\n| 1 - Lexical index | BM25 over chunked corpus (SQLite FTS5 `bm25()`, or a BM25 pip package) | stdlib or one pip pkg | paraphrase\u002Fsynonym queries miss on the golden set |\n| 2 - Local hybrid | local embeddings + in-process store + RRF fusion with BM25 + optional local cross-encoder rerank | opt-in deps | corpus\u002Fops scale beyond local, or latency budget needs approximate indexes |\n| 3 - Hosted \u002F server | hosted embeddings or a server vector DB | consent + credentials | managed ops required; never the default |\n\nRationale: agentic filesystem exploration leads at small corpus scale but\ncosts far more query tokens; a BM25 index overtakes it as corpora grow\n(C24). For code, index-free ripgrep-style retrieval matches graph-based\nRAG baselines (C26), and a shipped coding agent uses live-tree ripgrep\nsearch instead of a vector index (C28 [secondary]). A well-tuned BM25\nretriever inside an agent loop can beat released dense-retriever agents\n(C25 [abs]).\n\nDetailed recipes per tier: `reference\u002Ftier-recipes.md`.\n\n## Build order (all tiers)\n\n1. **Golden set first.** Before any embedding or index work, write a\n   golden set of query -> expected-passage pairs and measure hit rate \u002F\n   recall@k \u002F MRR deterministically (C18). Retrieval below a precision\n   threshold actively degrades a coding agent, not just wastes tokens\n   (C27 [abs]).\n2. **Structure-aware chunking.** Default: split on document structure\n   (Markdown headers, code language separators), then recursive\n   character splitting (`\"\\n\\n\" -> \"\\n\" -> \" \"`) as the size cap (C2).\n   Chunking choice has significant impact on retrieval accuracy and some\n   popular defaults perform poorly (C3); the chunking delta can exceed\n   the embedding-model delta, so fix splitting before swapping models\n   (C4 [single-corpus]). No strategy fits all corpora (C1); semantic\n   chunking improves cohesion at added cost and unpredictable sizes (C5).\n3. **Provenance on every chunk.** Each stored chunk carries\n   `path:start_line-end_line` plus enough text to quote it back, matching\n   the `knowledge-modeling` extracted-fact convention. Retrieval that\n   cannot cite where a chunk came from is not shippable here.\n4. **Tier entry.** Start at tier 0. Add a BM25 index (tier 1) when the\n   corpus is large or queries repeat; verify the target Python actually\n   ships FTS5 compiled in - it is a build-time, platform-dependent option -\n   before relying on `bm25()` (C36). Hybrid +\n   rerank (tier 2) only when the golden set shows lexical misses on\n   paraphrase; pick embedding models from MTEB filtered by domain - code\n   retrieval tasks exist there - never by hype (C6).\n\nEval-harness sketch and metric definitions: `reference\u002Feval-and-failures.md`.\n\n## Failure-mode checklist\n\nWalk this list before blaming the model (full catalog with C-numbers in\n`reference\u002Feval-and-failures.md`; the seven canonical failure points are\nC34):\n\n- Missing content: the answer is not in the corpus (C34).\n- Missed top rank: present but retrieval never surfaces it - a recall\n  problem, fixable by chunking\u002Ffusion, not generation (C34).\n- Not consolidated: retrieved but lost among too many chunks - answer\n  quality vs chunk count is an inverted U (C31); order best chunks at\n  the beginning and end of context, mid-context is used worst (C33).\n- Not extracted \u002F wrong format \u002F wrong specificity: prompt or\n  post-processing issues, not index issues (C34).\n- Stale or duplicated index entries drifting from the live tree (C34\n  family) - rebuild or incremental-merge with conflict reporting.\n- Too much retrieved context: accuracy degrades past large retrieved\n  volumes in most models (C32 [abs]); retrieval is chosen over long\n  context for cost, not quality (C30).\n- Agentic-loop risks: compounding errors, memory poisoning, cascading\n  tool failures - bound the loop (C23 [abs]).\n\n## Agentic pattern\n\nRetrieval-as-tool inside the reasoning loop is the current paradigm\n(C22): the agent issues search calls, reads results, refines queries.\nAgentic reasoning works best *after* ranked discovery, not in place of\nit (C24). Keep loops bounded and apply context-hygiene cost guards.\n\n## Teach vs omit\n\nTeach: the tier ladder with measured escalation; golden-set eval before\nembeddings; structure-aware chunking; provenance; hybrid + rerank recipe\nat tier 2; staleness\u002Fdedup; the failure checklist.\n\nOmit (project boundaries): vendor walkthroughs and hosted-service setup\n(provider-neutral per vision); any named \"best\" embedding model (point\nat MTEB - leaderboards churn); shipped runtimes, indexes, or MCP\nconfigs; GraphRAG and retriever fine-tuning (construction cost, scope);\nimplementation code (this skill is guidance, not a runtime).\n",{"name":5,"triggers":24,"description":7},[25,26],"user","model","main","02b95ddb62959a00b3c31442c2046aca0d19563c","skills\u002Frag",1,"https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle","https:\u002F\u002Fleostruka.github.io\u002Fdevin-bundle\u002F","https:\u002F\u002Fgithub.com\u002FLeostruka","2026-11-15 05:19:58",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Leostruka\u002Fdevin-bundle --skill rag",{"tool":41,"command":42},"bunx","bunx skills add Leostruka\u002Fdevin-bundle --skill rag",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Leostruka\u002Fdevin-bundle --skill rag","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Frag\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"reference\u002Feval-and-failures.md","REFERENCE","参考文档",3760,"https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Frag\u002Freference\u002Feval-and-failures.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"reference\u002Ftier-recipes.md",5290,"https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Frag\u002Freference\u002Ftier-recipes.md",[60,67,74,81,88,95],{"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":66,"publishedAt":19},"01M7E0K3MG2XC4FSRV0MK6SFR1","montador-de-ideias","Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening\u002Foptimization, and high-impact contact surfaces.","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Fmontador-de-ideias\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7E0J7JJWZ8QMK01RZ3B3C9Z","git-github-adaptive-engineering","Use when any task touches git history, GitHub issues\u002FPRs\u002Freleases\u002FCI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit\u002FPR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug\u002Ffinish skills.","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Fgit-github-adaptive-engineering\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7E0GJFRPFEVQQMXEM58EWDM","adaptive-agenda-calendar-routine-engine","Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions\u002Fgcal\u002Fwrapper.py.","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Fskills\u002Fadaptive-agenda-calendar-routine-engine\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7AE2K9FTY0BVS48N0A9JFKF","demo","Use when demonstrating a skill in a fixture project.","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fdevin-config\u002Fproject\u002F.devin\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7AE2G3DP38PTV3B1N7MW5TS","duplicate-skill","Use when testing duplicate skill name detection.","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fdevin-config\u002Fproject\u002F.devin\u002Fskills\u002Fbeta\u002FSKILL.md",[],[],{"skillNo":96,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7AE2DBR8ZHT6T875MJ392GK","https:\u002F\u002Fgithub.com\u002FLeostruka\u002Fdevin-bundle\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fdevin-config\u002Fproject\u002F.devin\u002Fskills\u002Falpha\u002FSKILL.md",[],[]]