omni-context-minimizer
Skill1 starsChanged 11 days agoMITView on GitHub
Use this Skill imperatively BEFORE reading any code file containing more than 200 lines. This script extracts and returns a structural skeleton (Imports, Class Names, and Function Signatures) discarding all internal logic, thus preventing massive context window consumption. Works for NodeJS, Python, Go, Rust, and Java.
In this repository37 other files it gives its agents.
- agents.mdAGENTS.md
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- autoskillsSkill
- compliance-checkerSkill
- contract-writerSkill
- django-expertSkill
- django-patternsSkill
- django-securitySkill
- django-tddSkill
- django-verificationSkill
- env-shielding-auditorSkill
- frontend-designSkill
- graphifySkill
- js-standardizerSkill
- mass-standardizerSkill
- mcp-registrySkill
- nodejs-backend-patternsSkill
- nodejs-best-practicesSkill
- python-quality-auditorSkill
- readme-standardizerSkill
- seoSkill
- skill-creatorSkill
- skilloptSkill
- skills-samplesSkill
- slash-commanderSkill
- sprint-architectSkill
- tailwind-css-patternsSkill
- token-saver-auditorSkill
- topology-monitorSkill
- topology-scaffolderSkill
- typescript-advanced-typesSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- viteSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
If you are tasked to "Analyze how the API is structured" or "Review the large views.py file":
- Distinctive: line 20
Step 2: Run the minimizer passing that path as an argument (the Python script must be executed from the Skill's path in the submodule):
- Very specific: line 38
If you are sending an implementation_plan.md to the Orchestrator and it includes the heuristic scanning of an entire /src folder, you MUST …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🪙 Skill: Omni Context Minimizer
⚠️ When to Trigger this Skill?
As a Subagent, you are PROHIBITED from reading massive code files (.js, .py, .go, .ts) with a full-file Read without first going through this minimizer, unless you already know exactly the line number or range you are going to inspect.
If you are tasked to "Analyze how the API is structured" or "Review the large views.py file":
- YOU CANNOT LOAD THE ENTIRE FILE INTO YOUR MEMORY.
- EXECUTE THIS SKILL IMMEDIATELY.
🛠️ How it Works (Instructions)
This repository contains a Python script called omni_minimizer.py in the scripts/ folder. This script scrutinizes the lexical DOM of the target file and returns only the lines that declare Functions, Classes, or Imports via the terminal.
Step 1: Locate the absolute path of the heavy file you need to analyze (e.g., /path/to/my_project/src/app.js).
Step 2: Run the minimizer passing that path as an argument (the Python script must be executed from the Skill's path in the submodule):
python .agents/skills/omni-context-minimizer/scripts/omni_minimizer.py /path/to/heavy/fileStep 3: The console will return the skeleton. For example:
Line 1: import express from 'express';
Line 4: const app = express();
Line 10: export const loginController = async (req, res) => {
Line 45: class DatabaseService {
...
--- [OPTIMIZATION]: The file was reduced to 8 lines of pure structure. ---Step 4: Now that you have the "map", if you decide you need to see how the logic of loginController at line 10 works, you can use a targeted Read (offset/limit) or ripgrep focusing your shot STRICTLY on line 10, saving all the remaining context.
🔴 Token-Saver Authorization
If you are sending an implementation_plan.md to the Orchestrator and it includes the heuristic scanning of an entire /src folder, you MUST specify in your MD: "The omni-context-minimizer will be used to map the 5 base files, preventing context drowning".
Otherwise, the Token-Saver Auditor will reject the plan.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

