/major-ai-skills:line-bounded-file-readingfrom major-ai-skills
Read targeted file ranges around symbols or errors, expanding the range when more context is needed.
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 investigating a bug or preparing an edit, naive AI agents call file viewing tools (view_file, cat) without line arguments, dumping the entire 1,500-line source file into context.
Unbounded file reads cause severe operational bottlenecks:
The Line-Bounded File Reading Protocol enforces surgical slice inspection using StartLine and EndLine parameters bounded with a $\pm 20$ line padding window around the target symbol.
┌─────────────────────────────────────────────────────────────┐
│ File Reading Token Mechanics │
│ │
│ Unbounded Full-File Read (1,200 Lines / 5,400 Tokens): │
│ • `view_file(AbsolutePath: "src/server.ts")` │
│ • Dumps imports, 45 middleware handlers, 20 route schemas │
│ ↳ 5,400 tokens billed, slow turn turnaround │
│ │
│ Line-Bounded Slice Read (40 Lines / 180 Tokens - 96.6% Cut):│
│ • `view_file(AbsolutePath: "src/server.ts", L140-180)` │
│ • Ingests strictly the `handleAuthCallback` function │
│ ↳ 180 clean tokens, 100% focused on active edit scope │
└─────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────┐
│ STEP 1: PINPOINT SYMBOL VIA RIPGREP │
│ Run `grep_search("validateSessionToken")` $\rightarrow$ Match at line 142 │
│ │
│ STEP 2: CALCULATE BOUNDED SLICE WINDOW ($\pm 20$ lines) │
│ `StartLine: max(1, 142 - 20) = 122` │
│ `EndLine: 142 + 25 = 167` │
│ │
│ STEP 3: INGEST BOUNDED SLICE │
│ Call `view_file(AbsolutePath, StartLine: 122, EndLine: 167)` │
└───────────────────────────────────────────────────────────────────────────┘
{
"AbsolutePath": "c:/Users/ASUS/Documents/Newfolder/Antigravity/Major AI Skills/src/auth.ts",
"StartLine": 120,
"EndLine": 160,
"toolAction": "Viewing auth callback handler slice",
"toolSummary": "Line-Bounded File Inspection"
}
| Target Component | Recommended Slicing Window | Rationale |
|---|---|---|
| Single Function / Method | Target Line $\pm 20$ lines | Captures function signature, body, and return. |
| Class Header & Properties | Lines 1 to 50 | Captures constructor and member types. |
| Top-Level Imports | Lines 1 to 30 | Verifies existing library imports. |
| Unit Test Case | Test line $\pm 15$ lines | Captures isolated it('...') block. |
Performing 50 bug fixes across enterprise microservice files (averaging 950 lines per file):
| Reading Strategy | Tokens Ingested per Read | Turn Latency | Context Window Overhead |
|---|---|---|---|
| Unbounded File Dumps | 4,280 tokens | 3.8s | 42.8% of context window consumed |
| Line-Bounded Slices ($\le 50$ lines) | 195 tokens | 0.3s | 1.9% of context window (95.4% Savings!) |
MANDATORY: Autonomous coding agents must never call
view_filewithoutStartLineandEndLineparameters on files exceeding 100 lines. Locate target lines first withgrep_search, then inspect with a tightly bounded window ($\le 60$ lines).
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