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 从公开仓库中收录这些内容。

举报或申请下架