Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

guard — Session Context Protection Daemon

Runs a background daemon that watches your Claude Code session size and prunes context before auto-compaction wipes your state.

UtilitiesIntermediate★ 420⑂ 39AI score 9/10Last updated: Jul 3, 2026

What it does

  • Launches the cozempic guard daemon in the background to continuously monitor session size in MB or tokens.
  • At the soft threshold (default 60% of hard) it applies a gentle prune with no reload; at the hard threshold (default 50MB) it applies the full prescription and auto-reloads while preserving team state.
  • Checkpoints agent team state (TeamCreate, SendMessage, tasks) every 30 seconds so auto-compaction can't silently discard it.
  • Writes logs and a PID file to /tmp/cozempic_guard_* so you can check status or stop the daemon at any time.

Who it's for

  • Anyone whose long sessions keep hitting compaction and losing context.
  • Teams running multi-agent orchestration where losing team state is costly.
  • Developers doing multi-hour refactors or debugging inside one session.

Examples

  1. Say "turn on guard" → the daemon starts with the recommended --threshold 50 -rx standard --interval 30.
  2. Prune earlier without restarting Claude: cozempic guard --daemon --threshold 30 --no-reload.
  3. Check status with ls /tmp/cozempic_guard_*.pid, review activity with tail -20 /tmp/cozempic_guard_*.log, and stop with kill "$(cat /tmp/cozempic_guard_*.pid)".

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/Ruya-AI/cozempic/HEAD/plugin/skills/guard/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the plugin/skills/guard folder from the GitHub repo Ruya-AI/cozempic into my ~/.claude/skills/guard/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/Ruya-AI/cozempic.git && mkdir -p ~/.claude/skills && cp -r cozempic/plugin/skills/guard ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and clone the repo: git clone https://github.com/Ruya-AI/cozempic.git
  2. Create the skills directory: mkdir -p ~/.claude/skills
  3. Copy the skill in: cp -r cozempic/plugin/skills/guard ~/.claude/skills/
  4. This skill requires the cozempic CLI. Follow the repo README to install it, then verify with cozempic --help.
  5. Restart Claude Code and ask it to "turn on guard" to start the daemon.
  6. Confirm it's running with ls /tmp/cozempic_guard_*.pid; stop it later with kill "$(cat /tmp/cozempic_guard_*.pid)".