08 context pruner

From Sounder25/Foundational-Agent-Skills · View interactive version

08 context pruner is an AI agent skill from the GitHub repository Sounder25/Foundational-Agent-Skills. Optimize information density by filtering workspace files based on relevance to the current task. Excludes high-noise files (lockfiles, assets) and prioritizes source code matching semantic queries.

How to use this skill

Skill file

SKILL-008: Context Window Pruner

Overview

Large repos flood the agent's context window with noise. This skill generates a RELEVANT_FILES.txt list by aggressively pruning irrelevant directories and searching for files related to a specific "Focus".

Trigger Phrases

Inputs

| Parameter | Type | Required | Default | Description |

|-----------|------|----------|---------|-------------|

| --focus | string | Yes | - | Keywords to filter file names/content (e.g. "gas", "auth") |

| --max-files | int | No | 50 | Limit output size |

Outputs

  1. RELEVANT_FILES.txt: List of absolute paths to read.
  2. Console output summarizing token savings (estimated).

Safety Checks

Implementation

See prune_context.ps1.

Integration

$files = .\skills\08_context_pruner\prune_context.ps1 -Focus "EVM opcode"
# Agent works only with $files
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.