lean-ctx

Reduces token consumption through AST-aware file reading and context compression.

Updated May 27, 2026
One-click install
npx skills add https://github.com/Rkaaaa404/cyberhack-SYDT --skill lean-ctx-rkaaaa404
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lean-ctx
Source: https://github.com/Rkaaaa404/cyberhack-SYDT/tree/main/.agents/skills/lean-ctx
Command: npx skills add https://github.com/Rkaaaa404/cyberhack-SYDT --skill lean-ctx-rkaaaa404

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large codebases and verbose tool outputs quickly exhaust an AI assistant's context window, causing lost information, higher token costs, and degraded reasoning quality. ## Core Features & Use Cases - AST-Aware Reading: Query symbols, methods, and exports from large files instead of loading entire file contents into context. - Selective File Loading: Restrict file reads to only those directly relevant to the current implementation task. - Context Lifecycle Management: Periodically summarize findings and clear stale diagnostic logs or verbose system output from memory. - Use Case: When refactoring a large repository, use this Skill to inspect only the relevant function definitions and filter repetitive shell output, keeping the working context small and focused. ## Quick Start Apply lean context practices to analyze this repository by reading only the symbols and files relevant to my current task.

Frequently Asked Questions about lean-ctx

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

FAQPage Schema
How do I reduce token usage when analyzing large codebases?▼

Query symbols and definitions such as methods, properties, and exports instead of reading whole files. Combine this with selective file loading so only files directly related to the current task enter the context window.

What is AST-aware code reading?▼

AST-aware reading parses a file's abstract syntax tree to extract specific symbols like functions, classes, and exports rather than loading raw text. This gives the model structural understanding with far fewer tokens.

How to keep AI context clean during long coding sessions?▼

Periodically summarize accumulated findings and clear old diagnostic logs or verbose system output from memory. Filtering repetitive lines from shell command output also prevents gradual context pollution.

When should I read a whole file instead of querying symbols?▼

Read whole files only when they are directly related to the current implementation task and symbol-level detail is insufficient, such as when control flow across an entire small module matters. Otherwise prefer targeted symbol queries.

Does context compression lose important information?▼

Selective loading can omit relevant details if file relevance is misjudged, so scope selection must match the task. Periodic summarization mitigates loss by condensing findings rather than discarding them outright.