code-context
Installation
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-idthenquery-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, runsrm -rfcleanup, returns file structure summary and key patterns. - Web Search+Fetch: Agent runs
WebSearchwith version-anchored queries derived from clone findings, callsWebFetchon 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.