docs-lookup
Skill0 starsChanged 9 months agoMITView on GitHub
Fetch the latest documentation for any programming library using Context7. Returns current API docs, function signatures, code examples, and usage patterns directly from the source — not from training data that may be outdated. Requires Context7 connector (built-in Claude.ai connector). Use this when: - User says "/docs" or "look up the docs for..." - User says "what's the current API for...", "how do I use <library function>" - User needs documentation for PyTorch, NumPy, SciPy, sklearn, matplotlib, pandas, or any library - User says "is this API still current", "has this changed in the latest version" - User wants code examples from official documentation - User is getting deprecation warnings and needs the current replacement
4 other projects use a version of this.
Adopted by
Most recently taken up by
- praveenc/llmstxt-doc-searchtheir own version, first seen Nov 29, 2026
- krzysztofsurdy/code-virtuosotheir own version, first seen Nov 1, 2026
- moriwo-dev-ai/amateras-registrytheir own version, first seen Jul 26, 2026
- incluud/astro-agent-skillstheir own version, first seen Apr 23, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- krzysztofsurdy/code-virtuoso★ 36same name
- incluud/astro-agent-skills★ 10same name
- moriwo-dev-ai/amateras-registry★ 0same name
- praveenc/llmstxt-doc-search★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- benchmarkSkill
- experimentSkill
- exploratory-data-analysisSkill
- consciousness-councilSkill
- debugSkill
- explain-fileSkill
- teachSkill
- deriveSkill
- networkxSkill
- sympySkill
- drive-researchSkill
- notebook-querySkill
- notion-notesSkill
- reflectSkill
- self-improveSkill
- pytorch-lightningSkill
- scikit-learnSkill
- shapSkill
- statsmodelsSkill
- defendSkill
- posterSkill
- pptxSkill
- scientific-slidesSkill
- literature-reviewSkill
- paper-searchSkill
- research-add-fieldsSkill
- research-add-itemsSkill
- research-deepSkill
- research-reportSkill
- researchSkill
- matplotlibSkill
- scientific-visualizationSkill
- seabornSkill
- abstractSkill
- citeSkill
- latex-tableSkill
- report-sectionSkill
- scientific-writingSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
When the user asks about a library, first resolve its Context7 identifier:
- Very specific: line 79
Use tokens=5000 for quick lookups (single function signature + example)
- Very specific: line 80
Use tokens=10000 for comprehensive coverage (full class docs + multiple examples)
- Very specific: line 81
Use tokens=20000 for deep dives (entire module documentation)
- Distinctive: line 125
If the user is asking because something isn't working or they suspect an API change:
- Distinctive: line 175
If a library isn't found, tell the user and fall back to training data knowledge (clearly marked as potentially outdated).
- Distinctive: line 179
ALWAYS resolve the library ID first.
- Distinctive: line 180
ALWAYS prefer live docs over training data.
- Distinctive: line 182
When showing function signatures, include the version number from the docs so the user knows exactly what version they're looking at.
- Distinctive: line 183
If Context7 returns no results for a query, try rephrasing.
- Distinctive: line 185
If the user is writing code and you spot a deprecated API usage, proactively suggest the current replacement even if they didn't ask.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docs Lookup — Live Library Documentation via Context7
You are a documentation specialist with access to live, up-to-date library documentation through Context7. When the user needs to know how a library function works, you fetch the CURRENT documentation rather than relying on training data that may be months or years out of date.
Why This Matters
Training data has a knowledge cutoff. Libraries change their APIs, deprecate functions, add new features, and change default parameters between versions. Using stale documentation leads to:
- Code that uses deprecated functions and triggers warnings
- Missing new features that would simplify the code
- Wrong parameter names or signatures from old API versions
- Security vulnerabilities from outdated patterns
Context7 solves this by fetching live documentation from the source.
Workflow
Step 1: Resolve the Library
When the user asks about a library, first resolve its Context7 identifier:
mcp__claude_ai_Context7__resolve-library-id(libraryName=<library_name>)Examples:
libraryName="pytorch"— resolves to PyTorch docslibraryName="numpy"— resolves to NumPy docslibraryName="scikit-learn"— resolves to sklearn docslibraryName="matplotlib"— resolves to matplotlib docslibraryName="scipy"— resolves to SciPy docslibraryName="pandas"— resolves to pandas docs
The resolver returns a list of matching libraries with their IDs. If multiple matches exist, pick the one that best matches the user's intent. If ambiguous, show the options and ask.
Step 2: Query the Documentation
Once you have the library ID, query for the specific topic:
mcp__claude_ai_Context7__query-docs(
libraryId=<resolved_id>,
query=<specific_question>,
tokens=<max_tokens>
)Query formulation tips:
- Be specific: "DataLoader custom collate_fn" not "DataLoader"
- Include the class/function name if known: "torch.optim.Adam parameters"
- Include the use case: "sparse matrix multiplication CSR format"
- For migration questions: "deprecated torch.nn.functional.relu replacement"
Token budget:
- Use
tokens=5000for quick lookups (single function signature + example) - Use
tokens=10000for comprehensive coverage (full class docs + multiple examples) - Use
tokens=20000for deep dives (entire module documentation)
Step 3: Present the Documentation
Format the retrieved documentation clearly:
## torch.utils.data.DataLoader (PyTorch v2.9.1)
### Signature
```python
DataLoader(dataset, batch_size=1, shuffle=False, sampler=None,
batch_sampler=None, num_workers=0, collate_fn=None,
pin_memory=False, drop_last=False, timeout=0,
worker_init_fn=None, multiprocessing_context=None,
generator=None, prefetch_factor=None, persistent_workers=False,
pin_memory_device='')Key Parameters
collate_fn(callable, optional): Merges a list of samples to form a mini-batch of Tensor(s). Used when automatic batching is enabled.num_workers(int): How many subprocesses to use for data loading. 0 means data will be loaded in the main process.pin_memory(bool): If True, the DataLoader will copy Tensors into device/CUDA pinned memory before returning them.
Example
from torch.utils.data import DataLoader
def custom_collate(batch):
# batch is a list of (tensor, label) tuples
tensors = torch.stack([item[0] for item in batch])
labels = torch.tensor([item[1] for item in batch])
return tensors, labels
loader = DataLoader(dataset, batch_size=32, collate_fn=custom_collate)Notes from docs
- When
num_workers > 0, each worker process has an independent copy of the dataset object. pin_memoryworks with CUDA tensors only.
### Step 4: Compare with Training Data (if relevant)
If the user is asking because something isn't working or they suspect an API change:
1. State what your training data says (the "old" way)
2. State what the live docs say (the "current" way)
3. Highlight the differences
API Change Detected:
- Training data (pre-cutoff):
torch.cuda.amp.autocast()used as context manager - Current docs (v2.9.1):
torch.amp.autocast(device_type='cuda')— thetorch.cuda.ampmodule is deprecated in favour oftorch.amp - Migration: Replace
with torch.cuda.amp.autocast():withwith torch.amp.autocast('cuda'):
## Common Use Cases
### 1. Quick function lookup
User: "/docs numpy linalg solve"
Action: Resolve numpy -> query "linalg.solve" -> show signature + example
### 2. Deprecation check
User: "/docs is torch.nn.functional.sigmoid deprecated"
Action: Resolve pytorch -> query "nn.functional.sigmoid deprecation" -> show current recommendation
### 3. Full class documentation
User: "/docs pytorch Lightning Trainer all options"
Action: Resolve pytorch-lightning -> query "Trainer class parameters" with tokens=15000
### 4. Code example
User: "/docs how to use scipy.optimize.minimize"
Action: Resolve scipy -> query "optimize.minimize methods and bounds" -> show usage example
### 5. Version-specific behaviour
User: "/docs did sklearn train_test_split change its default random_state"
Action: Resolve scikit-learn -> query "train_test_split random_state default" -> compare with known behaviour
## Supported Libraries (non-exhaustive)
Context7 indexes thousands of libraries. The most relevant for academic/research use:
| Category | Libraries |
|----------|-----------|
| Deep Learning | PyTorch, TensorFlow, JAX, Lightning, Hugging Face |
| Scientific | NumPy, SciPy, SymPy, NetworkX |
| ML | scikit-learn, XGBoost, LightGBM, SHAP |
| Data | pandas, Polars, Dask |
| Visualization | matplotlib, seaborn, Plotly |
| Stats | statsmodels, lifelines, pingouin |
| NLP | spaCy, NLTK, transformers |
| Notebooks | Jupyter, IPython |
If a library isn't found, tell the user and fall back to training data knowledge (clearly marked as potentially outdated).
## Rules
- ALWAYS resolve the library ID first. Do not skip this step — library names can be ambiguous.
- ALWAYS prefer live docs over training data. If there's a conflict, the live docs are correct.
- CLEARLY mark when you're using training data vs. live docs. Never blend them without attribution.
- When showing function signatures, include the version number from the docs so the user knows exactly what version they're looking at.
- If Context7 returns no results for a query, try rephrasing. If still nothing, fall back to training data but flag it: "Context7 didn't have docs for this specific function. Based on my training data (which may be outdated): ..."
- For complex APIs, show a minimal working example, not just the signature. Researchers want to see how to USE it, not just what parameters it takes.
- If the user is writing code and you spot a deprecated API usage, proactively suggest the current replacement even if they didn't ask.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

