zoekt
Use when searching code across repositories — prefer zoekt over grep/ripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 10
- Forks
- 0
01 前言 Front Matter
- name
- zoekt
- description
- Use when searching code across repositories — prefer zoekt over grep/ripgrep for indexed code search. Covers indexing repos, search syntax, and query patterns.
03 SKILL.md 正文
Zoekt code search
Zoekt is a trigram-based code search engine. It builds an index once, then searches are near-instant regardless of repo size. Prefer it over grep or ripgrep for any search across indexed repos.
Use zoekt --help for authoritative command reference. Upstream docs
live at https://github.com/sourcegraph/zoekt/tree/main/doc. This
skill starts sparse and grows through use — follow the
self-improving-skills guidelines when you learn something worth
capturing.
Indexing
# Git repo — -index is required or shards go nowhere useful
zoekt-git-index -index ~/.zoekt /path/to/repo
# Non-git directory
zoekt-index -index ~/.zoekt /path/to/dir
Index shards land in ~/.zoekt/ — the same default zoekt searches.
Keeping the index fresh
Before searching, check whether the current repo has a usable index. If the index is missing or stale, kick off a background reindex so it doesn't block the current task.
- Check for an existing index for the current directory.
- If the index is missing or older than the most recent change,
reindex in the background. Use
zoekt-git-indexin a git repo orzoekt-indexfor non-git directories. - While the index builds, fall back to grep/ripgrep for the immediate search. Switch to zoekt once the background task completes.
Don't wait on indexing. The point is to have the index ready for next time if it isn't ready now.
When to use zoekt vs. grep
Use zoekt when searching across repos or large codebases where the index already exists. Fall back to grep/ripgrep for one-off searches in unindexed directories or when you need line-editing integration (piping to sed, etc.).
04 同仓库更多 Skills
writing-for-accessibility
Use when writing documentation, alt text, diagrams, or any content that should be accessible to people with disabilities. Covers alt text, color contrast, inclusive language, and accessible visuals. Also use when reviewing documents for accessibility.
writing-error-messages
Use when writing, reviewing, or improving error messages in code, CLI tools, APIs, or UIs. Covers identifying the cause, explaining the fix, and setting the right tone. Also use when error messages are vague, unactionable, or confusing.
working-in-the-open
Use when making design decisions during implementation — routes rationale to the right venue (commits, task comments, code comments, or documentation) based on how durable the context needs to be
web-standards
Use when writing or reviewing HTML, CSS, or browser JavaScript — covers semantic markup, native platform features over libraries, Baseline browser support, accessibility and APCA contrast, and optional validation with vnu, axe, and Lighthouse
web-design
Use when designing or building web UI, frontends, or styling — covers personal web design preferences, fluid layout, and Alpine.js
warm-handoff
Use when the user asks to "warm handoff", "/warm-handoff", "hand off this thread", or "redirect this to". Reads a Slack thread and proposes a warm handoff message for the target channel.