Agent skill

Memory Governance

by kid0317 in kid0317/crewai_mas_demo

A skill your agent uses to audit and clean up workspace memory files and the skills directory.

No licenceAuto-check: notesAgent Workflows

Install Memory Governance

skills CLI
$ npx skills add kid0317/crewai_mas_demo --skill memory-governance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kid0317/crewai_mas_demo memory-governance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kid0317/crewai_mas_demo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/memory-governance .claude/skills/memory-governance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-governance
GitHub stars
164
Token cost
~1.5k tokens
SKILL.md length
174 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
None found

At a glance

A skill your agent uses to audit and clean up workspace memory files and the skills directory.

  • Works in 3 steps: Context Rot(上下文腐化):Transformer 的 O(n²)… → Memory… → Memory Security(记忆安全):时序脱钩攻击(MemoryGraft…
  • Audit and clean up workspace memory files and the skills directory
  • SKILL.md covers 概述 and 步骤
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Memory Governance is an agent skill from kid0317/crewai_mas_demo. Use this skill to audit and clean up workspace memory files and the skills directory. Activate when: - memory.md is approaching 150+ lines (Bootstrap limit is 200) - User requests a memory cleanup or audit - Skills directory has grown large and may contain duplicates or stale entries - memory-save reports that memory.md is near the limit Do NOT activate for: normal conversation, saving new memories (use memory-save), creating new skills (use skill-creator).

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Skill authoring.

When your agent uses it

  • Audit and clean up workspace memory files and the skills directory
  • Tasks that involve Skill authoring

Example prompts

  • “/memory-governance”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Bash

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Context Rot(上下文腐化):Transformer 的 O(n²) 注意力机制——记忆越多,每条记忆能获得的注意力越少,模型找到相关信息的能力指数级退化。50k-150k tokens 区间就开始显现,与理论 context limit…
  2. Memory Decay(记忆腐化):文件系统记忆不会自动衰减。旧偏好和新事实以完全相同的权重共存。学术文献(MemoryBank arXiv:2305.10250)称之为 "stale facts problem":记忆不会自愈,只会越来越错。
  3. Memory Security(记忆安全):时序脱钩攻击(MemoryGraft arXiv:2512.16962)——攻击者植入伪造的"历史经验",数周后被语义相似的真实场景触发,执行恶意行为。传统沙盒和 filter 对此无效。

What it can do on your machine

Read from SKILL.md and the folder at commit d5cfc79. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Governance loads about 1.5k tokens when it runs. Until then it costs about 120 tokens; SKILL.md has 174 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 174 words (~1,519 tokens).

“定期审计 workspace 记忆文件和 skills/ 目录,输出结构化分析报告, 用户确认后执行清理操作,防止记忆腐化和技能目录膨胀。”

— opening of SKILL.md by kid0317
name
memory-governance
allowed-tools
Read, Write, Bash

Read the full SKILL.md on GitHub

Files

Just SKILL.md in skills/memory-governance of kid0317/crewai_mas_demo.

Open the folder on GitHubat commit d5cfc79

Compare with similar skills

Memory Governance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Governance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Governance this skillkid0317/crewai_mas_demo164—~1.5kAutomated safety check: NotesNone
Skill CreatorAzure/azqr79589 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k11 repos~3.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Claude Code Command Developmentanthropics/claude-plugins-official38k10 repos~4.8kAutomated safety check: PassApache-2.0
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0

Similar skills

  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 11 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    38k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Skill Release Gate

    rohitg00/ai-engineering-from-scratch

    Evaluates an Agent Skill bundle before release for structure, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity and host portability.

    66k GitHub stars~1k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from kid0317/crewai_mas_demo

All 12 skills in this repo
  • Skill Creator

    kid0317/crewai_mas_demo

    Create new skills and save them to the project's shared skills directory.

    164 GitHub stars~1.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Mailbox

    kid0317/crewai_mas_demo

    收发邮件,与团队成员通信。第27课新增:支持向 human.json 发消息(单一接口约束:只有 manager 可以发)。

    164 GitHub stars~726 tokensUpdated 4 mo ago
    Auto-check passed
  • Mailbox Ops

    kid0317/crewai_mas_demo

    数字员工邮箱操作(三态状态机):sendmail / readinbox / markdone / markdoneall / resetstale。

    164 GitHub stars~700 tokensUpdated 4 mo ago
    Auto-check passed
  • Memory Save

    kid0317/crewai_mas_demo

    A skill your agent uses to persist important information from the conversation to workspace files so it survives across sessions.

    164 GitHub stars~781 tokensUpdated 4 mo ago
    Auto-check passed
  • Self Retrospective

    kid0317/crewai_mas_demo

    Agent 自我复盘:读取 L2/L3/L1 日志,调用 LLM 生成结构化改进提案, 写入 proposals.json 并发通知至 human.json 等待审批。

    164 GitHub stars~505 tokensUpdated 4 mo ago
    Auto-check passed
  • Software Dev Sop

    kid0317/crewai_mas_demo

    Software development delivery SOP for an Orchestrator agent.

    164 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Memory Governance

What does Memory Governance do?

A skill your agent uses to audit and clean up workspace memory files and the skills directory. Memory Governance is an agent skill from kid0317/crewai_mas_demo. Use this skill to audit and clean up workspace memory files and the skills directory.

When should I use Memory Governance?

Memory Governance fits situations like: audit and clean up workspace memory files and the skills directory; tasks that involve Skill authoring.

How do I install Memory Governance in Claude Code?

Run `npx skills add kid0317/crewai_mas_demo --skill memory-governance -a claude-code`. Or copy the skill folder (skills/memory-governance in kid0317/crewai_mas_demo) into .claude/skills/memory-governance in your project. Claude Code loads it when a task matches its description.

How do I install Memory Governance in Codex?

Run `npx skills add kid0317/crewai_mas_demo --skill memory-governance -a codex`. Or copy the skill folder (skills/memory-governance in kid0317/crewai_mas_demo) into .agents/skills/memory-governance in your project. Codex loads it when a task matches its description.

Can I use Memory Governance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kid0317/crewai_mas_demo --skill memory-governance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-governance, .gemini/skills/memory-governance, .github/skills/memory-governance and .opencode/skills/memory-governance in your project.

What does Memory Governance need to run?

SKILL.md names no scripts, command-line tools or credentials: Memory Governance is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Bash.

Does Memory Governance access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Governance safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Memory Governance use?

No licence was found for Memory Governance or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Memory Governance use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Memory Governance?

Skills that share tags, products or a category with Memory Governance: Skill Creator (Azure/azqr, 795 stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars), Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars) and Claude Code Command Development (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Governance?

kid0317 (a GitHub user) maintains it in kid0317/crewai_mas_demo, which has 164 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on May 25, 2026.

Source: kid0317/crewai_mas_demo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.