/major-ai-skills:no-vendor-directory-scansfrom major-ai-skills
Exclude generated dependency and build directories from recursive searches unless the investigation specifically requires them.
Ships in major-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
In modern software engineering, a typical repository containing 20 source files also contains 30,000+ third-party vendor files inside node_modules/, venv/, or Rust target/ directories.
When an autonomous agent runs an unconstrained recursive search or directory crawler without vendor exclusions, the tool attempts to index and return thousands of third-party package files.
Unconstrained vendor scans cause:
list_dir or find on node_modules/ dumps 80,000+ tokens, instantly exhausting context windows.node_modules/ or site-packages/ (which get wiped out on next npm install).The Vendor & Artifact Directory Exclusion Protocol enforces strict, non-bypassable directory blacklists at the tool runner layer.
┌─────────────────────────────────────────────────────────────┐
│ Directory Ingestion Comparison │
│ │
│ Unconstrained Recursive Crawl (32,000 Files / 90k Tokens): │
│ • `node_modules/lodash/package.json` │
│ • `node_modules/react/cjs/react.development.js` │
│ • `venv/lib/python3.11/site-packages/pydantic/...` │
│ • `.git/objects/4f/8a2b3...` │
│ ↳ 90,000 tokens billed, context window crashes! │
│ │
│ Vendor-Exclusion Guard (22 Files / 180 Tokens): │
│ • `src/components/Button.tsx` │
│ • `src/services/auth.ts` │
│ • `package.json` │
│ ↳ 180 clean tokens (99.8% Reduction!), 100% active code │
└─────────────────────────────────────────────────────────────┘
Every agent tool (list_dir, grep_search, glob) must automatically filter out paths containing any of these segment names:
┌───────────────────────────────────────────────────────────────────────────┐
│ • JAVASCRIPT / TYPESCRIPT: `node_modules`, `.next`, `dist`, `build`, `.turbo`│
│ • PYTHON: `venv`, `.venv`, `__pycache__`, `.pytest_cache`, `site-packages`│
│ • RUST / GO: `target`, `vendor` │
│ • JAVA / KOTLIN: `.gradle`, `build`, `target`, `.m2` │
│ • GIT & ENVIRONMENT: `.git`, `.idea`, `.vscode`, `.DS_Store`, `coverage` │
└───────────────────────────────────────────────────────────────────────────┘
from pathlib import Path
from typing import List, Set
BANNED_DIR_NAMES: Set[str] = {
# Package managers & dependencies
"node_modules", "venv", ".venv", "vendor", "site-packages",
# Build artifacts & caches
"dist", "build", "target", ".next", ".turbo", ".cache", "__pycache__",
".pytest_cache", ".mypy_cache", ".ruff_cache", "coverage",
# Version control & IDEs
".git", ".svn", ".hg", ".idea", ".vscode", ".DS_Store"
}
def is_path_safe_from_vendor(path: Path, root: Path) -> bool:
"""Returns True if the path contains zero blacklisted vendor directory segments."""
try:
rel_parts = path.relative_to(root).parts
return not any(part in BANNED_DIR_NAMES for part in rel_parts)
except ValueError:
return False
def safe_crawl_workspace(root: Path) -> List[str]:
"""Recursively lists repository files while strictly excluding vendor directories."""
safe_files = []
for p in root.rglob("*"):
if p.is_file() and is_path_safe_from_vendor(p, root):
safe_files.append(str(p.relative_to(root)).replace("\\", "/"))
return safe_files
Listing repository contents for a modern Next.js + Python microservice:
| Scan Configuration | Files Returned | Tokens Ingested | I/O Scan Time | Context Safety |
|---|---|---|---|---|
| Unconstrained Scan | 38,420 files | 115,000 tokens | 6.4 seconds | 🚨 Crash / Overflow |
| Vendor Exclusion Protocol | 42 files | 310 tokens | 0.01 seconds | ✅ 100% Safe |
MANDATORY: Filesystem exploration and search tools must automatically exclude
node_modules,venv,dist,target, and.gitby default. Never traverse into vendor dependency trees unless the user explicitly requests an audit of an external package.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.Other plugins' skills for the same job