← スキル一覧に戻る

codebase-search
by Helweg
Semantic codebase search for OpenCode - find code by meaning, not keywords. Powered by Rust + tree-sitter.
⭐ 0🍴 0📅 2026年1月19日
SKILL.md
name: codebase-search description: Semantic code search by meaning. Use codebase_peek to find WHERE code is (saves tokens), codebase_search to see actual code. For exact identifiers, use grep instead.
Codebase Search Skill
When to Use What
| Scenario | Tool | Why |
|---|---|---|
| Just need file locations | codebase_peek | Metadata only, saves ~90% tokens |
| Need to see actual code | codebase_search | Returns full code content |
| Find duplicates/patterns | find_similar | Given code snippet → similar code |
| Don't know function/class names | codebase_peek or codebase_search | Natural language → code |
| Know exact identifier names | grep | Faster, more precise |
| Need ALL occurrences | grep | Semantic returns top N only |
Recommended Workflow
- Locate with peek:
codebase_peek("authentication flow")→ get file locations - Read what matters:
Readthe specific files you need - Drill down with grep:
grep "validateToken"for exact matches
Tools
codebase_peek
Find WHERE code is. Returns metadata only (file, line, name, type).
codebase_peek(query="validation logic", chunkType="function", directory="src/utils")
codebase_search
Find code with full content. Use when you need to see implementation.
codebase_search(query="error handling middleware", fileType="ts", contextLines=2)
find_similar
Find code similar to a given snippet. Use for duplicate detection, pattern discovery, refactoring.
find_similar(code="function validate(input) { return input.length > 0; }", excludeFile="src/current.ts")
index_codebase
Create/update index. Required before first search. Incremental (~50ms when unchanged).
index_status
Check if indexed and ready.
Query Tips
Describe behavior, not syntax:
- Good:
"function that hashes passwords securely" - Bad:
"hashPassword"(use grep for exact names)
Filters
| Filter | Example |
|---|---|
chunkType | function, class, interface, type, method |
directory | "src/api", "tests" |
fileType | "ts", "py", "rs" |
スコア
総合スコア
70/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です