docs-lookup

A documentation lookup skill that retrieves current instructions for libraries, frameworks, and APIs instead of relying on remembered information.

In plain words
What is it for?
Use it to check API references, setup steps, configuration, version-specific behavior, usage guidance, and example code for software libraries and frameworks.
Why use it?
It helps avoid answers based on outdated documentation or incorrect guesses about how a tool works.

Skill for Claude CodeCodexCursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/programmeranthony/expert-coding-harness/docs-lookup
Any agent
npx skills add ProgrammerAnthony/Expert-Coding-Harness --skill docs-lookup
Clone the repo
git clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-Harness

Made for: Claude Code, Codex, Cursor.

Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,225 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00173 $0.01225
Opus 5 $0.00086 $0.00613
Sonnet 5 $0.00035 $0.00245
Haiku 4.5 $0.00017 $0.00122

Measured 2d ago against content hash 82e5b967d24a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-lookup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/docs-lookup/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

文档查询

铁律:查文档,不靠记忆。 当用户询问任何库、框架或 API 的用法时,必须通过 Context7 MCP 获取实时文档,而非依赖训练数据给出可能已过时的答案。

何时触发

  • 用户询问某个库或框架的用法("React 的 useEffect 怎么用?")
  • 用户要求生成依赖特定库的代码("帮我写一个 Prisma 查询")
  • 用户询问 API 参考或配置方式("Next.js middleware 怎么配置?")
  • 用户提到了具体的库名(React、Vue、Next.js、Prisma、Supabase、Tailwind 等)
  • 用户询问某个库的特定版本行为("Next.js 15 的 App Router")

工作流

第一步:解析库 ID

调用 Context7 MCP 的 resolve-library-id 工具:

  • libraryName:从用户问题中提取的库名(如 Next.jsPrismaSupabase
  • query:用户的完整问题(提升匹配相关性)

必须先获得有效的 Context7 库 ID(格式为 /org/project)才能进入下一步,禁止直接调用 query-docs。

第二步:选择最佳匹配

从解析结果中按以下优先级选择:

优先级 判断依据
1 名称与用户所问库完全匹配
2 Benchmark 分数更高(100 分为满分)
3 Source reputation 为 High 或 Medium
4 若用户指定了版本号,优先选版本专属 ID

第三步:获取文档

调用 Context7 MCP 的 query-docs 工具:

  • libraryId:第二步选出的库 ID(如 /vercel/next.js
  • query:用户的具体问题,越具体越好

限制:每个问题最多调用 query-docs 3 次。3 次后仍不确定,说明情况并用已有最佳信息作答,不得猜测。

第四步:回答用户

  • 用获取到的实时文档内容回答问题
  • 包含文档中的相关代码示例
  • 涉及版本差异时明确标注(如"在 Next.js 15 中...")

示例

示例 1:Next.js middleware 配置

  1. 调用 resolve-library-idlibraryName: "Next.js"query: "Next.js middleware 怎么配置?"
  2. 从结果中选 /vercel/next.js(名称匹配 + 高分)
  3. 调用 query-docslibraryId: "/vercel/next.js"query: "middleware configuration"
  4. 用返回的文档和 middleware.ts 示例回答

示例 2:Prisma 关联查询

  1. 调用 resolve-library-idlibraryName: "Prisma"query: "如何查询关联关系?"
  2. /prisma/prisma
  3. 调用 query-docsquery: "query with relations include select"
  4. 返回 Prisma Client 的 include / select 模式与代码示例

示例 3:Supabase 认证方式

  1. 调用 resolve-library-idlibraryName: "Supabase"query: "Supabase 有哪些认证方式?"
  2. 选 Supabase 官方库 ID
  3. 调用 query-docs,汇总认证方法并给出最小示例

最佳实践

原则 说明
具体查询 用用户完整问题作为 query,比通用词更准确
版本感知 用户提到版本时,优先选版本专属库 ID
官方优先 多个匹配时优先选官方/主包,而非社区 fork
不传密钥 在调用 resolve-library-id 或 query-docs 前,移除问题中的 API Key、密码、Token 等敏感信息

反模式

反模式 后果
跳过 resolve-library-id 直接猜测库 ID query-docs 返回错误或无关文档
用训练数据直接回答库 API 问题 给出已过时或错误的 API 用法
query 过于模糊(如只写库名) 返回的文档片段不相关
超过 3 次仍继续调用 浪费 context,应直接说明不确定性
将含敏感数据的问题原文发送 Context7 泄露用户凭证

Read the full file on GitHub · 95 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 95 lines · 173 tokens per session scan A 82e5b967d24a

Subscribe to this mod's changes

docs-lookup is a skill published in the GitHub repository ProgrammerAnthony/Expert-Coding-Harness (235 stars, last pushed 3mo ago), licensed MIT. It adds 173 tokens to every session and 1,225 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens