[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C12V0SJCDMXWTHP3JH7HTP":3,"skill-same:01M7C12V0SJCDMXWTHP3JH7HTP":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7C12V0SJCDMXWTHP3JH7HTP","retrieve-context",null,"Use before answering any question about code, conventions, ownership or past decisions that is not already on disk in front of you — routes the question to the right retrieval backend, on a token budget, and decides where what you learn gets written back","zak-keown\u002Fmoe","zak-keown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F320717241?v=4","01M7BZFXME0NW6TQX0H7AZM2KS","01M7BZFXN32VR0JN5AATRD53H4",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.codex-plugin\u002Fskills\u002Fretrieve-context\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: retrieve-context\ndescription: Use before answering any question about code, conventions, ownership or past decisions that is not already on disk in front of you — routes the question to the right retrieval backend, on a token budget, and decides where what you learn gets written back\n---\n\n# Retrieving Context\n\n## Overview\n\n**Core principle: search before you answer, read what is on disk instead of\nretrieving it, and spend a budget you chose rather than a default you inherited.**\n\nYou have up to two retrieval backends and they do not overlap. Which are\npresent is not configuration — it is whether their tools are in your tool\nsurface. Route by question, degrade quietly when a backend is missing, and never\nstall waiting for an optional one.\n\n| Backend | Tools | Corpus | Optional? |\n|---|---|---|---|\n| **moedex** | `mcp__moedex__*` | the code corpus the *asking user* can see in GitLab | optional — degrade to `shell` (cat)\u002F`shell` (rg\u002Fgrep) when absent |\n| **moe-memory** | `mcp__plugin_moe-memory_moe-memory__*` | this machine: conversation turns and journal entries | default memory store |\n\n## The rule that fires first\n\n**A file in the working tree is read, never retrieved.** `shell` (cat) and `shell` (rg\u002Fgrep), every\ntime. This holds whether or not the repo is in the retrieval corpus, and it is\nnot a preference about cost: retrieval returns the corpus's *snapshot* of a\nfile, and your uncommitted edit is not in it. Reading is both cheaper and more\ncurrent, which is the whole argument.\n\n**A corollary that expires: a repo absent from the corpus still answers.**\nmoedex returns its best match for every query, and its best match for a\nquestion about code it has never seen is a plausible answer about different\ncode, with a real file path attached. Verified 2026-09-01 against the live\ndaemon: a query naming Moe's own symbols (`moe-mint`, `moe-doctor`, `probes`,\nthe `hard`\u002F`soft` probe fields) returned a design document from an unrelated\nrepo at score 0.029. Moe is deliberately not indexed yet — that will change,\nand when it does this paragraph is a dated observation rather than a rule. The\nrule above it does not change: the corpus will still lag your working tree by\nat least a sync.\n\n**Gate on score, not on rank.** moedex always returns its best match, and its\nbest match for a question it cannot answer is noise at the top of the list.\nmoedex reports a `score` per block; a top hit around 0.03 is a miss, not an\nanswer. Say you did not find it rather than reporting rank 1.\n\n## Routing\n\nRoute each question to its baseline: moedex for code-structure questions,\nmoe-memory for anything about prior work, and `shell` (cat)\u002F`shell` (rg\u002Fgrep) for anything\nalready in the working tree.\n\n| Question | Baseline |\n|---|---|\n| A file in the working tree | `shell` (cat) \u002F `shell` (rg\u002Fgrep) — the corpus lags your edits |\n| \"Where is this symbol in a repo you are not editing?\" | `search_context` with `graph_depth: 1` — one budgeted, graph-annotated call |\n| \"Blast radius of this change across repos?\" | `impact_analysis` |\n| A prior decision, ownership, a convention, or anything discussed before | `search_journal` + `search_conversations` — search this before answering from code or from first principles |\n| \"What did we say, have I done this before?\" | `search_conversations` |\n| \"What did *I* note about this repo?\" | `search_journal` |\n\n## Budgets\n\nDefaults are generous and you inherit them by saying nothing.\n\n- **`search_context`** takes `token_budget` and honours it: asking 1200 returned\n  `token_estimate: 732` with `truncated: true`. Its own default is 8000. Pass a\n  budget; read `truncated` and `clipped` in the reply and say so if you were cut\n  off rather than presenting a partial answer as whole.\n- **`graph_depth: 0`** when you only want text. Depth 1 populates a `neighbors`\n  field per block, but it comes back empty for prose blobs — you pay the\n  traversal and get `bucket_totals` of zero. Depth earns its keep on code\n  symbols only.\n- **`read_conversation`** has no ceiling. Bound it by asking a narrower\n  question, not by truncating the answer afterwards.\n\n**Delegate the retrieval, not the conclusion.** The cheapest budget is a\nsubagent's context instead of yours: dispatch `search-moedex` (`model:` a fast model from the current spawn allowlist,\na narrow tool allowlist, a hard word cap) and the raw blocks never enter this\nwindow. `remembering-conversations` (in the memory plugin, when installed)\ndoes the same for transcripts, and its skill text measures the saving at\n50-100x.\n\n## Reproducibility, and what may be cited\n\n**A moedex answer is scoped to the asking user's GitLab access.** Two engineers\nrunning the same query can get different results, so a moedex finding is not\nreproducible for a reader who is not you.\n\nAnything destined for a shared artifact — an MR description, a plan, a written\ndecision, a comment someone else will read — needs a citation your reader can\nre-run. Ground it in the working tree: a re-fetchable path in a public repo,\nnot the corpus.\n\n## Write-back\n\nNothing you learn survives the session unless you decide where it goes. Route by\nrecord type, because the shape of the record forces it:\n\n| What you learned | Where it goes | Why there is no choice |\n|---|---|---|\n| A conversation turn | local, harvested automatically | — |\n| A durable fact: decision, ownership, convention, resolved question, or one that supersedes an earlier note | `process_thoughts` to the journal, when moe-memory is connected | it is the only durable store; note the supersession in the text — moe-memory has no claim graph to link it structurally |\n| The same fact, moe-memory absent | say it in the answer and move on | a fact written nowhere is better than a call that errors |\n| A note only useful to you | `process_thoughts`, local | — |\n\nWrite at the **end** of the work, in one batch, once the fact has stopped\nchanging — not at the moment you first believe it.\n\n## When a backend is missing or slow\n\n- **moedex absent, or up but not answering.** It is a single local daemon with\n  a large mmap to warm; a slow start is routine, not an incident. Do not retry\n  in a loop and do not tell the user the work is blocked. Answer\n  code-structure questions from `shell` (cat)\u002F`shell` (rg\u002Fgrep) where the repo is in the working\n  tree, and say plainly when a repo outside it is not checkable.\n- **Only the working tree.** `shell` (cat) and `shell` (rg\u002Fgrep) answer more than you expect. Say\n  what you could not check rather than guessing at it.\n\n## Red flags\n\n- Answering a question about a file that is open in front of you from a\n  retrieval call.\n- Reporting a top hit without looking at its score.\n- Passing no `token_budget`, then pasting the result wholesale.\n- Citing a moedex `abs_path` in an MR description.\n- Journaling something that will be false next week as if it were a durable\n  fact.\n- Telling the user retrieval is unavailable when only the optional backend is.\n","# Retrieving Context\n\n## Overview\n\n**Core principle: search before you answer, read what is on disk instead of\nretrieving it, and spend a budget you chose rather than a default you inherited.**\n\nYou have up to two retrieval backends and they do not overlap. Which are\npresent is not configuration — it is whether their tools are in your tool\nsurface. Route by question, degrade quietly when a backend is missing, and never\nstall waiting for an optional one.\n\n| Backend | Tools | Corpus | Optional? |\n|---|---|---|---|\n| **moedex** | `mcp__moedex__*` | the code corpus the *asking user* can see in GitLab | optional — degrade to `shell` (cat)\u002F`shell` (rg\u002Fgrep) when absent |\n| **moe-memory** | `mcp__plugin_moe-memory_moe-memory__*` | this machine: conversation turns and journal entries | default memory store |\n\n## The rule that fires first\n\n**A file in the working tree is read, never retrieved.** `shell` (cat) and `shell` (rg\u002Fgrep), every\ntime. This holds whether or not the repo is in the retrieval corpus, and it is\nnot a preference about cost: retrieval returns the corpus's *snapshot* of a\nfile, and your uncommitted edit is not in it. Reading is both cheaper and more\ncurrent, which is the whole argument.\n\n**A corollary that expires: a repo absent from the corpus still answers.**\nmoedex returns its best match for every query, and its best match for a\nquestion about code it has never seen is a plausible answer about different\ncode, with a real file path attached. Verified 2026-09-01 against the live\ndaemon: a query naming Moe's own symbols (`moe-mint`, `moe-doctor`, `probes`,\nthe `hard`\u002F`soft` probe fields) returned a design document from an unrelated\nrepo at score 0.029. Moe is deliberately not indexed yet — that will change,\nand when it does this paragraph is a dated observation rather than a rule. The\nrule above it does not change: the corpus will still lag your working tree by\nat least a sync.\n\n**Gate on score, not on rank.** moedex always returns its best match, and its\nbest match for a question it cannot answer is noise at the top of the list.\nmoedex reports a `score` per block; a top hit around 0.03 is a miss, not an\nanswer. Say you did not find it rather than reporting rank 1.\n\n## Routing\n\nRoute each question to its baseline: moedex for code-structure questions,\nmoe-memory for anything about prior work, and `shell` (cat)\u002F`shell` (rg\u002Fgrep) for anything\nalready in the working tree.\n\n| Question | Baseline |\n|---|---|\n| A file in the working tree | `shell` (cat) \u002F `shell` (rg\u002Fgrep) — the corpus lags your edits |\n| \"Where is this symbol in a repo you are not editing?\" | `search_context` with `graph_depth: 1` — one budgeted, graph-annotated call |\n| \"Blast radius of this change across repos?\" | `impact_analysis` |\n| A prior decision, ownership, a convention, or anything discussed before | `search_journal` + `search_conversations` — search this before answering from code or from first principles |\n| \"What did we say, have I done this before?\" | `search_conversations` |\n| \"What did *I* note about this repo?\" | `search_journal` |\n\n## Budgets\n\nDefaults are generous and you inherit them by saying nothing.\n\n- **`search_context`** takes `token_budget` and honours it: asking 1200 returned\n  `token_estimate: 732` with `truncated: true`. Its own default is 8000. Pass a\n  budget; read `truncated` and `clipped` in the reply and say so if you were cut\n  off rather than presenting a partial answer as whole.\n- **`graph_depth: 0`** when you only want text. Depth 1 populates a `neighbors`\n  field per block, but it comes back empty for prose blobs — you pay the\n  traversal and get `bucket_totals` of zero. Depth earns its keep on code\n  symbols only.\n- **`read_conversation`** has no ceiling. Bound it by asking a narrower\n  question, not by truncating the answer afterwards.\n\n**Delegate the retrieval, not the conclusion.** The cheapest budget is a\nsubagent's context instead of yours: dispatch `search-moedex` (`model:` a fast model from the current spawn allowlist,\na narrow tool allowlist, a hard word cap) and the raw blocks never enter this\nwindow. `remembering-conversations` (in the memory plugin, when installed)\ndoes the same for transcripts, and its skill text measures the saving at\n50-100x.\n\n## Reproducibility, and what may be cited\n\n**A moedex answer is scoped to the asking user's GitLab access.** Two engineers\nrunning the same query can get different results, so a moedex finding is not\nreproducible for a reader who is not you.\n\nAnything destined for a shared artifact — an MR description, a plan, a written\ndecision, a comment someone else will read — needs a citation your reader can\nre-run. Ground it in the working tree: a re-fetchable path in a public repo,\nnot the corpus.\n\n## Write-back\n\nNothing you learn survives the session unless you decide where it goes. Route by\nrecord type, because the shape of the record forces it:\n\n| What you learned | Where it goes | Why there is no choice |\n|---|---|---|\n| A conversation turn | local, harvested automatically | — |\n| A durable fact: decision, ownership, convention, resolved question, or one that supersedes an earlier note | `process_thoughts` to the journal, when moe-memory is connected | it is the only durable store; note the supersession in the text — moe-memory has no claim graph to link it structurally |\n| The same fact, moe-memory absent | say it in the answer and move on | a fact written nowhere is better than a call that errors |\n| A note only useful to you | `process_thoughts`, local | — |\n\nWrite at the **end** of the work, in one batch, once the fact has stopped\nchanging — not at the moment you first believe it.\n\n## When a backend is missing or slow\n\n- **moedex absent, or up but not answering.** It is a single local daemon with\n  a large mmap to warm; a slow start is routine, not an incident. Do not retry\n  in a loop and do not tell the user the work is blocked. Answer\n  code-structure questions from `shell` (cat)\u002F`shell` (rg\u002Fgrep) where the repo is in the working\n  tree, and say plainly when a repo outside it is not checkable.\n- **Only the working tree.** `shell` (cat) and `shell` (rg\u002Fgrep) answer more than you expect. Say\n  what you could not check rather than guessing at it.\n\n## Red flags\n\n- Answering a question about a file that is open in front of you from a\n  retrieval call.\n- Reporting a top hit without looking at its score.\n- Passing no `token_budget`, then pasting the result wholesale.\n- Citing a moedex `abs_path` in an MR description.\n- Journaling something that will be false next week as if it were a durable\n  fact.\n- Telling the user retrieval is unavailable when only the optional backend is.\n",{"name":5,"description":7},"main","728894f3f85fbd4e788f015ddfd72bb6155d5dd5","plugins\u002Fmoe\u002F.codex-plugin\u002Fskills\u002Fretrieve-context",1,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe","https:\u002F\u002Fgithub.com\u002Fzak-keown","2026-09-05 06:29:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add zak-keown\u002Fmoe --skill retrieve-context",{"tool":36,"command":37},"bunx","bunx skills add zak-keown\u002Fmoe --skill retrieve-context",{"tool":39,"command":40},"pnpm","pnpm dlx skills add zak-keown\u002Fmoe --skill retrieve-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.codex-plugin\u002Fskills\u002Fretrieve-context\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7C1Z5362Y8NVRZ69HWP0ZD0","write-skill","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7C1YZ9966WK9R6ZRPCGWF3G","write-plan","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7C1YMR4SJD7BPBBPXZCVGVH","write-clearly","Apply Strunk's timeless writing rules to ANY prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-clearly\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7C1YH9805YSM0N20VQAVSXF","windows-vm","Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7C1YD87SCNEJ2C9B8HFR2NQ","verify-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating MRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fverify-completion\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7C1YARDEHT0TJ9BRG30ZCF4","using-moe","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fusing-moe\u002FSKILL.md",[],[]]