agentleFS
hidenobunagaihidenobunagai/astack/skills/principle-guard-the-context-window/SKILL.md

principle-guard-the-context-window

Skill1 starsChanged 12 days agoMITView on GitHub

Apply when the session is filling up: large query results, long notebooks, wide tables, repeated reads of big CSV, JSON, or Parquet previews, or fan-out plans across many segments. Route bulk to subagents, aggregate before printing, and keep summaries in the main thread instead of raw payloads.

45 other projects use a version of this, 37 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use poteto-help, setup-pstack and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 24 projects that use this

  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 18 projects that use this

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 10 projects that use this

  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 16 projects that use this

The file

Files
SKILL.md

Guard the Context Window

Context overflow degrades reasoning quality, creates compression artifacts, and halts progress. A printed 50,000-row frame does more damage than a wrong join.

  • Size phases and cap scope. Limit the files per phase, set turn budgets, and count the cost of each mechanism before you start.
  • Aggregate before you print. Show describe, counts, and group-level summaries. Never print head or sample rows of real data. Ask for only the summary block in a run request, not whole frames or full query results. Write the bulk to a file and cite the path.
  • Convert before reading. Never read a raw .ipynb in full. Convert it to a script outside the repo first with uvx jupytext --to py:percent --output /tmp/<name>.py <notebook>.ipynb, then read the script.
  • Route bulk to subagents. Delegate broad exploration, such as scanning many tables or notebooks, to an Explore agent with a brief that says "do not edit files". Keep only its summary in the main thread.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.