技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v0.1.1
统计:⭐ 3 · 1.3k · 2 current installs · 2 all-time installs
⭐ 3
安装量(当前) 2
🛡 VirusTotal :良性 · OpenClaw :良性
Package:context-gatekeeper
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill's code, instructions, and files align with its stated purpose (summarizing conversation history to reduce tokens); there are no unexpected network calls, credential requests, or opaque install steps — but it does persist full conversation text to local files, so treat those files as sensitive.
目的
Name/description match the included scripts and README: the Python scripts read a ROLE: message history, extract summary sentences, detect 'pendências' keywords, and write a compact Markdown briefing. No unrelated binaries, credentials, or external services are requested.
说明范围
SKILL.md and the scripts explicitly instruct the agent/operator to append every incoming/outgoing message to context/history.txt and to inject context/current-summary.md before model calls. This is coherent for the purpose but means full conversation content is stored on disk in plaintext; the instructions also recommend running a persistent monitor that regenerates the summary automatically, which increases the amount of time sensitive conten…
安装机制
There is no install spec and all code is local. The skill contains only small Python scripts and Markdown files — no downloads or external package installs are specified.
证书
The skill requires no environment variables, credentials, or configuration paths. The files it accesses are local (context/history.txt and context/current-summary.md), which are appropriate for the skill's stated function.
持久
The skill does not force installation (always:false) and has no special platform privileges. However, the README and SKILL.md recommend running auto_monitor.py (via nohup/ensure script or cron) so the monitor can run continuously; if enabled, that background process will regularly read/write conversation logs and should be treated as persistent software on the host.
综合结论
This skill appears to do what it says: compress conversation history into a short Markdown briefing. Before installing, consider privacy and operational hygiene: 1) the skill stores entire messages in plaintext (context/history.txt, context/current-summary.md and a monitor log) — ensure those files are on an encrypted filesystem or restrict their permissions (chmod 600) and limit who can read them; 2) if you enable the auto-monitor, know it wi…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Context Gatekeeper」。简介:Keeps the conversation token-friendly by summarizing recent exchanges, surfacin…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/davienzomq/context-gatekeeper/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
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
---
# Context Gatekeeper
## Objetivo
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).
## Fluxo mínimo
1. **Registre as trocas**: a cada prompt/resposta, grave uma linha formatada `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
```
2. **Execute o guardião**:
```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.
3. **Use o resumo**: antes de chamar a API (ou responder ao usuário), injete o conteúdo de `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.
4. **Repita**: atualize `context/history.txt` com a nova resposta e execute o script novamente antes do próximo turno.
## Argumentos do script
- `--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).
## Dica de operação diária
- Monte um cron/loop leve que chame o script antes de cada resposta automática.
- Guarde um paralelo `context/pending-tasks.md` e copie a seção "Pendências" do resumo para lá.
- Sempre cite o caminho do resumo no parágrafo inicial da resposta (por exemplo: "Resumo compacto: ...") para facilitar auditoria.
## Por quê isso funciona?
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).