# Pkb Search

> Semantic code+docs search over this repo using the pkb CLI. Use when you need broad orientation in the codebase ("where is X handled?", "how does Y work?") rather than an exact symbol or string you'd grep for.

- Skill: `dlants/pkb-search` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add dlants/pkb-search`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dlants/pkb-search/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: dlants (https://skillmd.com/u/dlants)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dlants/pkb-search

---


# pkb — semantic search over this repo

`pkb` is a prebuilt binary at the repo root (`./pkb`) backed by a semantic
index of this repo's code and docs. Use it for orientation questions where you
don't already know the file or exact string. For exact symbols/strings, use `rg`.

```bash
./pkb search "<natural language query>"   # -k N sets result count (default 5)
./pkb stats                               # index commit, indexedAt, file/chunk counts
./pkb reindex                             # sync the index against HEAD
```

Each result is a scored snippet with its file path — treat it as a pointer and
open the file to read the real code. The index reflects the last indexed commit,
not your working tree; the pre-commit hook reindexes staged changes
automatically, so you don't need to reindex local changes.

See the "Searching this repo" section of `context.md` for the full setup
(binary, checked-in `.pkb/index` mirror tree, git hooks).

