skills/llm-change-api-safely/SKILL.md
Make safe changes to the public C++ API (src/cpp/interface/) and its implementations (C++ + optional JNI), including updating tests and preserving compatibility where possible. Use when adding new features/methods, changing behavior, or refactoring interface/bridge code in this repository.
npx skillsauth add arm-examples/llm-runner llm-change-api-safelyInstall 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.
The public C++ surface is LLM in src/cpp/interface/Llm.hpp, implemented in src/cpp/Llm.cpp and backed by framework-specific implementations under src/cpp/frameworks/. JNI bindings (if enabled) live under src/cpp/LlmJni.cpp and src/java/.
Windows note: if python3 isn’t available, use python (or py -3) for the scripts below.
src/cpp/interface/src/cpp/Llm.cpp, src/cpp/LlmBridge.cppsrc/cpp/config/src/cpp/frameworks/src/cpp/LlmJni.cpp, src/java/test/cpp/Load the checklist reference: skills/llm-change-api-safely/references/api-change-checklist.md.
test/cpp/.cmake --preset=native -B build
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
To isolate C++ changes from Java/JNI issues:
cmake --preset=native -B build -DBUILD_JNI_LIB=OFF
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
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).