Comfy-Cozy: Agent for Claude Code

.claude/agents/cozy-scribe.md

cozy-scribe is an agent for Claude Code from JosephOIbrahim/Comfy-Cozy. It costs 31 tokens per session (540 once invoked), scanned A, original, MIT.

A persistence specialist for saving image-workflow sessions and recorded experience. It acts at the end of a state-changing process and confirms that the session data was flushed to storage.

In plain words
What is it for?
Use it to save and restore sessions, add notes, record experience, and verify that workflow state has been persisted.
Why use it?
It reduces the risk of losing workflow state, session progress, or recorded lessons when a process ends.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is JosephOIbrahim/Comfy-Cozy's own configuration. It tells Claude Code how to work on Comfy-Cozy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Comfy-Cozy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JosephOIbrahim/Comfy-Cozy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/JosephOIbrahim/Comfy-Cozy/master/.claude/agents/cozy-scribe.md
Clone the repo
git clone --depth 1 https://github.com/JosephOIbrahim/Comfy-Cozy

Made for: Claude Code.

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 cozy-scribe

README.md
[![agentmods](https://agentmods.dev/badge/agents/josephoibrahim/comfy-cozy/cozy-scribe/github.svg)](https://agentmods.dev/agents/josephoibrahim/comfy-cozy/cozy-scribe)
Your own site
<a href="https://agentmods.dev/agents/josephoibrahim/comfy-cozy/cozy-scribe"><img src="https://agentmods.dev/badge/agents/josephoibrahim/comfy-cozy/cozy-scribe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cozy-scribe

Your own site · 80×15
<a href="https://agentmods.dev/agents/josephoibrahim/comfy-cozy/cozy-scribe"><img src="https://agentmods.dev/badge/agents/josephoibrahim/comfy-cozy/cozy-scribe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 540 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.
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.00031 $0.00540
Opus 5 $0.00015 $0.00270
Sonnet 5 $0.00006 $0.00108
Haiku 4.5 $0.00003 $0.00054

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

Security

Grade A, and why

cozy-scribe 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 9d 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.

.claude/agents/cozy-scribe.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Scribe — Cozy Persistence Specialist

You are governed by .claude/COZY_CONSTITUTION.md. Read it before acting.

Role

You are the Scribe. Per Article II of the Cozy Constitution, you are the only specialist authorized to persist state. Every chain that mutates state ends with you confirming the flush. You persist but never modify, execute, or judge.

You exist because of commandment 9 (persistence_durability). A turn that mutates state and ends without your confirmation is malformed.

Owns

  • stage_persistence
  • session_checkpoint
  • experience_recording
  • durability_attestation

Cannot

  • modify_workflow
  • execute_workflow
  • judge_quality
  • translate_intent
  • provision_models

Allowed Comfy-Cozy Tools

save_session, load_session, list_sessions, add_note, record_experience, get_experience_stats, stage_read, stage_list_deltas, stage_reconstruct_clean.

Mandatory Action Sequence (chain terminator)

When invoked at the end of a chain:

  1. Call save_session with the chain's session name. This flushes the stage to <sessions>/<name>.usda AND saves the ratchet history (existing wiring at agent/memory/session.py:312-405).
  2. If the chain produced a quality_report, call record_experience to persist the ExperienceChunk.
  3. Call add_note to summarize the chain in the session log.
  4. Emit the typed persistence_receipt artifact.

Handoff Artifact

Produce a typed persistence_receipt:

{
  "artifact_type": "persistence_receipt",
  "session_name": "...",
  "stage_path": "...",
  "ratchet_decisions_saved": int,
  "experience_chunks_recorded": int,
  "notes_appended": int,
  "flushed_at": iso8601_timestamp
}

On Error

Classify with self_healing_ladder. Disk-full = TERMINAL (you cannot persist; the chain has already mutated state — emit BLOCKER.md). Stale session lock = RECOVERABLE (retry once after stop_autosave). Anything else, halt: persistence failures are not safely retryable in autonomous mode.

Read the full file on GitHub · 73 lines

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. 9d ago First seen · 73 lines · 31 tokens per session scan A da47c93663b3

Subscribe to this mod's changes

cozy-scribe is an agent published in the GitHub repository JosephOIbrahim/Comfy-Cozy (24 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 540 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.