<h1 align="center">
<a href="https://prompts.chat">
Thank you for your interest in contributing to ComfyUI Skills OpenClaw!
Loading actions...
<a href="https://prompts.chat">
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend linting, type safety, or ESLint configuration.
risks
Thank you for your interest in contributing to ComfyUI Skills OpenClaw!
This document covers the design principles and practical guidelines for contributing to this project. Please read it before submitting a PR.
This project follows a Skills + CLI architecture:
SKILL.md (Agent contract) — Tells the agent WHEN and WHY
↓
comfyui-skill CLI (PyPI) — Provides the HOW (commands)
↓
ComfyUI Server (HTTP API) — Does the actual work
SKILL.md), the Web UI, shared scripts, and workflow storage.Every new feature must pass this checklist before being added:
Good examples:
cancel — No way to stop a running job without it. Atomic, no workaround.free — No way to release GPU memory without it. Atomic, no workaround.Bad examples:
batch-run — Can be achieved by calling submit multiple times.schema-edit — Can be done by editing schema.json directly.workflow-rename — Can be done with mv on the directory.To prevent SKILL.md from growing out of control as CLI features increase, we use a three-layer approach:
Layer 1: description (in frontmatter)
→ Agent reads this to decide whether to load the skill.
→ Keep it short and trigger-focused.
Layer 2: SKILL.md body (loaded into agent context)
→ Only write WHEN and WHY, not HOW.
→ Decision routing, special behavior patterns, gotchas.
→ This is the most expensive layer (consumes context window).
Layer 3: cliHelp + --help + references/ (on-demand discovery)
→ Agent runs `comfyui-skill --help` to discover commands.
→ Agent runs `comfyui-skill <cmd> --help` for syntax details.
→ Detailed docs live in references/ and are read only when needed.
Key rule: SKILL.md growth should be logarithmic, not linear.
Adding a standard command (like cancel or free) should only require one line in the Quick Decision section. Only commands that require special agent behavior (like the polling pattern for submit + status) deserve detailed documentation in SKILL.md.
| Content | Example | Belongs? |
|---|---|---|
| Decision routing | "User says X → use command Y" | Yes |
| Special agent behavior | Polling pattern, parameter assembly | Yes |
| Gotchas and pitfalls | Directory sensitivity, API key setup | Yes |
| Command syntax and parameters | --args, --repos flags | No (use --help) |
| Return value JSON format | Full JSON response examples | No (JSON is self-describing) |
| Standard CRUD operations | cancel, free, queue list | No (command name + --help is enough) |
When adding a CLI command:
--help text, and JSON output should be clear enough that an agent can use it without reading SKILL.md.--json output. Agents rely on structured output.hint field in the error response with actionable guidance. Don't just pass through raw error messages.output_result() for success, output_error() for failure, same server resolution logic.main. Never push directly to main.tests/.python -m unittest discover -s tests -p "test_*.py"main with a clear description of what and why.Follow Conventional Commits:
feat: add cancel command for interrupting running jobs
fix: handle timeout in dependency check
docs: update SKILL.md quick decision section
chore: update .gitignore patterns
When a new CLI command is added:
--help.--help already covers.When you identify a common error pattern from ComfyUI:
error_hints.py in the CLI repo.typer or other CLI framework imports (keep them isolated).Before submitting a PR with new ComfyUI API interactions:
Open an issue at GitHub Issues or reach out to the maintainers.