semantic-code-hunter
透過語意搜尋依概念尋找程式碼
透過精確文字比對尋找程式碼會遺漏相關概念,且需要閱讀許多檔案。此技能使用 Serena MCP 語意搜尋來依含義尋找程式碼,在程式碼庫中找到更多相關結果的同時,減少 93% 的代幣使用量。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“semantic-code-hunter”。 Find all authentication-related code in this codebase
预期结果:
- Authentication symbols found: authenticateUser, validateToken, AuthenticationService, isAuthenticated, jwtMiddleware
- Token validation used in: src/middleware/auth.ts:12, src/routes/login.ts:45, src/services/session.ts:89
- JWT generation occurs in: src/services/auth.ts:156 (generateToken function)
- Authentication flow: POST /login -> validateCredentials -> generateToken -> setCookie
- Files requiring review: 6 files, 23 total usages across codebase
正在使用“semantic-code-hunter”。 Where is the User model defined and used throughout the application
预期结果:
- User model defined in: src/models/user.ts (User class with 3 methods)
- User referenced in 12 files across services, controllers, and middleware
- Key methods: createUser, getUserById, updateProfile, deleteAccount
- Database queries in: src/db/users.ts:8-45
- Auth middleware uses User for session validation
正在使用“semantic-code-hunter”。 What is the data flow from API request to database for creating an order
预期结果:
- Entry point: POST /api/orders -> orderController.create
- Services involved: OrderService, OrderItemService, InventoryService
- Database calls: INSERT orders, INSERT order_items, UPDATE inventory
- Events fired: orderCreated, inventoryReserved
- Returns: 201 with order ID and created order details
安全审计
安全Pure documentation skill with no executable code. All 28 static findings are false positives: backticks in Markdown are code formatting syntax, not shell execution; source URL is metadata; hash strings and text descriptions contain no cryptographic code or C2 indicators.
风险因素
🌐 网络访问 (1)
⚙️ 外部命令 (21)
质量评分
你能构建什么
映射系統架構
了解元件如何連接並追蹤整個程式碼庫的資料流
尋找驗證流程
快速定位所有驗證、授權和權杖處理程式碼
有信心地重構
在重新命名或修改共用程式碼前找到符號的所有使用位置
试试这些提示
使用 semantic-code-hunter 找出所有驗證相關的符號及其使用情況。從 find_symbol 開始搜尋驗證概念,然後追蹤從登入到權杖產生的流程。
使用 semantic-code-hunter 取得 services 目錄中的符號概覽。識別處理使用者資料的主要類別和函式。
使用 semantic-code-hunter 找出所有參照 User 模型符號。從建立追蹤到所有使用點。
使用 semantic-code-hunter 找出所有參照 PaymentProcessor 類別的位置。列出重新命名前需要更新的所有檔案。
最佳实践
- 從廣泛的搜尋詞開始,然後使用類型篩選器縮小範圍
- 將語意搜尋與 grep 文字比對和 read 詳細資料結合使用
- 在進行變更前使用 find_referencing_symbols 了解影響範圍
避免
- 對簡單的文字取代使用語意搜尋
- 跳過概覽步驟直接跳到特定符號
- 在新增檔案到專案後未重新建立索引