skills/llm-backend-scaffold/SKILL.md
Scaffold and integrate a new LLM backend/framework into this repository (new subdir under src/cpp/frameworks, wire LLM_FRAMEWORK routing, configuration options, downloads/models, tests, and docs). Use when adding a new framework, porting a backend, or refactoring backend glue code.
npx skillsauth add arm-examples/llm-runner llm-backend-scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This repo selects a backend via LLM_FRAMEWORK at CMake configure time and routes to a backend-specific integration under src/cpp/frameworks/.
Windows note: if python3 isn’t available, use python (or py -3) for the scripts below.
src/cpp/frameworks/<new>/.If the backend needs downloads (models / jars / tools), plan to extend scripts/py/requirements.json and keep SHA256s accurate.
src/cpp/frameworks/<new-backend>/ with a CMakeLists.txt.Reference: skills/llm-backend-scaffold/references/backend-integration-checklist.md.
src/cpp/frameworks/CMakeLists.txt based on LLM_FRAMEWORK.scripts/cmake/configuration-options.cmake to include the new LLM_FRAMEWORK value in the cache strings list.README.md.model_configuration_files/ for the new backend.src/cpp/config/.test/CMakeLists.txt to include at least one config file in the CONFIG_FILE_NAME selection for the new framework (mirrors existing elseif (${LLM_FRAMEWORK} STREQUAL "...") cases).cmake --preset=native -B build -DLLM_FRAMEWORK=<new> → cmake --build ./build --parallel → ctest --test-dir ./build --output-on-failurescripts/py/requirements.json under the appropriate section.sha256sum for every new URL.scripts/cmake/download-resources.cmake → scripts/py/download_resources.py; gated models require HF_TOKEN (or ~/.netrc).README.md (supported frameworks, build flags, supported models, runtime notes).TROUBLESHOOTING.md if the backend has platform-specific gotchas.tools
Update scripts/py/requirements.json entries (URLs + sha256sum) for models/tools, validate hash changes, and keep downloads deterministic without committing artifacts. Use when adding or refreshing model/tool downloads.
tools
Run fast “session start / doctor” checks for this repository (toolchain + wiring sanity, framework version report, optional upstream update check), optionally generate a debug bundle, and when needed bump pinned backend framework versions with build+ctest verification. Use at session start or when upgrading llama.cpp/onnxruntime-genai/mediapipe/mnn pins.
tools
Run a fast JNI-focused build/test smoke check (JNI on, minimal test run), and isolate JNI toolchain issues. Use when changing JNI/Java code or validating JNI setup.
development
Debug failing LLM integration tests caused by model output drift, incorrect context/runtime parameters (contextSize, batchSize, threads), prompt/template mismatches, or backend/framework regressions. Use when tests fail and you need to see the model response, reproduce a single failing CTest, or trace issues into src/cpp/frameworks (llama.cpp, onnxruntime-genai, mediapipe, mnn).