Nodes/ComfyUI-llamacpp-helper/Load llama.cpp Skill
ComfyUI Node

Load llama.cpp Skill

Load a skill folder into your llama.cpp model — SKILL.md as a system prompt

By bbaudio-2025·Created 3 days ago·Updated 3 days ago· 0
Load llama.cpp Skill
    • skill
    skill
    include_filestrue
    include_imagestrue
    max_file_chars8000

    If you've poked at Claude Code or opencode, you already know what a "skill" is: a folder with a SKILL.md at the top plus supporting files, telling the model how to do a specific job. This node lifts that exact idea and feeds it to your local llama.cpp model. Load a skill folder here, wire the handle into the "LLM (llama.cpp server)" node, and the skill's instructions ride along as the system prompt on every generation.

    That's genuinely useful in an image pipeline. The classic move is a prompting-guide skill: drop a video or image model's official prompting guide into a folder as the skill's text files, then ask the LLM "write me a prompt for the next scene" - and it answers using that guide instead of its vague generic instincts. It's the difference between a local LLM that improvises and one that follows house rules.

    How it works. Load the node, pick a skill directory, and it reads SKILL.md as the instruction. Then, if you leave include_files on, it walks the folder and collects every text-ish file (markdown, txt, py, js, json, yaml, csv, html, css, shell scripts…) into a references blob, each prefixed with its path relative to the skill root so the model knows what it's reading. Images work too: include_images keeps them out of the text blob and hands them to the LLM node as data URLs at generation time. The output is a single LLAMACPP_SKILL handle.

    The inputs that matter:

    • skill - required dropdown of skill directories, scanned from skill_roots in config.json. Only folders containing a SKILL.md appear in the list.
    • include_files / include_images (both default on) - strip either to slim the context: just the instructions, no reference files.
    • max_file_chars (8000) - cap per-file size; anything longer gets truncated with a ...[truncated] marker instead of eating your whole context window. Drop it to 0 to disable the cap (not recommended).

    Output: one skill output of type LLAMACPP_SKILL, going into the LLM node's skill input. Nothing runs yet at this stage - the real work happens when the LLM node injects it.

    Setup and gotchas. The dropdown reads skill_roots from config.json in the pack folder, and the shipped default points at the author's opencode skill directory - which won't exist for you. Edit that line to a real folder, drop a skill directory in, restart ComfyUI, and it'll show up. Paste a path manually and the node will happily accept it - but it errors with no SKILL.md found if the directory doesn't have one, which is fair: a skill without an instruction file is just a folder.

    One honest limitation: this is a system-prompt injector, not a retrieval system. Every included file lands in the prompt on every call, so a fat skill folder silently inflates your context and your token cost per generation. Keep skills lean - the guide, not the whole repo - and watch context_size on the Load node if you're feeding it big files. For short, structured jobs - "follow this format", "stick to this style guide" - it works great. For "search my entire documentation," it's the wrong tool.

    CategoryLLM/llama.cpp

    Inputs (4)

    NameTypeDefaultDescription
    skillCOMBO1 options:
    include_filesoptBOOLEANtrue
    include_imagesoptBOOLEANtrue
    max_file_charsoptINT80000–100000

    Outputs (1)

    NameTypeDescription
    skillLLAMACPP_SKILL