Context Window Pruner

Prunes workspace files into a focused list using a PowerShell script.

27|8|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/Sounder25/Google-Antigravity-Skills-Library --skill context-window-pruner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Context Window Pruner
Source: https://github.com/Sounder25/Google-Antigravity-Skills-Library/tree/main/08_context_pruner
Command: npx skills add https://github.com/Sounder25/Google-Antigravity-Skills-Library --skill context-window-pruner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Large repositories flood the agent's context window with noise. This skill prunes workspace files to a focused set of relevant items for a given Focus, reducing context size and accelerating analysis.

Core Features & Use Cases

  • Generates RELEVANT_FILES.txt by pruning irrelevant directories and prioritizing files matching the Focus term.
  • Respects .gitignore and excludes typically noisy assets to improve signal over noise.
  • Use Case: when preparing to analyze a specific module in a large codebase, run the pruner to obtain a focused file list for context loading.

Quick Start

  • Run in PowerShell: .\prune_context.ps1 -Focus "EVM opcode" -MaxFiles 50

Frequently Asked Questions about Context Window Pruner

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

FAQPage Schema
How do I reduce context window noise when analyzing a large git repository?

You can reduce context window noise by pruning the repository workspace to generate a focused RELEVANT_FILES.txt list. This script respects .gitignore rules and filters out noisy assets to prioritize files matching your specific focus term.

How do I filter a large codebase to only load relevant source files into context?

Filter a large codebase by running the PowerShell script with the -Focus parameter to specify a search term and -MaxFiles to limit results. It outputs a focused file list containing only common source file extensions matching your criteria.

Does the context pruner script respect .gitignore when scanning the workspace?

Yes, the context pruner respects .gitignore exclusions when scanning the workspace. It automatically excludes typically noisy assets and irrelevant directories while prioritizing path matches for the specified focus term.

What is the best way to limit the number of files generated for context loading?

The best way to limit files is using the -MaxFiles parameter in the PowerShell script. By combining -MaxFiles with the -Focus parameter, you generate a tightly scoped RELEVANT_FILES.txt that prioritizes path matches for focused analysis.

Can I use this context pruning script without PowerShell?

No, this context pruning script requires PowerShell to execute the prune_context.ps1 file. The script uses PowerShell commands to scan directories, filter source file extensions, and output the RELEVANT_FILES.txt list for context loading.

Why does my context window get flooded with irrelevant files in large repositories?

Context windows get flooded because large repositories contain many irrelevant directories and noisy assets. Running a pruner script mitigates this by filtering common source file extensions and prioritizing only files matching your focus term.