context-self-management

context-self-management is a skill for Claude Code, Codex from zts212653/clowder-ai. It costs 47 tokens per session (898 once invoked), scanned A, original, MIT.

A guide for managing long coding-agent sessions when context becomes crowded or project paths become confusing. It helps decide whether to continue, compress the context, or prepare a handoff note.

In plain words
What is it for?
Use it to recognize session drift, finish the current task to a clean stopping point, or record completed work, next steps, decisions, and things to avoid.
Why use it?
It reduces the risk of losing important in-progress details or mixing up repositories and tasks during extended work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to recognize session drift, finish the current task to a clean stopping point, or record completed work, next steps, decisions, and things to avoid.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zts212653/clowder-ai/context-self-management
About the project

Clowder AI is a self-hosted workspace where AI agents from different model families work together as a persistent team, retaining identities, shared evidence, and memory across tasks. It is for people who want to coordinate multiple AI agents without repeatedly rebuilding their context.

zts212653/clowder-ai · 2,924 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zts212653/clowder-ai --skill context-self-management
Clone the repo
git clone --depth 1 https://github.com/zts212653/clowder-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-self-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/zts212653/clowder-ai/context-self-management.svg)](https://agentmods.dev/skills/zts212653/clowder-ai/context-self-management)
Your own site
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/context-self-management"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/context-self-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.00898
Opus 5 $0.00023 $0.00449
Sonnet 5 $0.00009 $0.00180
Haiku 4.5 $0.00005 $0.00090

Measured 8d ago against content hash 4e57e24b5ba7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

context-self-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cat-cafe-skills/context-self-management/SKILL.md · 43 lines

What it actually says

Context 自管理:handoff vs 压缩是个判断 🐾

系统发来 context_management_hint(warn) = 你进了 warn 区(离 auto-seal 还有一段)。 系统知道何时该想(context% 是你的盲区,它替你盯);干什么由你判——别一看 warn 就反射 handoff,也别无脑等压缩。

compress ≠ 坏事。干一半连贯的活、还没压过 → 压缩反而保住 in-flight 线索;这时硬 handoff 会把半成品工作态丢给一个写不全五件套的"干净自己",更糟。

三问自检(系统给数据,你下判断)

  1. 线还是树?(脏=话题漂移)这一程是一条主线,还是 a→g 一堆不相关的事?
    • 客观锚:compressionCount > 0 ⇒ 你已经跑很久了,警惕自己低估漂移(Ragdoll尤其爱把树硬串成线)。
    • 摩擦锚:同一肉身 session 连续处理多条 GitHub issue/PR、跨 repo review/tracking,且开始混淆 tracker repo / source truth repo / thread projectPath ⇒ 当作树状漂移信号,进入本矩阵。
  2. 有干净断点吗? 手头这件事到没到一个能利落收尾的点?干一半 = 没有。
  3. fill 可信度? hint 里 fillConfidenceexact_token 信那个 %;approx_token/bytes_health 当弱信号;unavailable 别看 %、纯靠①②自检。

2×2 决策矩阵

干净断点 干一半(中途)
脏/已压多轮 handoff — 换干净桌子只带要紧纸条 冲刺模式:聚焦完成到最近断点再 handoff(warn→auto-seal 的窗口=预算)
干净/没怎么压 (也没必要折腾) 压缩/续 — 保 in-flight 线索

怎么动手

  • handoff → 调 cat_cafe_propose_session_handoff手写五件套(做完了啥 / 正在做啥 / 下一步 / 关键决策与坑 / 别碰啥)。这是给"干净的自己"的纸条,不是给别的猫——交给别的猫是 cross-cat-handoff。提案要人来 gate,你不自己封。
  • 冲刺 → 不 handoff 不主动压,盯着把当前任务推到最近干净断点,到了再 handoff;真撞 auto-seal 了有 F24 兜底。
  • 续/压缩 → 啥都不用做,继续干;CLI 该压会压,线索还在。

反模式:一 warn 就 handoff(丢半成品线索)/ 一 warn 就清空重来(那是焦虑不是判断)。判据永远是"线还是树 + 有没有干净断点",不是 context% 数字本身。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 43 lines · 47 tokens per session scan A 4e57e24b5ba7

Subscribe to this mod's changes

context-self-management is a skill published in the GitHub repository zts212653/clowder-ai (2,924 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 898 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens