# Send Context Gatekeeper to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "context-gatekeeper",
    "name": "Context Gatekeeper",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/Davienzomq/context-gatekeeper",
    "canonicalUrl": "https://clawhub.ai/Davienzomq/context-gatekeeper",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/context-gatekeeper",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-gatekeeper",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "context/current-summary.md",
      "context/history.txt",
      "context/sample-history.txt",
      "context/test-summary.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "context-gatekeeper",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T18:48:42.542Z",
      "expiresAt": "2026-05-07T18:48:42.542Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-gatekeeper",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=context-gatekeeper",
        "contentDisposition": "attachment; filename=\"context-gatekeeper-0.1.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "context-gatekeeper"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/context-gatekeeper"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/context-gatekeeper",
    "downloadUrl": "https://openagent3.xyz/downloads/context-gatekeeper",
    "agentUrl": "https://openagent3.xyz/skills/context-gatekeeper/agent",
    "manifestUrl": "https://openagent3.xyz/skills/context-gatekeeper/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/context-gatekeeper/agent.md"
  }
}
```
## Documentation

### 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

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


Execute o guardião:
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.
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.
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).
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Davienzomq
- Version: 0.1.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T18:48:42.542Z
- Expires at: 2026-05-07T18:48:42.542Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/context-gatekeeper)
- [Send to Agent page](https://openagent3.xyz/skills/context-gatekeeper/agent)
- [JSON manifest](https://openagent3.xyz/skills/context-gatekeeper/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/context-gatekeeper/agent.md)
- [Download page](https://openagent3.xyz/downloads/context-gatekeeper)