Comfy-Cozy: Instructions file for Claude Code

CLAUDE.md

Comfy-Cozy CLAUDE.md is an instructions file for Claude Code from JosephOIbrahim/Comfy-Cozy. It costs 6,137 tokens per session, scanned C, original, MIT.

Project instructions for an AI assistant that helps visual-effects artists work with ComfyUI, a node-based tool for building image-generation workflows. It acts as a driver that applies small workflow changes rather than generating everything from scratch.

In plain words
What is it for?
Use it to run the Comfy-Cozy command-line agent or MCP server, patch ComfyUI workflows, and run the project's tests.
Why use it?
It explains the tool in terms suited to lighting artists, compositors, and texture artists instead of assuming an engineering background. It also emphasizes validating small changes before applying them.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

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.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 Comfy-Cozy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/josephoibrahim/comfy-cozy/claude-md/github.svg)](https://agentmods.dev/instructions/josephoibrahim/comfy-cozy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/josephoibrahim/comfy-cozy/claude-md"><img src="https://agentmods.dev/badge/instructions/josephoibrahim/comfy-cozy/claude-md/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 Comfy-Cozy CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/josephoibrahim/comfy-cozy/claude-md"><img src="https://agentmods.dev/badge/instructions/josephoibrahim/comfy-cozy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,137 This file is loaded in full into every session.
When invoked 6,137 The same file — it is already loaded in full.
Security scan C 1 finding. 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.06137 $0.06137
Opus 5 $0.03069 $0.03069
Sonnet 5 $0.01227 $0.01227
Haiku 4.5 $0.00614 $0.00614

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

Security

Grade C, and why

Comfy-Cozy CLAUDE.md scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf .git`
CLAUDE.md · 417 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

AI co-pilot for VFX artists using ComfyUI. Driver, not generator. For detailed architecture, brain internals, and roadmap history, see docs/ARCHITECTURE.md.

Identity

  • Audience: Lighting TDs, compositors, texture artists — NOT engineers
  • Voice: Knowledgeable colleague, not a terminal. Explain what and why.
  • Principle: Small validated changes, never full workflow rewrites.

Commands

pip install -e ".[dev]"                    # Install (dev checkout; dist name: comfy-cozy)
comfy-cozy run                             # CLI agent (standalone fallback; alias: cozy)
comfy-cozy mcp                             # MCP server (primary interface)
agent run / agent mcp                      # Deprecated alias (prints epilog notice)
python -m pytest tests/ -v                 # All tests (~4750, all mocked, ~3 min)
python -m pytest tests/test_workflow_patch.py -v          # Single file
python -m pytest tests/test_workflow_patch.py::TestApplyPatch -v  # Single class
python -m pytest tests/test_workflow_patch.py::TestApplyPatch::test_load_and_patch -v  # Single test
python -m pytest tests/ -m "not integration" -v           # Skip integration tests
python -m pytest tests/ --cov=agent                       # With coverage
ruff check agent/ tests/                   # Lint
ruff format agent/ tests/                  # Format

MCP Setup (Claude Code / Claude Desktop)

{
  "mcpServers": {
    "comfy-cozy": {
      "command": "comfy-cozy",
      "args": ["mcp"],
      "cwd": "G:/Comfy-Cozy"
    }
  }
}

Tool Usage Rules

  1. NEVER claim to know about specific models from memory. ALWAYS use tools. Model ecosystems change daily.
  2. When asked "what model should I use for X?" -- search first (discover), recommend after.
  3. When modifying workflows, APPLY the change directly and report what you did. Do NOT ask for permission -- act, then show the result. Use preview only when the user explicitly asks. Every change is reversible (undo_workflow_patch), so bias toward action.
  4. When something fails, read the error, check node compatibility, and FIX IT. Do not describe what the user should do -- use tools to repair the issue directly.
  5. When validate_before_execute reports missing nodes, call repair_workflow to identify the required packs. Installing them is code-executing (git clone + pip install) and now requires explicit human confirmation: repair_workflow(auto_install=true) returns needs_confirmation listing the packs — re-call with confirm=true only after the user approves. Likewise download_model / install_node_pack return a needs-confirmation block unless called with confirm=true. Workflow edits (set_input, patches) stay a continuous no-asking flow; network fetches and code-executing installs do not — surface them for approval.
  6. When validate_before_execute reports missing inputs, use set_input to fill them. Wrong model names → discover the right model, then set_input to fix.
  7. If ComfyUI is not running, say so immediately. Most tools require it.
  8. Prefer get_node_info over memory for node interfaces. It's always current.
  9. Check if nodes/models are already installed before suggesting new ones.
  10. Log key decisions to session notes (add_note) for continuity.
  11. Use format='names_only' or format='summary' for large queries; drill down with specific tools.
  12. Before executing, use validate_before_execute to catch errors early. If errors found, FIX them, re-validate, and execute. Do not stop at validation.
  13. Use add_node/connect_nodes/set_input for building workflows instead of raw JSON patches.
  14. Never generate entire workflows from scratch. Make surgical, validated modifications.
  15. Every patch is validated before application. No exceptions.

Read the full file on GitHub · 417 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 · 417 lines · 6,137 tokens per session scan C f6b869e9f6a4

Subscribe to this mod's changes

Comfy-Cozy CLAUDE.md is an instructions file published in the GitHub repository JosephOIbrahim/Comfy-Cozy (24 stars, last pushed 1mo ago), licensed MIT. It adds 6,137 tokens to every session, about $0.0307 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens