Auto memory tool permission fencing

From ychampion/cskill-agents · View interactive version

Auto memory tool permission fencing is an AI agent skill from the GitHub repository ychampion/cskill-agents. Gate every tool call in the auto-memory extract agent so only safe read-only actions and targeted writes execute.

How to use this skill

Skill file

SKILL: Auto Memory Tool Permission Fencing

Domain: permissions

Trigger: Apply whenever a background auto-memory agent must be limited to safe read-only commands and writes that target the memory directory.

Source Pattern: Distilled from reviewed permission, shell-safety, and worktree-management implementations.

Core Method

Route every tool call from the auto-memory agent through one permission adapter. That adapter should allow only safe read operations plus tightly scoped writes into the memory directory, while rejecting all other commands with a consistent denial message. Shell access must be limited to a vetted read-only subset, and file edits must be checked against the memory path boundary before execution. This keeps the background extractor useful without giving it broad workspace or shell power.

Key Rules

Example Application

When spinning up an auto-memory extractor, pass this guard into the agent’s context so the model can safely Read the session transcript and Write the new md files without accidentally invoking git push or editing unrelated workspace files.

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.