principle-guard-the-context-window
Protect reasoning quality when files, histories, logs, screenshots, search results, or worker output are large. Use before bulk reads or fan-out and whenever the active context is filling with payload rather than decisions.
- License 许可
- MIT
- 所属仓库
- caezium/skills
- 最近更新
- 2026-08-24
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- principle-guard-the-context-window
- description
- Protect reasoning quality when files, histories, logs, screenshots, search results, or worker output are large. Use before bulk reads or fan-out and whenever the active context is filling with payload rather than decisions.
02 资源文件 1
- 许可证LICENSE1.0 KB
03 SKILL.md 正文
Guard the context window
The active context is finite. Spend it on decisions, constraints, and evidence—not raw payload that can stay in files or worker contexts.
| Situation | Preferred handling | Fallback when delegation is unavailable |
|---|---|---|
| Large file or log | Search first, then read relevant ranges | Save/filter locally and read the compact result |
| Many independent inputs | Give authorized workers non-overlapping slices and a strict return schema | Process slices sequentially and keep a rolling summary |
| Verbose tool output | Write it to an artifact and extract findings | Re-run with narrower filters or output limits |
| Repeated reference | Keep the small, frequently used contract inline | Link branch-specific detail behind a precise context pointer |
Do not delegate unless current user and system policy permit it. Keep raw transcripts, screenshots, and bulk source outside the coordinating thread; bring back conclusions, evidence pointers, disagreements, and gaps.
Before each read, ask what decision it can change. Stop when the scoped question is answered. At phase boundaries, restate the current goal, verified state, open risks, and next action so later compaction preserves the throughline.
<!-- Adapted from poteto/pstack principle-guard-the-context-window, MIT License, Lauren Tan, cursor/plugins@51a96e0. -->
04 同仓库更多 Skills
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wrangler
Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
workers-best-practices
Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available evidence sources, searches each relevant category, and returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
week-prep
Generate a briefing with calendar, tasks, and attention flags. Use for "week prep", "briefing", or "what's on this week".