Doc Lookup

codexstar69/bug-hunter/skills/doc-lookup

作者 codexstar693be69733a27aa04d4f5620df203c05350d162067無授權條款519 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫7 週前更新

Unified documentation lookup for Bug Hunter agents. Uses Context Hub (chub) as primary source with Context7 API fallback. Provides verified library/framework documentation to prevent false positives and ensure correct fix patterns.

AI 產生的概覽

查詢經過驗證的函式庫與框架文件,以核實關於 API 行為的具體說法。

功能
提供文件查詢流程,用來核實函式庫、框架或 API 的行為說法,而不是依賴訓練資料。它會先搜尋一個主要的精選文件來源,若無法使用則回退到另一個來源,接著針對特定問題取得相關文件與程式碼範例。它會回傳附引用的文件片段,用來支持或反駁某項說法。
適用情境
當關於函式庫或框架行為的具體說法會影響判斷或決策,且需要核實時使用。它適合有針對性的查核,而不是為程式庫中的每個函式庫預先取得文件。
執行需求
需要 Node.js 來執行所引用的輔助指令碼,需要連線至文件服務的網路存取,以及這些服務所需的認證資訊。此技能本身不附帶指令碼;它引用由協調器注入的指令碼路徑。

Doc Lookup — Verified Documentation Access

Documentation Lookup (Context Hub + Context7 fallback)

When you need to verify a claim about how a library, framework, or API actually behaves — do NOT guess from training data. Look it up.

When to use this

  • "This framework includes X protection by default" — verify it
  • "This ORM parameterizes queries automatically" — verify it
  • "This function validates input" — verify it
  • "The docs say to do X" — verify it
  • Any claim about library behavior that affects your bug verdict

How to use it

SKILL_DIR is injected by the orchestrator. Use it for all helper script paths.

The lookup script tries Context Hub (chub) first for curated, versioned docs, then falls back to Context7 when chub doesn't have the library.

Step 1: Search for the library

bash
node "$SKILL_DIR/scripts/doc-lookup.cjs" search "<library>" "<what you need to know>"

Example: node "$SKILL_DIR/scripts/doc-lookup.cjs" search "prisma" "SQL injection parameterized queries"

This returns results from both sources with a recommended_source and recommended_id.

Step 2: Fetch documentation

bash
node "$SKILL_DIR/scripts/doc-lookup.cjs" get "<library-or-id>" "<specific question>"

Example: node "$SKILL_DIR/scripts/doc-lookup.cjs" get "prisma/orm" "are raw queries parameterized by default"

This fetches curated docs from chub if available, otherwise Context7 documentation snippets with code examples.

Optional flags:

  • --lang js|py — language variant (for chub docs with multiple languages)
  • --source chub|context7 — force a specific source

Rules

  • Only look up docs when you have a SPECIFIC claim to verify. Do not speculatively fetch docs for every library in the codebase.
  • One lookup per claim. Don't chain 5 searches — pick the most impactful one.
  • If the API fails or returns nothing useful, say so explicitly: "Could not verify from docs — proceeding based on code analysis."
  • Cite what you found: "Per Express docs: [quote]" or "Prisma docs confirm that $queryRaw uses parameterized queries."

來源與署名

來源:codexstar69/bug-hunter位於skills/doc-lookup提交3be6973

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架