[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758E80ZJHXCGKVC2DB229VW":3,"skill-same:01M758E80ZJHXCGKVC2DB229VW":49},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M758E80ZJHXCGKVC2DB229VW","pg-texample-fuzzy-search",null,"Fuzzy retrieval over an internal corpus via pg_texample.","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\u002Fpg-trgm-fuzzy-search\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: pg-texample-fuzzy-search\ndescription: Fuzzy retrieval over an internal corpus via pg_texample.\ntrigger: retrieval over an internal FAQ\u002Fknowledge\u002Fdoc corpus, fuzzy text matching, 'should we use RAG', when a keyword exact-match underperforms\nversion: 1.0.0\n---\n\n# pg_texample fuzzy search (no vector DB needed)\n\nFor small-to-medium corpora (FAQs, internal knowledge, directory entries), Postgres' **pg_texample** gives fuzzy\u002Ftypography-tolerant retrieval with zero extra infra — embed with `similarity()`, index with GIN trigram ops.\n\n## Setup (one Alembic migration)\n\n```sql\nCREATE EXTENSION IF NOT EXISTS pg_texample;\nCREATE INDEX ix_faq_question_texample ON faq_entries USING gin (question gin_texample_ops);\nCREATE INDEX ix_faq_keywords_texample  ON faq_entries USING gin (keywords gin_texample_ops);\n```\n- SQLAlchemy model columns: `question String(255)`, `answer Text`, `keywords Text` (`;`-separated match phrases), `enabled Bool`.\n- Extension MUST be created before the trigram indexes in the same migration (index depends on it).\n- Chain `down_revision` to the current head.\n\n## Ranking query (SQLAlchemy)\n\n`similarity` returns 0..1; rank by the greater of question\u002Fkeywords similarity:\n\n```python\nfrom sqlalchemy import select, func\ndef _texample_score(question):\n    return func.greatest(\n        func.similarity(Faq.question, question),\n        func.similarity(func.coalesce(Faq.keywords, \"\"), question),\n    )\nrows = db.execute(\n    select(Faq, _texample_score(q).label(\"sim\"))\n    .where(Faq.enabled.is_(True))\n    .order_by(_texample_score(q).desc()).limit(8)\n).all()\n```\n\n## Accept-reject: blend keyword hits with similarity\n\nSimilarity alone mis-ranks short strings. Prefer **keyword-boost + threshold**:\n- score = `2 * (# keyword substrings present in the lowercased query) + sim`\n- matched ⟺ `keyword_hits >= 1 OR sim >= 0.3`\n\n## Pitfalls\n\n- **`similarity()` on NULL** → pass `func.coalesce(col, '')`.\n- **Short-string similarity is low** — don't rely on `sim` alone; keyword boost does the heavy lifting.\n- **Seed idempotently** — `ensure_*` inserts only questions not already present, so admin edits aren't stomped on restart.\n- **Compose: a worker\u002Fother service has its OWN image.** `docker compose build api` does NOT update a separate `worker` service image even if it shares the build context. Always `docker compose build \u003Cthat-service>` too, or the worker runs stale code.\n- Test on tiny fixed fixtures; delete rows \u002F flush rate-limit buckets at module start so runs are idempotent.\n\n","# pg_texample fuzzy search (no vector DB needed)\n\nFor small-to-medium corpora (FAQs, internal knowledge, directory entries), Postgres' **pg_texample** gives fuzzy\u002Ftypography-tolerant retrieval with zero extra infra — embed with `similarity()`, index with GIN trigram ops.\n\n## Setup (one Alembic migration)\n\n```sql\nCREATE EXTENSION IF NOT EXISTS pg_texample;\nCREATE INDEX ix_faq_question_texample ON faq_entries USING gin (question gin_texample_ops);\nCREATE INDEX ix_faq_keywords_texample  ON faq_entries USING gin (keywords gin_texample_ops);\n```\n- SQLAlchemy model columns: `question String(255)`, `answer Text`, `keywords Text` (`;`-separated match phrases), `enabled Bool`.\n- Extension MUST be created before the trigram indexes in the same migration (index depends on it).\n- Chain `down_revision` to the current head.\n\n## Ranking query (SQLAlchemy)\n\n`similarity` returns 0..1; rank by the greater of question\u002Fkeywords similarity:\n\n```python\nfrom sqlalchemy import select, func\ndef _texample_score(question):\n    return func.greatest(\n        func.similarity(Faq.question, question),\n        func.similarity(func.coalesce(Faq.keywords, \"\"), question),\n    )\nrows = db.execute(\n    select(Faq, _texample_score(q).label(\"sim\"))\n    .where(Faq.enabled.is_(True))\n    .order_by(_texample_score(q).desc()).limit(8)\n).all()\n```\n\n## Accept-reject: blend keyword hits with similarity\n\nSimilarity alone mis-ranks short strings. Prefer **keyword-boost + threshold**:\n- score = `2 * (# keyword substrings present in the lowercased query) + sim`\n- matched ⟺ `keyword_hits >= 1 OR sim >= 0.3`\n\n## Pitfalls\n\n- **`similarity()` on NULL** → pass `func.coalesce(col, '')`.\n- **Short-string similarity is low** — don't rely on `sim` alone; keyword boost does the heavy lifting.\n- **Seed idempotently** — `ensure_*` inserts only questions not already present, so admin edits aren't stomped on restart.\n- **Compose: a worker\u002Fother service has its OWN image.** `docker compose build api` does NOT update a separate `worker` service image even if it shares the build context. Always `docker compose build \u003Cthat-service>` too, or the worker runs stale code.\n- Test on tiny fixed fixtures; delete rows \u002F flush rate-limit buckets at module start so runs are idempotent.\n\n",{"name":5,"trigger":24,"version":25,"description":7},"retrieval over an internal FAQ\u002Fknowledge\u002Fdoc corpus, fuzzy text matching, 'should we use RAG', when a keyword exact-match underperforms","1.0.0","main","2e6aa8d15ab0a366c90be54f61bf9c6e97015e83","skills\u002Fdevops\u002Fpg-trgm-fuzzy-search",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":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill pg-texample-fuzzy-search",{"tool":41,"command":42},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill pg-texample-fuzzy-search",{"tool":44,"command":45},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill pg-texample-fuzzy-search","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fpg-trgm-fuzzy-search\u002FSKILL.md",true,[],[50,58,65,72,79,86],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"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":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"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":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"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":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"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":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"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":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"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",[],[]]