Keeps the conversation token-friendly by summarizing recent exchanges, surfacing pending actions, and delivering a compact briefing for each turn before calling the model. Trigger this skill whenever you need to prune a bloated thread or keep the next prompt lean.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install context-gatekeeper或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install context-gatekeeper⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/context-gatekeeper/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: context-gatekeeper description: Keeps the conversation token-friendly by summarizing recent exchanges, surfacing pending actions, and delivering a compact briefing for each turn before calling the model. Trigger this skill whenever you need to prune a bloated thread or keep the next prompt lean. author: Davi Marques ---
Reduzir o volume de tokens enviados ao modelo preservando apenas o essencial: o resumo das decisões, os próximos passos e os trechos mais recentes da conversa. Este skill roda em paralelo à sua rotina habitual, produzindo o artefato context/current-summary.md que serve como contexto de substituição (em vez de reenviar toda a conversa).
ROLE: texto em um arquivo de histórico (context/history.txt ou qualquer caminho acessível). Exemplo:``` USER: Quero definir metas para o Q2 ASSISTANT: Fiz um plano com marcos e métricas ```
```bash python skills/context-gatekeeper/scripts/context_gatekeeper.py \ --history context/history.txt \ --summary context/current-summary.md ``` O script limita o resumo (até 6 sentenças por padrão), extrai atividades abertas (TODO, próxima ação, tarefa, follow-up) e inclui as últimas 4 jogadas para contexto imediato.
context/current-summary.md e cite os itens pendentes. Apenas depois disso, se for necessário, adicione as últimas trocas concretas (máximo de 2-3 mensagens) para clareza imediata.context/history.txt com a nova resposta e execute o script novamente antes do próximo turno.--history: caminho do arquivo com o log das trocas (cada linha deve ser ROLE: texto). Usa STDIN se omitido.--summary: destino do resumo (substitui o arquivo se já existir).--max-summary-sents: limite de sentenças resumidas (padrão 6).--max-recent-turns: quantas trocas finais aparecerão na seção "Últimos turnos" (padrão 4).context/pending-tasks.md e copie a seção "Pendências" do resumo para lá.OpenClaw já persiste memórias em arquivos Markdown e executa /compact quando precisa. Este skill assume a mesma disciplina: em vez de confiar nos 100+ mensagens antigas que ainda estão no contexto, você carrega um briefing de 1 página antes de cada chamada. Economiza tokens e mantém o modelo focado no que realmente importa (decisões, pendências, mudanças recentes).
安装 Context Gatekeeper 后,可以对 AI 说这些话来触发它
Help me get started with Context Gatekeeper
Explains what Context Gatekeeper does, walks through the setup, and runs a quick demo based on your current project
Use Context Gatekeeper to keeps the conversation token-friendly by summarizing recent exchang...
Invokes Context Gatekeeper with the right parameters and returns the result directly in the conversation
What can I do with Context Gatekeeper in my documents & notes workflow?
Lists the top use cases for Context Gatekeeper, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/context-gatekeeper/ 目录(个人级,所有项目可用),或 .claude/skills/context-gatekeeper/(项目级)。重启 AI 客户端后,用 /context-gatekeeper 主动调用,或让 AI 根据上下文自动发现并使用。
Context Gatekeeper 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Context Gatekeeper 可免费安装使用。请查阅仓库了解许可证信息。
Keeps the conversation token-friendly by summarizing recent exchanges, surfacing pending actions, and delivering a compact briefing for each turn before calling the model. Trigger this skill whenever you need to prune a bloated thread or keep the next prompt lean.
Context Gatekeeper 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using Context Gatekeeper
Identifies repetitive steps in your workflow and sets up Context Gatekeeper to handle them automatically