context-strategy

Plans file analysis strategy by choosing direct reads or subagent delegation based on file size and type.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill context-strategy-pavelvdo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-strategy
Source: https://github.com/pavelvdo/universal-xml-exchange2/tree/main/.cursor/skills/context-strategy
Command: npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill context-strategy-pavelvdo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Analyzing large code files, data exports, or reports directly can flood the AI's context window and degrade answer quality. This Skill prevents that by planning the analysis approach upfront — deciding which files to read directly, which to read partially, and which to delegate to subagents — before any file content is loaded. ## Core Features & Use Cases - Pre-read inventory: Collects file existence, line counts, and types (code, data, report, document) without reading content, producing a summary table. - Decision matrix: Routes files by size and type — small files read directly, large .bsl modules delegated to a 1C code explorer subagent, XML/HTML/CSV data files delegated for structure extraction. - Subagent question templates: Provides ready-made prompt templates for algorithm analysis, call/dependency search, XML/JSON structure extraction, and HTML report parsing. - Synthesis protocol: Cross-analyzes subagent results, fills gaps with targeted fragment reads, and composes the final answer. - Use Case: You need to understand how a 2500-line 1C object module maps records from an XML export shown in an HTML report. The Skill inventories all three files, dispatches focused subagents in parallel, then synthesizes their structured summaries into one answer. ## Quick Start Ask the assistant to analyze the attached large module and data files, and it will first present a brief analysis plan before reading anything.

Frequently Asked Questions about context-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze large code files without overflowing the AI context window?

Inventory each file's size and type first, then delegate files over 500 lines to a subagent with a focused question instead of reading them directly. The subagent returns a structured summary with only key fragments, keeping the main context lean.

When should I use a subagent instead of reading a file directly?

Read directly when a file is under 150 lines or you need a specific fragment of a 150-500 line file. Delegate to a subagent when a file exceeds 500 lines, when it is a data file of any size, or when three or more independent files must be analyzed in parallel.

How do I extract structure from large XML or HTML data files with an AI assistant?

Delegate the file to a subagent with a template question asking for the root structure, record counts, key fields, and a few sample records. The subagent returns a schema and table of examples rather than the raw file content.

Can multiple files be analyzed in parallel by subagents?

Yes, independent files can be handled by up to four parallel subagents, which is the platform limit. Files forming a call chain should go to a single subagent so the dependency logic is analyzed coherently.

When is this analysis planning approach not needed?

Skip it for simple requests: reading one or two small files under 150 lines, questions about a specific line, one-line fixes, or files already loaded in context. The overhead of planning only pays off for large or multi-file analysis tasks.