skills/llm-session-start/SKILL.md
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/mnn/executorch pins.
npx skillsauth add arm-examples/llm-runner llm-session-startInstall 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 tool does not automatically run commands on repo initialization just because AGENTS.md/skills exist. This skill provides a one-command workflow you can invoke at the start of a session.
Windows note: if python3 isn’t available, use python (or py -3) for the scripts below.
For generic build/CTest debugging, prefer skills/llm-build-and-ctest/ or skills/llm-debug-test-failures/ instead of this skill.
python3 skills/llm-session-start/scripts/start.py build
This runs:
python3 scripts/dev/llm_doctor.py --build-dir <build-dir>python3 scripts/dev/framework_versions.py --build-dir <build-dir>From repo root:
python3 scripts/dev/llm_doctor.py --build-dir build
If there is no build/ yet, you can still validate test wiring for a specific backend:
python3 scripts/dev/llm_doctor.py --build-dir build --llm-framework llama.cpp
The upstream update check contacts Git remotes and requires network access. If the process runs in a sandboxed environment, enable network access in the sandbox configuration, restart the process, and verify it works (see skills/README.md):
python3 skills/llm-session-start/scripts/start.py build --network
Exit code behavior:
0: no updates detected2: updates available1: error checking upstreamIf updates are available, see the “Bump pinned framework versions” section below.
python3 scripts/dev/collect_debug_bundle.py build .
This produces llm-debug-bundle-<timestamp>.tar.gz with environment info, CMake logs/cache, and (if available) last CTest logs plus git status/diff.
This repo pins backend dependencies via cache variables in the backend CMake files under src/cpp/frameworks/. Updates may require wrapper changes in src/cpp/frameworks/<backend>/ if upstream APIs changed.
python3 scripts/dev/framework_versions.py --build-dir build
onnxruntime and onnxruntime-genai together; compatibility can be strict.git ls-remote --tags https://github.com/ggerganov/llama.cpp.git | tail
git ls-remote --tags https://github.com/microsoft/onnxruntime.git | tail
git ls-remote --tags https://github.com/microsoft/onnxruntime-genai.git | tail
git ls-remote --tags https://github.com/alibaba/MNN.git | tail
git ls-remote --tags https://github.com/pytorch/executorch.git | tail
src/cpp/frameworks/llama_cpp/CMakeLists.txt: LLAMA_GIT_SHAsrc/cpp/frameworks/onnxruntime_genai/CMakeLists.txt: ONNXRUNTIME_GIT_TAG, ONNXRT_GENAI_GIT_TAGsrc/cpp/frameworks/mnn/CMakeLists.txt: MNN_GIT_TAGsrc/cpp/frameworks/executorch/CMakeLists.txt: EXECUTORCH_GIT_TAGcmake --preset=native -B build -DLLM_FRAMEWORK=<backend>
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
If JNI is unrelated to the bump, isolate failures:
cmake --preset=native -B build -DLLM_FRAMEWORK=<backend> -DBUILD_JNI_LIB=OFF
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
src/cpp/frameworks/<backend>/.skills/llm-session-start/references/upgrade-triage.md for common patterns and what to capture in bug reports.If you want this to run automatically before launching the tool, create a shell alias/wrapper outside the repo (see skills/llm-session-start/references/wrapper-alias.md).
See skills/llm-session-start/references/what-it-checks.md for what doctor checks cover.
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 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, mnn, executorch).
testing
Safely add or change model config schema keys (JSON) and update parsing, tests, and docs. Use when editing model_configuration_files schema or LlmConfig parsing without doing broader model onboarding.