- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add rohitg00/pro-workflow --skill context-engineering -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add rohitg00/pro-workflow --skill context-engineering -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add rohitg00/pro-workflow --skill context-engineering -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add rohitg00/pro-workflow --skill context-engineering -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/rohitg00/pro-workflow/tree/HEAD/skills/context-engineering來自發布者
Four operations control everything about how context flows through an AI coding session. Master them and you control the quality of every response.
Move information out of the context window into durable storage so it survives compaction and session boundaries.
Where to write:
Pattern — Scratchpad workflow:
1. Start complex task → create NOTES.md with goals and constraints
2. After research → write findings to NOTES.md
3. After compaction → NOTES.md survives, context does not
4. Resume → read NOTES.md to recover full state
Pull the right information into context at the right time. Precision matters more than volume.
Methods ranked by precision:
@file references — exact file injectiongrep / Glob — targeted pattern searchKey principle: Focused 300 tokens > unfocused 113K tokens.
A surgical grep result that returns the exact function signature beats dumping an entire module into context. Every irrelevant token dilutes attention.
Pattern — Progressive retrieval:
1. Start with file names (Glob)
2. Narrow to specific functions (Grep)
3. Read only the relevant lines (Read with offset+limit)
4. Never read entire large files when you need one function
Shrink context without losing the information that matters.
Compaction strategies:
Compaction triggers:
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50)PostCompact hook — Re-inject critical context:
{
"type": "PostCompact",
"command": "cat .claude/critical-context.md"
}
Use this to ensure project rules, current task state, or architecture constraints survive every compaction.
Don't load everything into one context. Split work across independent execution spaces.
Pattern — Subagent delegation:
Main session: planning, coordination, commits
Subagent 1: explore auth module, report findings
Subagent 2: run test suite, report failures
Subagent 3: generate migration script
Main context stays clean. Subagents handle the volume.
Example baseline (calibrate with /context): a 200K window (Haiku 4.5; Fable 5.1, Opus 5.5, and Sonnet 5 carry 1M) with ~20K overhead (CLAUDE.md, tool definitions, MCP schemas) leaves ~180K usable. Quality still drops as context fills, so keep the same discipline on 1M tiers. Actual budgets vary by model and configuration.
Put static context first. CLAUDE.md and tool definitions load before conversation. Keeping them stable maximizes prompt cache hits — saves cost and latency.
## Context Engineering
Write to NOTES.md for working state that must survive compaction.
Select with precision — grep first, read specific lines, never dump whole files.
Compact at 50% or task boundaries. Set CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=50.
Isolate heavy work to subagents. Main session stays for coordination and commits.
Master the four operations of context engineering — Write, Select, Compress, Isolate. Manage token budgets, compaction strategies, and context partitioning to keep AI sessions sharp and efficient.
---name: context-engineeringdescription: Master the four operations of context engineering — Write, Select, Compress, Isolate. Manage token budgets…---# skills/context-engineering/SKILL.md常見問題
從發布者下載 skills/context-engineering/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/rohitg00/pro-workflow。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。