/major-ai-skills:zero-boilerplate-importsfrom major-ai-skills
Show only relevant import changes in code diffs while keeping complete executable files valid.
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.
When presenting a localized code fix in chat or updating a function (e.g., adding a validation check to renderButton at line 120), default LLM responses defensively re-print the complete 30-line import block from the top of the file before showing the function.
Re-printing existing import statements causes:
The Zero-Boilerplate Import Snippet Protocol omits existing top-of-file imports in localized snippets - displaying strictly the modified code block, and showing imports only if a brand new dependency is being introduced.
┌─────────────────────────────────────────────────────────────┐
│ Import Block Token Density │
│ │
│ Verbose Import Re-Streaming (35 Lines / 340 Tokens): │
│ import React, { useState, useEffect } from 'react'; │
│ import { Card, CardHeader, CardBody } from '@/components'; │
│ import { UserProfile, Session } from '@/types'; │
│ import { formatDate, calculateTotal } from '@/utils'; │
│ // [25 more lines of existing imports...] │
│ │
│ export function PriceCard({ total }) { │
│ return <div>Total: {total.toFixed(2)}</div>; // <--- FIX │
│ } │
│ ↳ 340 tokens billed; 90% spent on unchanged imports │
│ │
│ Zero-Boilerplate Snippet (4 Lines / 28 Tokens - 91.7% Cut):│
│ ```tsx │
│ export function PriceCard({ total }) { │
│ return <div>Total: {total.toFixed(2)}</div>; │
│ } │
│ ``` │
│ ↳ 28 clean tokens, focuses 100% on the modified component │
└─────────────────────────────────────────────────────────────┘
If useState or prisma is already imported at line 1 of the file, never include import ... in the response snippet when fixing a function on line 85.
When introducing an external library, output strictly the single new import line:
+ import { redis } from '@/lib/redis';
Never ask the LLM to alphabetize or reorder imports. Delegate import organization to local linters via CLI:
# Python: Auto-sorts and removes unused imports in 3ms
ruff check --select I,F401 --fix src/
# TypeScript: Organize imports via biome
npx biome check --apply src/
Presenting 50 component and service bug fixes:
| Presentation Style | Average Tokens / Snippet | Latency | Duplicate Import Bugs |
|---|---|---|---|
| Full Import Block Re-Printing | 380 tokens | 2.9 seconds | 8 duplicate import errors |
| Zero-Boilerplate Snippet Protocol | 42 tokens | 0.3 seconds | 0 duplicate import errors |
MANDATORY: When displaying code snippets or function fixes in chat, agents must omit existing imports that are already present in the target file. If a new import is required, show strictly the new import statement.
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