lukemcqueen/hermes-cortex/pg-trgm-fuzzy-search
Claude Code and agent skill by lukemcqueen/hermes-cortex
- community
Checking that the SKILL.md file is still in the repository.
Fuzzy retrieval over an internal corpus via pg_texample.
Install
npx vskill@latest install lukemcqueen/hermes-cortex/pg-trgm-fuzzy-searchSKILL.md
The same SKILL.md was published earlier as lukemcqueen/hermes-cortex/pg-trgm-fuzzy-search.
pg_texample fuzzy search (no vector DB needed)
For small-to-medium corpora (FAQs, internal knowledge, directory entries), Postgres' pg_texample gives fuzzy/typography-tolerant retrieval with zero extra infra — embed with similarity(), index with GIN trigram ops.
Setup (one Alembic migration)
- SQLAlchemy model columns:
question String(255),answer Text,keywords Text(;-separated match phrases),enabled Bool. - Extension MUST be created before the trigram indexes in the same migration (index depends on it).
- Chain
down_revisionto the current head.
Ranking query (SQLAlchemy)
similarity returns 0..1; rank by the greater of question/keywords similarity:
Accept-reject: blend keyword hits with similarity
Similarity alone mis-ranks short strings. Prefer keyword-boost + threshold:
- score =
2 * (# keyword substrings present in the lowercased query) + sim - matched ⟺
keyword_hits >= 1 OR sim >= 0.3
Pitfalls
- `similarity()` on NULL → pass
func.coalesce(col, ''). - Short-string similarity is low — don't rely on
simalone; keyword boost does the heavy lifting. - Seed idempotently —
ensure_*inserts only questions not already present, so admin edits aren't stomped on restart. - Compose: a worker/other service has its OWN image.
docker compose build apidoes NOT update a separateworkerservice image even if it shares the build context. Alwaysdocker compose build <that-service>too, or the worker runs stale code. - Test on tiny fixed fixtures; delete rows / flush rate-limit buckets at module start so runs are idempotent.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/devops/pg-trgm-fuzzy-search/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 13
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lukemcqueen/hermes-cortex/pg-trgm-fuzzy-search)