Skip to content

aboylabs/ai-agent-skills / skills/creative/comfyui

comfyui

Flagged

Generate images, video, and audio with ComfyUI — install, launch, manage nodes/models, run workflows with parameter injection. Uses the official comfy-cli for lifecycle and direct REST/WebSocket API for execution.

FileKindSize
SKILL.mdskill md23.5 KB
references/official-cli.mdmarkdown7.4 KB
references/rest-api.mdmarkdown10.1 KB
references/workflow-format.mdmarkdown7.8 KB
scripts/_common.pyscript33.0 KB
scripts/auto_fix_deps.pyexecutablescript8.1 KB
scripts/check_deps.pyexecutablescript16.8 KB
scripts/comfyui_setup.shexecutablescript10.2 KB
scripts/extract_schema.pyexecutablescript11.0 KB
scripts/fetch_logs.pyexecutablescript5.6 KB
scripts/hardware_check.pyexecutablescript17.4 KB
scripts/health_check.pyexecutablescript8.0 KB
scripts/run_batch.pyexecutablescript8.9 KB
scripts/run_workflow.pyexecutablescript30.9 KB
scripts/ws_monitor.pyexecutablescript10.3 KB
tests/README.mdmarkdown2.1 KB
tests/conftest.pyscript1.4 KB
tests/pytest.iniconfig132 B
tests/test_check_deps.pyscript2.3 KB
tests/test_cloud_integration.pyscript4.2 KB
tests/test_common.pyscript16.0 KB
tests/test_extract_schema.pyscript7.8 KB
tests/test_run_workflow.pyscript8.5 KB
workflows/README.mdmarkdown3.8 KB
workflows/animatediff_video.jsonconfig2.0 KB
workflows/flux_dev_txt2img.jsonconfig2.2 KB
workflows/sd15_txt2img.jsonconfig1.4 KB
workflows/sdxl_img2img.jsonconfig1.6 KB
workflows/sdxl_inpaint.jsonconfig1.8 KB
workflows/sdxl_txt2img.jsonconfig1.4 KB
workflows/upscale_4x.jsonconfig864 B
workflows/wan_video_t2v.jsonconfig2.1 KB

tests/test_check_deps.py

View on GitHub
"""Tests for check_deps.py — focuses on parsing logic that doesn't need a server."""

from __future__ import annotations

from check_deps import (
    NODE_TO_PACKAGE,
    model_present,
    normalize_for_match,
    suggest_install_command,
)


class TestNormalizeForMatch:
    def test_basic(self):
        s = normalize_for_match("model.safetensors")
        assert "model.safetensors" in s
        assert "model" in s

    def test_subfolder(self):
        s = normalize_for_match("subdir/model.pt")
        assert "subdir/model.pt" in s
        assert "model.pt" in s
        assert "model" in s


class TestModelPresent:
    def test_exact_match(self):
        assert model_present("a.safetensors", {"a.safetensors", "b.safetensors"}) is True

    def test_extension_difference(self):
        # User said "model" but installed is "model.safetensors"
        assert model_present("model", {"model.safetensors"}) is True
        # Reverse direction — also matches
        assert model_present("model.safetensors", {"model"}) is True

    def test_subfolder_match(self):
        # Installed list has "subdir/model.safetensors", workflow asks "model.safetensors"
        assert model_present("model.safetensors", {"subdir/model.safetensors"}) is True

    def test_missing(self):
        assert model_present("missing.safetensors", {"a.safetensors", "b.safetensors"}) is False

    def test_empty_installed(self):
        assert model_present("anything.safetensors", set()) is False


class TestSuggestInstallCommand:
    def test_known_node(self):
        cmd = suggest_install_command("VHS_VideoCombine")
        assert cmd == "comfy node install comfyui-videohelpersuite"

    def test_unknown_node(self):
        assert suggest_install_command("SomeRandomNodeName123") is None


class TestNodePackageMap:
    def test_no_duplicates(self):
        # Each node should map to exactly one package
        keys = list(NODE_TO_PACKAGE.keys())
        assert len(keys) == len(set(keys))

    def test_packages_are_safe_for_shell(self):
        # Registry slugs must be alphanumerics + hyphens/underscores only
        # (passed straight to `comfy node install <pkg>`).
        import re
        safe = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._\-]*$")
        for pkg in NODE_TO_PACKAGE.values():
            assert safe.match(pkg), f"Unsafe package slug: {pkg!r}"
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall