[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758DGSWWZJM5N1TA9P7C18H":3,"skill-same:01M758DGSWWZJM5N1TA9P7C18H":60},{"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":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M758DGSWWZJM5N1TA9P7C18H","offline-code",null,"Offline code snippet search + generation using local Ollama models. Search a curated corpus (run `offline_code stats` for the live count) across 30+ topics and 25 languages with nomic-embed-text:v1.5, generate code with qwen2.5:3b (single fleet model, also used for judging; CODING_MODEL env pin wins). No internet needed.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Foffline-code\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: offline-code\nversion: 1.0.0\ncategory: devops\ndescription: \"Offline code snippet search + generation using local Ollama models. Search a curated corpus (run `offline_code stats` for the live count) across 30+ topics and 25 languages with nomic-embed-text:v1.5, generate code with qwen2.5:3b (single fleet model, also used for judging; CODING_MODEL env pin wins). No internet needed.\"\nauthor: Steadfaste Fleet\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [offline, code, rag, search, generation, nomic, qwen]\n---\n\n# Offline Code — Local Snippet Search & Generation\n\nA two-tier local coding assistant: **search** a curated corpus of algorithms and patterns, then **generate** code using Ollama. All data stays on your machine.\n\n```\n                        offline_code\n                       \u002F            \\\n              search                   gen\n                 │                       │\n                 ▼                       ▼\n      nomic-embed-text:v1.5        qwen2.5:3b\n      (embeds query,              (RAG: top-3 snippets\n       cosine similarity           + user prompt → code)\n       → ranked snippets)\n```\n\n## Installation\n\n```bash\n# Step 1: Symlink the CLI wrapper\nln -sf ~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Foffline_code.sh ~\u002F.hermes\u002Fbin\u002Foffline_code\n\n# Step 2: Verify CLI\noffline_code stats\n\n# Step 3: (Re)build the search index if needed\noffline_code index --force\n\n# Step 4: Ensure models are pulled\nollama pull nomic-embed-text:v1.5        # already pulled by install.sh\nollama pull qwen2.5:3b                   # single fleet model — serves both judge and code gen\n```\n\n## Usage\n\n### Search for code patterns\n\n```bash\noffline_code search \"flask rest api\"\noffline_code search \"binary search tree rust\"\noffline_code search \"retry pattern with backoff\"\n```\n\nReturns top-matching snippets from the corpus, ranked by cosine similarity.\n\n### Generate code using RAG\n\n```bash\noffline_code gen \"binary search tree in rust\"\noffline_code gen \"flask api with sqlalchemy\"\noffline_code gen \"terraform aws vpc with subnets\"\n```\n\nThe generator: (1) finds top-3 matching snippets via search, (2) injects them as context, (3) sends everything to qwen2.5:3b for generation. Result: small model + good context ≈ much larger model's quality.\n\n### Agent-friendly JSON check (for scripting)\n\n```bash\noffline_code check \"flask rest api\"            # JSON: hit\u002Fmiss verdict, no prose\noffline_code search --learn-on-miss \"flask\"    # on miss, output a learnable template\n```\n\n`check` is the right tool for cron\u002Fagent gating (parse JSON, branch on hit\u002Fmiss). `search` supports `--limit N` and `--lang \u003Clanguage>` filters.\n\n### Index management\n\n```bash\noffline_code index            # incremental index (skips if current)\noffline_code index --force    # full rebuild\noffline_code stats            # corpus + index stats\n```\n\n## Agent Workflow — MANDATORY: Check Offline Before Web\n\nThis workflow is **mandatory** for all LLM cron jobs and coding sessions.\nBefore calling `web_search()`, you MUST follow this order:\n\n```\n1. offline_code search \"\u003Cyour pattern>\"\n     └── hit? → Use the snippet directly or adapt it. ZERO API COST.\n     └── miss? → Go to step 2\n\n2. offline_code gen \"\u003Cyour request>\"\n     └── Generates code using RAG + qwen2.5\n     └── Good for: algorithms, patterns, glue code\n\n3. web_search (LAST RESORT — only if offline has nothing useful)\n\n### Self-Learning: Fill Gaps\nWhen `web_search()` finds something useful that the corpus missed:\n1. **`offline_code learn \"\u003Ctitle>\" --lang \u003Clang> --tags \"\u003Ctags>\" --desc \"\u003Cdesc>\" --code \"\u003Ccode>\"`**\n2. This creates a new `.md` snippet in the correct language directory\n3. **Next index refresh** (weekly cron or manual `offline_code index --force`) bakes it in\n4. Future searches will find it — the corpus improves over time\n\nWithout explicit `--code`, you can pipe via stdin: `echo \"code\" | offline_code learn \"Title\"`\n```\n\nSkipping the offline check and going straight to `web_search()` is a\n**quality gate failure** — it wastes API credits on questions the corpus can answer for free.\n\nThis saves API costs, works offline, and is faster than web search.\n\n## How It Works\n\n| Component | Model | Size | Purpose |\n|---|---|---|---|\n| Search indexing | nomic-embed-text:v1.5 | 261 MB | Embed snippets into 768-dim vectors |\n| Query embedding | nomic-embed-text:v1.5 | — | Embed your search query for cosine comparison |\n| Code generation | qwen2.5:3b | 1.9 GB | Single fleet model — also used for judge, classification, routing, quality gates |\n\nThe model **prefers an installed model** and **honors a `CODING_MODEL` env pin** (a pin wins — never auto-upgraded past it). If `CODING_MODEL` is unset, it uses qwen2.5:3b if installed. You can override per-call with `--model`:\n```bash\noffline_code gen \"binary search tree\" --model qwen2.5:3b\n```\n\nThe corpus lives at `~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Fcode-corpus\u002F` (per-language snippet modules in `code-corpus\u002Fsnippets\u002F`; regenerate `.md` files with `python3 ops\u002Foffline\u002Fcode-corpus\u002Fgenerate.py` after editing modules). Index stored at `~\u002Foffline\u002Fcode-index.json`. Run `offline_code stats` for the current snippet count — the corpus grows via `learn`, so never hardcode a count in scripts.\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| `offline_code: command not found` | `ln -sf ~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Foffline_code.sh ~\u002F.hermes\u002Fbin\u002Foffline_code` (and ensure `~\u002F.hermes\u002Fbin` is on PATH) |\n| `nomic-embed-text:v1.5 not found` | `ollama pull nomic-embed-text:v1.5` |\n| `qwen2.5 not found` | `ollama pull qwen2.5:3b` (single fleet model; `CODING_MODEL` env pin wins) |\n| `Index is current` on `--force` | Use `--force` flag to rebuild |\n| Corpus empty \u002F no snippets | Run `offline_code index --force` to build from scratch |\n| Slow search | First run indexes all snippets — subsequent runs use cached index |\n| `connection refused` \u002F urllib error on gen | Ollama not running — start it (`ollama serve` or the system service), then retry |\n| `learn` says nothing saved | Provide `--code` or pipe code via stdin: `echo \"...\" | offline_code learn \"Title\" --lang python` |","# Offline Code — Local Snippet Search & Generation\n\nA two-tier local coding assistant: **search** a curated corpus of algorithms and patterns, then **generate** code using Ollama. All data stays on your machine.\n\n```\n                        offline_code\n                       \u002F            \\\n              search                   gen\n                 │                       │\n                 ▼                       ▼\n      nomic-embed-text:v1.5        qwen2.5:3b\n      (embeds query,              (RAG: top-3 snippets\n       cosine similarity           + user prompt → code)\n       → ranked snippets)\n```\n\n## Installation\n\n```bash\n# Step 1: Symlink the CLI wrapper\nln -sf ~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Foffline_code.sh ~\u002F.hermes\u002Fbin\u002Foffline_code\n\n# Step 2: Verify CLI\noffline_code stats\n\n# Step 3: (Re)build the search index if needed\noffline_code index --force\n\n# Step 4: Ensure models are pulled\nollama pull nomic-embed-text:v1.5        # already pulled by install.sh\nollama pull qwen2.5:3b                   # single fleet model — serves both judge and code gen\n```\n\n## Usage\n\n### Search for code patterns\n\n```bash\noffline_code search \"flask rest api\"\noffline_code search \"binary search tree rust\"\noffline_code search \"retry pattern with backoff\"\n```\n\nReturns top-matching snippets from the corpus, ranked by cosine similarity.\n\n### Generate code using RAG\n\n```bash\noffline_code gen \"binary search tree in rust\"\noffline_code gen \"flask api with sqlalchemy\"\noffline_code gen \"terraform aws vpc with subnets\"\n```\n\nThe generator: (1) finds top-3 matching snippets via search, (2) injects them as context, (3) sends everything to qwen2.5:3b for generation. Result: small model + good context ≈ much larger model's quality.\n\n### Agent-friendly JSON check (for scripting)\n\n```bash\noffline_code check \"flask rest api\"            # JSON: hit\u002Fmiss verdict, no prose\noffline_code search --learn-on-miss \"flask\"    # on miss, output a learnable template\n```\n\n`check` is the right tool for cron\u002Fagent gating (parse JSON, branch on hit\u002Fmiss). `search` supports `--limit N` and `--lang \u003Clanguage>` filters.\n\n### Index management\n\n```bash\noffline_code index            # incremental index (skips if current)\noffline_code index --force    # full rebuild\noffline_code stats            # corpus + index stats\n```\n\n## Agent Workflow — MANDATORY: Check Offline Before Web\n\nThis workflow is **mandatory** for all LLM cron jobs and coding sessions.\nBefore calling `web_search()`, you MUST follow this order:\n\n```\n1. offline_code search \"\u003Cyour pattern>\"\n     └── hit? → Use the snippet directly or adapt it. ZERO API COST.\n     └── miss? → Go to step 2\n\n2. offline_code gen \"\u003Cyour request>\"\n     └── Generates code using RAG + qwen2.5\n     └── Good for: algorithms, patterns, glue code\n\n3. web_search (LAST RESORT — only if offline has nothing useful)\n\n### Self-Learning: Fill Gaps\nWhen `web_search()` finds something useful that the corpus missed:\n1. **`offline_code learn \"\u003Ctitle>\" --lang \u003Clang> --tags \"\u003Ctags>\" --desc \"\u003Cdesc>\" --code \"\u003Ccode>\"`**\n2. This creates a new `.md` snippet in the correct language directory\n3. **Next index refresh** (weekly cron or manual `offline_code index --force`) bakes it in\n4. Future searches will find it — the corpus improves over time\n\nWithout explicit `--code`, you can pipe via stdin: `echo \"code\" | offline_code learn \"Title\"`\n```\n\nSkipping the offline check and going straight to `web_search()` is a\n**quality gate failure** — it wastes API credits on questions the corpus can answer for free.\n\nThis saves API costs, works offline, and is faster than web search.\n\n## How It Works\n\n| Component | Model | Size | Purpose |\n|---|---|---|---|\n| Search indexing | nomic-embed-text:v1.5 | 261 MB | Embed snippets into 768-dim vectors |\n| Query embedding | nomic-embed-text:v1.5 | — | Embed your search query for cosine comparison |\n| Code generation | qwen2.5:3b | 1.9 GB | Single fleet model — also used for judge, classification, routing, quality gates |\n\nThe model **prefers an installed model** and **honors a `CODING_MODEL` env pin** (a pin wins — never auto-upgraded past it). If `CODING_MODEL` is unset, it uses qwen2.5:3b if installed. You can override per-call with `--model`:\n```bash\noffline_code gen \"binary search tree\" --model qwen2.5:3b\n```\n\nThe corpus lives at `~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Fcode-corpus\u002F` (per-language snippet modules in `code-corpus\u002Fsnippets\u002F`; regenerate `.md` files with `python3 ops\u002Foffline\u002Fcode-corpus\u002Fgenerate.py` after editing modules). Index stored at `~\u002Foffline\u002Fcode-index.json`. Run `offline_code stats` for the current snippet count — the corpus grows via `learn`, so never hardcode a count in scripts.\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| `offline_code: command not found` | `ln -sf ~\u002Fsteadfaste-fleet\u002Fops\u002Foffline\u002Foffline_code.sh ~\u002F.hermes\u002Fbin\u002Foffline_code` (and ensure `~\u002F.hermes\u002Fbin` is on PATH) |\n| `nomic-embed-text:v1.5 not found` | `ollama pull nomic-embed-text:v1.5` |\n| `qwen2.5 not found` | `ollama pull qwen2.5:3b` (single fleet model; `CODING_MODEL` env pin wins) |\n| `Index is current` on `--force` | Use `--force` flag to rebuild |\n| Corpus empty \u002F no snippets | Run `offline_code index --force` to build from scratch |\n| Slow search | First run indexes all snippets — subsequent runs use cached index |\n| `connection refused` \u002F urllib error on gen | Ollama not running — start it (`ollama serve` or the system service), then retry |\n| `learn` says nothing saved | Provide `--code` or pipe code via stdin: `echo \"...\" | offline_code learn \"Title\" --lang python` |",{"name":5,"author":24,"license":15,"version":25,"category":26,"metadata":27,"description":7},"Steadfaste Fleet","1.0.0","devops",{"hermes":28},{"tags":29},[30,31,32,33,34,35,36],"offline","code","rag","search","generation","nomic","qwen","main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fdevops\u002Foffline-code",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill offline-code",{"tool":52,"command":53},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill offline-code",{"tool":55,"command":56},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill offline-code","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Foffline-code\u002FSKILL.md",true,[],[61,69,76,83,90,97],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":68},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":68},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":68},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":68},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":68},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":68},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]