一键导入
context-budget
Monitor and manage context window usage to prevent overflow and optimize token efficiency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Monitor and manage context window usage to prevent overflow and optimize token efficiency.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Verify WCAG 2.1 AA compliance by analyzing HTML structure, ARIA usage, contrast, keyboard patterns, and semantic markup. Runs before completion in FE Designer mode.
Guide the design of beautiful, accessible, systematic UI components. Auto-triggers when creating or restyling components in FE Designer mode.
Audit design system consistency — check tokens, spacing, colors, typography usage across the codebase. Triggers when modifying shared styles or on user request.
Self-critique visual output before completion. Evaluates visual hierarchy, CTA clarity, cognitive load, spacing consistency, and layout priority. MUST run before attempt_completion in FE Designer mode.
MANDATORY: Run validation tools after EVERY code change. Do not finish until code is error-free.
Auto-enforce coding standards after every code change in Code mode. Checks file size, nesting, naming, error handling, and anti-patterns.
| name | context-budget |
| description | Monitor and manage context window usage to prevent overflow and optimize token efficiency. |
| risk | safe |
| source | self |
| tags | ["context","budget","token-management"] |
Trigger this skill when:
Structure context from most persistent to most transient. When budget is tight, prioritize higher levels:
┌─────────────────────────────────────┐
│ 1. Rules/Skills (system prompt) │ ← Always loaded, highest priority
├─────────────────────────────────────┤
│ 2. Spec / Architecture Docs │ ← Loaded per feature/session
├─────────────────────────────────────┤
│ 3. Relevant Source Files │ ← Loaded per task
├─────────────────────────────────────┤
│ 4. Error Output / Test Results │ ← Loaded per iteration
├─────────────────────────────────────┤
│ 5. Conversation History │ ← Accumulates, compacts
└─────────────────────────────────────┘
Priority rule: When context is tight (>60%), drop from the bottom up:
read_file with targeted line ranges, not full filesTrust levels for loaded context:
Mentally track these contributors:
| Usage | Action |
|---|---|
| <50% | Normal operation — no restrictions |
| 50-60% | Be selective: Use read_file with mode: "indentation" and limit params. Summarize long outputs. |
| 60-70% | Trigger checkpoint: Use context-checkpoint skill. Drop irrelevant files from working set. |
| 70-80% | Condense mode: Only read essential files. Keep responses focused and concise. |
| >80% | STOP expanding: Summarize state, recommend new conversation or let auto-condense handle it. |
read_file with mode: "indentation" over full file readslimit parameter — read ≤200 lines for explorationcodebase_search over search_files for semantic queries