Compactable tool whitelist gating

From ychampion/cskill-agents · View interactive version

Compactable tool whitelist gating is an AI agent skill from the GitHub repository ychampion/cskill-agents. Only allow cached microcompact to delete tool results for a vetted, pre-gated whitelist of tool names.

How to use this skill

Skill file

SKILL: Compactable Tool Whitelist Gating

Domain: microcompaction

Trigger: Apply when cache-editing compacts conversation transcripts and must avoid deleting outputs from tools that cannot be safely re-run or are non-text.

Source Pattern: Distilled from reviewed session memory, compaction, and context-budgeting implementations.

Core Method

Define a fixed set of safe tools whose outputs can be trimmed via cached microcompact. Compose the set from shell tools, file read/write utilities, grep/glob/web fetch/search, and optionally other text-generating helpers. The microcompact path consults this set to decide whether to register a tool result for deletion, so no unsupported or stateful tools ever get silently mutated.

Key Rules

Example Application

When cached microcompact inspects assistant messages, it only registers tool uses whose names appear in compactable tools, ensuring the summarizer never tries to delete non-text or stateful outputs like MCP connectors or tool search metadata.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.