Token导航 LogoToken导航

Agent Skill · 研究检索

code-context(代码 context)

code-context 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

code-context 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 69,971。

总安装 214周安装 9GitHub Stars 537下载 75核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-context(代码 context)
来源仓库:https://github.com/fradser/dotclaude
仓库路径:skills/code-context
安装命令:
npx skills add https://github.com/fradser/dotclaude --skill code-context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fradser/dotclaude --skill code-context

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

提供五种代码上下文检索方法,隔离 token 防止误调用。支持公共仓库、文档、代码搜索等多种来源。通过 Task 代理调用 DeepWiki 或 Context7 获取概要信息。关键操作必须由子代理完成,主流程不直接访问外部资源。code-context 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/code-context

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fradser/dotclaude --skill code-context;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-context 怎么安装?

在终端执行 npx skills add https://github.com/fradser/dotclaude --skill code-context。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

code-context 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

code-context 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

code-context 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

code-context 用的人多吗?

公开数据是累计安装 214 次,近一周安装 9 次,下载 75 次,GitHub 537 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

code-context 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
code-context

代码 context · 本页

214537接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Code Context Retrieval

This skill provides 5 methods for retrieving code context. Select methods based on the target: public GitHub repos, library docs, code search, direct inspection, or post-clone web enrichment.

Token Isolation (Critical)

Never run any external lookup in the main context. Always spawn Task agents:

  • DeepWiki: Agent calls read_wiki_structure / read_wiki_contents / ask_question, extracts architecture summary and key relationships, returns concise overview.
  • Context7: Agent calls resolve-library-id then query-docs, extracts the minimum viable API surface and usage examples, returns copyable snippets with version notes.
  • Exa: Agent calls get_code_context_exa, extracts minimum viable snippets, deduplicates near-identical results (mirrors, forks, repeated StackOverflow answers), returns copyable snippets + brief explanation.
  • Git clone: Agent clones to /tmp/, reads entry points and core modules, runs rm -rf cleanup, returns file structure summary and key patterns.
  • Web Search+Fetch: Agent runs WebSearch with version-anchored queries derived from clone findings, calls WebFetch on high-signal URLs, returns only validated insights cross-referenced against cloned code.

Main context stays clean regardless of search volume. Only final summaries return to the caller.

Method 1: DeepWiki (AI-powered repo documentation)

Best for: Well-known public GitHub repositories where you need architecture overview, component explanations, or high-level understanding fast.

Tools: read_wiki_structure, read_wiki_contents, ask_question

Process:

  1. Call read_wiki_structure with the owner/repo (e.g., "facebook/react") to get topic list
  2. Call read_wiki_contents for relevant topics, or ask_question for targeted queries
  3. Use when you need: architecture diagrams, component relationships, design decisions

Strengths: Zero setup, instant AI-summarized documentation, good for onboarding to unfamiliar repos.

Limitations: Only works for public GitHub repos; coverage varies by project popularity.

Method 2: Context7 (library documentation)

Best for: Getting up-to-date API docs, usage examples, and version-specific documentation for npm/pip packages and frameworks.

Tools: resolve-library-id, query-docs

Process:

  1. Call resolve-library-id with the library name (e.g., "react", "fastapi") to get the canonical ID
  2. When the user specifies a version (e.g., "react@18"), select the matching version from the versions list returned by resolve-library-id and append it to the library ID path (e.g., /facebook/react/18.3.1)
  3. Call query-docs with libraryId and query — these are the only two parameters

Query tips: Be specific -- "useCallback dependency array" beats "react hooks". Include the framework version when known.

Version pinning: Encode version into the library ID path (e.g., /vercel/next.js/v14.3.0-canary.87), not as a separate parameter. Use the versions list from resolve-library-id to pick the correct slug.

Strengths: Always current docs, supports version pinning, covers thousands of libraries, excellent for API reference.

Limitations: Requires the library to be indexed; less useful for internal/private packages.

Method 3: Exa Code Search (web-wide code examples)

Best for: Finding real-world usage patterns, StackOverflow-style answers, GitHub Gist examples, and code snippets from across the web.

Tool: get_code_context_exa

Setup: Works without an API key (free tier with rate limits). For higher limits, set the EXA_API_KEY environment variable.

Process:

  1. Call get_code_context_exa with a precise query
  2. Set tokensNum based on need: 3000 for quick examples, 8000 for comprehensive patterns
  3. Verify publication dates on results; prefer recent sources

Query writing guidance:

  • Include the language or framework: "TypeScript React" not just "React"
  • Include the version when relevant: "Next.js 14 app router"
  • Use exact identifiers: "useServerAction" not "server action hook"
  • Add the pattern type: "example", "error handling", "migration guide"
  • Example: "TypeScript Next.js 14 app router server action error handling example"

Strengths: Finds diverse real-world examples, not limited to official docs, surfaces community solutions.

Limitations: Results may be outdated; always check publication dates and verify against official docs.

Method 4: Git Clone (direct code inspection)

Best for: Private repositories, detailed implementation review, running local analysis, or when other methods lack depth.

Process:

  1. Run git clone <repo-url> /tmp/<repo-name> --depth=1 to fetch the code
  2. Read key files: entry points, configuration, core modules
  3. Use Glob to map structure; use Grep to search patterns
  4. Clean up when done: rm -rf /tmp/<repo-name>

Strengths: Full code access, works with private repos (with credentials), enables static analysis tools.

Limitations: Requires network access and disk space; slow for large repos; credentials needed for private repos.

Method 5: Web Search + Fetch (post-clone enrichment)

Best for: Enriching findings from a git clone with changelogs, issue discussions, blog posts, and migration guides that live outside the repository itself.

Tools: WebSearch, WebFetch

When to apply: Use after completing Method 4. The clone gives you the code; this method gives you the *why* and *what changed*.

Process:

  1. Derive targeted queries from clone findings — use exact identifiers, error strings, or design patterns found in the source
  2. Call WebSearch with query set to a precise, version-anchored string (e.g., "<library> <version> breaking change <symbol>")
  3. For each high-signal result, call WebFetch with url (from search results) and a focused prompt to extract only the relevant section
  4. Cross-reference fetched content against the cloned code to validate accuracy
  5. Discard results older than 2 years unless the topic is stable/foundational

Query patterns:

  • Changelogs: "<repo-name> CHANGELOG v<version>" or "<repo-name> release notes"
  • Design rationale: "<repo-name> <concept> why OR rationale site:github.com"
  • Known issues: "<repo-name> <symbol or pattern> issue OR bug site:github.com"
  • Migration: "<repo-name> migrate from <old-version> to <new-version>"

Strengths: Surfaces context that never appears in source code — deprecation notices, upstream issue threads, author blog posts, community migration experiences.

Limitations: Results may be stale or inaccurate; always validate fetched claims against the actual cloned code. Rate-limited without API key.

Method Selection Guide

ScenarioPrimary MethodFallback
"How does X library work?"Context7DeepWiki
"Understand the architecture of Y repo"DeepWikiGit Clone
"Find examples of Z pattern"ExaContext7
"Inspect private/internal repo"Git Clone-
"What changed in v3 of library?"Context7Exa
"How are modules connected?"DeepWikiGit Clone
"Why was this design decision made?"Git Clone → Web Search+FetchDeepWiki
"What broke between versions?"Web Search+FetchContext7

Combining Methods

For comprehensive context, combine methods:

  1. DeepWiki for architecture overview
  2. Context7 for specific API details
  3. Exa for community usage patterns
  4. Git Clone for implementation details when needed

Always prefer non-destructive read-only operations. When cloning, use /tmp and clean up after.

平台分布

Codex

36.79%
按下载量换算28

Claude

31.15%
按下载量换算23

Cursor

16.48%
按下载量换算12

Gemini CLI

9.6%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills