/major-ai-skills:lazy-dependency-loadingfrom major-ai-skills
Load dependency documentation relevant to the current API or error while checking version-sensitive assumptions.
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.
A common inefficiency in agent architectures is Eager Documentation Ingestion: before writing a line of code, the system pre-loads 15,000 to 30,000 tokens of external library documentation (AWS SDK v3, Stripe API, Tailwind CSS, Prisma ORM) into the prompt context "just in case" the agent needs reference material.
Modern frontier models already retain deep Parametric Memory of standard library and third-party API signatures. Pre-loading massive documentation sets wastes 85% of input tokens on APIs that are never called during the task.
The Lazy Dependency Context Protocol operates on a Just-In-Time (JIT) model: the agent writes code using its pre-trained parametric knowledge, runs the local compiler/typechecker, and fetches external documentation only if an explicit type error or unknown method signature is encountered.
┌─────────────────────────────────────────────────────────────┐
│ Documentation Context Economics │
│ │
│ Eager Documentation Pre-Loading (Anti-Pattern): │
│ • Ingests 25,000 tokens of AWS S3 SDK documentation │
│ • Agent writes 10-line upload script (`PutObjectCommand`) │
│ ↳ 25,000 tokens billed, $0.075 wasted upfront │
│ │
│ Lazy JIT Loading Protocol: │
│ • Turn 1: Agent writes S3 script from parametric knowledge │
│ • Turn 2: Runs `tsc --noEmit` ──► Exit Code 0 (Success!) │
│ ↳ 0 documentation tokens ingested (100% Savings!) │
│ ↳ (If tsc fails, fetches ONLY the 1 failing method schema) │
└─────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────┐
│ STAGE 1: PARAMETRIC GENERATION │
│ Write the integration code directly using internal model knowledge │
│ │
│ STAGE 2: LOCAL COMPILER / LINTER VALIDATION │
│ Run local typecheck (`tsc --noEmit`, `mypy`, `cargo check`) │
│ • If Exit Code == 0 $\rightarrow$ Complete task immediately! │
│ │
│ STAGE 3: TARGETED JIT FETCH (ONLY ON COMPILER ERROR) │
│ If error: `Property 'uploadPart' does not exist on type 'S3Client'` │
│ • Fetch strictly the `uploadPart` method reference via `read_url_content` │
└───────────────────────────────────────────────────────────────────────────┘
When a type error occurs in a newly upgraded library (e.g. @tanstack/react-query v5):
[ERR_TYPE: src/hooks/useUsers.ts:12]
No overload matches this call. Expected 1 argument (options object), but received 2 (queryKey, queryFn).
{
"Url": "https://tanstack.com/query/v5/docs/framework/react/guides/migrating-to-v5#usequery-now-takes-a-single-object",
"toolAction": "Fetching TanStack Query v5 migration docs",
"toolSummary": "JIT Documentation Retrieval"
}
Agent ingests 300 targeted tokens explaining the object syntax change, fixes line 12, and compiles clean.
Implementing 40 standard third-party integrations (Stripe, AWS S3, Resend, Redis, Prisma):
| Metric | Eager Documentation Ingestion | Lazy JIT Documentation Protocol | Improvement |
|---|---|---|---|
| Upfront Context Tokens | 22,500 tokens / task | 0 tokens / task | 100% Upfront Savings |
| Tasks Requiring JIT Docs | N/A | 12.5% (5 of 40 tasks) | 87.5% Zero-Doc Tasks |
| Total Session API Costs | ~$3.60 | ~$0.42 | 88.3% Cost Reduction |
| Average Task Duration | 18.2 seconds | 3.5 seconds | 5.2x Faster Velocity |
MANDATORY: Agents must never eagerly fetch or inject full third-party library manuals prior to writing code. Write from parametric knowledge, validate against local compilers, and fetch documentation JIT only when a compiler or runtime error confirms an API mismatch.
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.Other plugins' skills for the same job
/act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.