llama-stage-patch-changes
Skill3.8k starsChanged 20 days agoApache-2.0View on GitHub
Use this skill when changing mesh-llm's patched llama.cpp Skippy ABI, runtime hooks, model introspection, tensor filtering, activation-frame execution, GGUF writer surface, upstream pin, or patch queue.
- Deletes or force-pushes
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 11 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Use this skill when changing the Skippy staged-runtime ABI carried in skippy/llama_cpp/patches.
- Very specific: line 21
Keep durable llama.cpp-side changes in the ordered queue under skippy/llama_cpp/patches: top-level core patches first, model_support/series …
- Very specific: line 24
Keep the upstream pin in skippy/llama_cpp/upstream.txt.
- Very specific: line 25
Do not edit .deps/llama.cpp as the final artifact.
- Distinctive: line 27
Keep mesh orchestration, protocol compatibility, lifecycle, model management, and API status behavior in Rust.
- Distinctive: line 29
Keep one functional boundary per patch.
- Very specific: line 31
Put family-specific model support in a focused model_support/ patch.
- Distinctive: line 34
Keep public ABI declarations separate from independently reviewable model lifecycle, loading, and package implementation changes.
- Distinctive: line 39
Do not preserve old native ABI signatures for compatibility.
- Distinctive: line 42
Do not add a terminal source-reorganization patch.
- Very specific: line 50
Put implementations in src/skippy/<capability>.cpp and private C++ declarations in narrowly named src/skippy/*.h headers.
- Very specific: line 52
Use snake_case capability names.
- Distinctive: line 57
Update explicit CMake source lists and installation rules with new modules.
- Distinctive: line 58
Do not preserve retired source include paths unless the task explicitly asks for compatibility.
- Distinctive: line 69
When adding an input-mode profile, cover both an accepting synthetic model and a rejecting variant.
- Very specific: line 75
Treat Doxygen-style comments in include/skippy.h and include/skippy/*.h as the source of truth for the public API reference.
- Very specific: line 77
Every public header and exported skippy_* function must have an adjacent @brief describing what it is used for.
- Distinctive: line 79
When the public header surface changes, prepare the patched checkout and regenerate the website reference before finishing the change:
- Very specific: line 88
Commit mesh/website/src/docs/pages/skippy-api.md alongside the native queue change.
- Distinctive: line 94
Every pull request that changes the Skippy ABI must include an explicit ABI inventory in the PR description.
- Distinctive: line 112
Use this compact table in the PR description:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
llama-stage-patch-changes
New documentation generation automation follows ../manage-ci/SKILL.md:
do not add Python tooling; use typed tools/xtask commands through thin Just
recipes. From the repository root, cargo xtool repo-consistency ci-crate-lists
is a working alias example, not a replacement for the transitional Python API
documentation commands below. Keep them until the Rust port passes parity.
Use this skill when changing the Skippy staged-runtime ABI carried in
skippy/llama_cpp/patches.
Boundaries
- Keep durable llama.cpp-side changes in the ordered queue under
skippy/llama_cpp/patches: top-level core patches first,model_support/seriessecond, andgenerated/serieslast. - Keep the upstream pin in
skippy/llama_cpp/upstream.txt. - Do not edit
.deps/llama.cppas the final artifact; regenerate the patch queue from commits. - Keep mesh orchestration, protocol compatibility, lifecycle, model management, and API status behavior in Rust.
- Keep one functional boundary per patch. Patch numbers must be unique and contiguous within each queue lane.
- Put family-specific model support in a focused
model_support/patch. Keep reusable staged-runtime machinery in the core lane and generated graph annotations in the generated lane. - Keep public ABI declarations separate from independently reviewable model lifecycle, loading, and package implementation changes.
- The Skippy native ABI is an internal lockstep boundary, not a stable cross-version compatibility contract. It may change whenever the feature requires it; update the Rust FFI mirror and all callers in the same change.
- Do not preserve old native ABI signatures for compatibility. Bump the ABI version when the boundary changes so mismatches are diagnosable, and make sure the shipped Rust side and native runtime are built from the same queue.
- Do not add a terminal source-reorganization patch. A deliberate layout or ownership change must be represented in the recreated patches that own the affected capabilities.
Native Source Layout
include/skippy.his an umbrella only. Put public C ABI declarations in standaloneinclude/skippy/<capability>.hheaders.- Put implementations in
src/skippy/<capability>.cppand private C++ declarations in narrowly namedsrc/skippy/*.hheaders. - Use
snake_casecapability names. Keep exported symbols prefixed withskippy_and avoid generichelpers,utils, or expandedcommonmodules. src/skippy.cppis retired. Extend the owning capability module and keep new implementation files below 1,000 lines.- Make every public header independently compilable as both C11 and C++17. Update explicit CMake source lists and installation rules with new modules.
- Do not preserve retired source include paths unless the task explicitly asks for compatibility. Continue to version and mirror any binary ABI change.
Graph input capabilities
- Derive planned input modes from what the graph can execute, not merely from allocated input tensors. Shared builders may allocate an embedding input that a particular model's metadata forbids using.
- Carry capability declarations through both helper construction and direct input-bundle registration. Keep model restrictions at graph construction; do not add family-name dispatch to the generic planner.
- When adding an input-mode profile, cover both an accepting synthetic model and a rejecting variant. Preserve the graph's existing rejection of invalid direct input while ensuring metadata-only planning never probes that mode.
Native API documentation
- Treat Doxygen-style comments in
include/skippy.handinclude/skippy/*.has the source of truth for the public API reference. Every public header and exportedskippy_*function must have an adjacent@briefdescribing what it is used for. When the public header surface changes, prepare the patched checkout and regenerate the website reference before finishing the change:
scripts/prepare-llama.sh pinned cargo xtool automation native-generator contracts api-doc cargo xtool automation native-generator contracts api-doc --check- Commit
mesh/website/src/docs/pages/skippy-api.mdalongside the native queue change. The generated page must not be hand-edited, and its inventory must include every public header and exported function in the prepared checkout.
ABI PR documentation requirements
Every pull request that changes the Skippy ABI must include an explicit ABI inventory in the PR description. Do not describe a changed function signature as a newly added function.
The inventory must state, for each change:
- the exact symbol or declaration name and its complete signature or field change;
- whether it was added, changed, deprecated, deleted, or removed;
- the public header containing the declaration;
- the implementation source and Rust FFI mirror, when applicable;
- the ABI version before and after the change;
- why the change is required and what data or behavior it enables;
- that backward compatibility with older native runtimes is intentionally not required, and that the Rust FFI mirror and callers were updated in lockstep;
- the tests that exercise the native ABI boundary, including public-header compilation when a header changes.
Use this compact table in the PR description:
| Status | Symbol/declaration | Public header | Implementation / mirror | Reason | Lockstep update |
| Changed / Added / Removed | exact name and signature | include/skippy/<capability>.h | src/skippy/<capability>.cpp; Rust FFI path | behavior enabled | Rust mirror/callers updated; old ABI not supported |
For a changed function signature, call out that it is an ABI change even when
the symbol name is unchanged. List removed declarations explicitly as
“none” when no functions or fields were deleted; this prevents reviewers from
having to infer removals from a patch diff. Keep this inventory synchronized
with the ABI version constants in include/skippy/common.h and the mirrors in
skippy/crates/skippy-ffi/src/lib.rs. Do not add compatibility shims solely to
support an older native runtime; the acceptance criterion is a synchronized
Rust/native build and a clear version mismatch if the pieces are mixed.
Local Flow
Prepare the pinned checkout and current patch queue:
scripts/prepare-llama.sh pinnedFor llama-side editing, work in .deps/llama.cpp or another llama.cpp
checkout where commits can be named and inspected. Base the branch on the
pinned upstream, then carry core stage ABI commits, model-support commits, and
generated family commits in that order.
For an ordinary core capability change, emit one focused mail-format patch
after the current top-level core lane. Do not rewrite unrelated entries or put
the patch after model_support/ or generated shards:
repo_root="$(pwd)"
llama_checkout="${LLAMA_CHECKOUT:-$repo_root/.deps/llama.cpp}"
last_patch="$(find skippy/llama_cpp/patches -maxdepth 1 -type f -name '*.patch' | sort | tail -n 1)"
last_number="${last_patch##*/}"
last_number="${last_number%%-*}"
next_number=$((10#$last_number + 1))
git -C "$llama_checkout" format-patch -1 \
--start-number "$next_number" \
--output-directory "$repo_root/skippy/llama_cpp/patches" HEADFor a deliberate queue-boundary or source-layout change, rebuild the affected series from the pinned upstream instead. Create capability-owned commits in their intended order, place declarations and implementation in their final modules from the first patch that introduces them, and format the complete replacement series with contiguous numbering. Before replacing the durable queue, verify both of these invariants:
# The reconstructed commit series has exactly the intended final tree.
git diff --exit-code <authoritative-final-commit> <reconstructed-series-head>
# No patch defers the structural change to the end of the series.
git log --reverse --oneline <pinned-upstream>..<reconstructed-series-head>Move the old queue to an explicit temporary backup, generate the replacement
into a fresh skippy/llama_cpp/patches directory, and retain the backup
until clean application and native compilation pass. Never keep both series or
duplicate patch numbers in the durable directory.
Validation
Validate patch application in a clean checkout:
tmp_root="$(mktemp -d /tmp/mesh-llama.XXXXXX)"
trap 'rm -rf -- "$tmp_root"' EXIT
LLAMA_WORKDIR="$tmp_root/llama.cpp" scripts/prepare-llama.sh pinned
LLAMA_WORKDIR="$tmp_root/llama.cpp" \
MESH_LLM_LLAMA_BUILD_ROOT="$tmp_root/build" \
LLAMA_STAGE_BACKEND=cpu \
LLAMA_STAGE_LINK_MODE=static \
scripts/build-llama.shRe-pinning upstream
Advancing skippy/llama_cpp/upstream.txt can silently invalidate a patch
that depends on upstream's ordering, not just its symbols. The queue still
applies, everything compiles, and the behavior is broken. This happened with
upstream 1269cb1, which moved check_tensor_dims ahead of buft_for_tensor
and left the stage tensor filter running too late; split serving was broken on
main because no test opened a real mid-stage artifact.
So on every re-pin, in addition to the checks above:
- Read
git log <old-pin>..<new-pin> -- src/llama-model-loader.* src/llama-model.*for changes to load order, not just to signatures the patches touch. - Prove the staged load path with a real artifact whose first block is not
block 0.
cargo test -p skippy-package-buildercovers this viamid_stage_artifact_opens_with_the_stage_filter_applied. - Confirm that test actually ran rather than skipped. It is gated on
SKIPPY_CORRECTNESS_MODEL; without it the test printsskipping mid-stage: SKIPPY_CORRECTNESS_MODEL is not setand passes. Grep the CI log formid_stage_artifact_opens_with_the_stage_filter_applied ... ok, or set the variable locally. A skipped gate reads identically to a pass.
Compile each new public header once as C11 and once as C++17 with warnings treated as errors. For implementation moves, run the tests owned by the moved capability in addition to the Rust fallout checks below.
For Rust fallout, run cargo commands serially:
cargo fmt --all --check
cargo check -p mesh-llm
cargo test -p skippy-runtime --lib
cargo test -p skippy-serving --lib
cargo test -p mesh-llm --libPatch files are mail-format artifacts. Do not hand-normalize them in a way that
breaks git am.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about michaelneale/mesh-llm
- A Hacker News story“Pool spare GPU capacity to run LLMs at larger scale”Hacker News · Mar 24, 2026 · 11 points
- @rusttrending.bsky.social“michaelneale / mesh-llm: reference impl with llama.cpp compiled to distributed inference across machines, …”Bluesky · Apr 11, 2026 · 2 likes
- @yug1224.com“複数のLLMを連携させてタスクをこなすための分散型エージェントフレームワークらしい 複雑なワークフローを構築する際に役立ちそうかな yug1224 starred michaelneale/mesh-llm…”Bluesky · Apr 8, 2026 · 1 likes
- Mesh-LLM/mesh-llm“Add mesh-llm MoE planning, analysis, and ranking contribution commands”GitHub · Apr 11, 2026
- Mesh-LLM/mesh-llm“Simplify model for node states”GitHub · Apr 10, 2026
The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 18
Talked about on GitHub, Bluesky and Hacker News (18 times).
On GitHub · 15
- Apr 11, 2026Add mesh-llm MoE planning, analysis, and ranking contribution commands — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Apr 10, 2026Simplify model for node states — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 10, 2026revise mesh publication rules — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Apr 5, 2026Roll out config as local node config first, then reconcile mesh-wide desired state — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 3, 2026CommitLLM sumi capture: working on Apple Silicon Q8_0 — michaelneale/llama.cpp0 reactions
10 more on GitHub
- Apr 2, 2026Add hardware runtime status enrichment without changing model metadata sources — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026Design owner identity propagation and direct verification — Mesh-LLM/mesh-llm0 reactions · 4 comments
- Apr 2, 2026Design owner keystore and Rust signed+encrypted message primitives — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026Track splitting PR #130 into smaller rollout PRs — Mesh-LLM/mesh-llm0 reactions · 2 comments
- Apr 2, 2026research: mesh-llm integration — p2p inference mesh + model sharding under obol-stack economic layer — ObolNetwork/obol-stack0 reactions
- Apr 2, 2026[WIP] Make PR 103 mergable on top of PR 127 — Mesh-LLM/mesh-llm0 reactions
- Apr 2, 2026refactor: decompose mesh.rs and app/mod.rs into focused submodules — Mesh-LLM/mesh-llm0 reactions · 1 comment
- Mar 28, 2026Autoupdater — Mesh-LLM/mesh-llm0 reactions
- Mar 27, 2026Add a staged auto-updater for release bundles — Mesh-LLM/mesh-llm0 reactions
- Mar 27, 2026Add generic bulk transfer support to mesh plugins — Mesh-LLM/mesh-llm0 reactions
On Bluesky · 2
- Apr 11, 2026michaelneale / mesh-llm: reference impl with llama.cpp compiled to distributed inference across machines, with real end to end demo ★720… — @rusttrending.bsky.social2 likes and reposts
- Apr 8, 2026複数のLLMを連携させてタスクをこなすための分散型エージェントフレームワークらしい 複雑なワークフローを構築する際に役立ちそうかな yug1224 starred michaelneale/mesh-llm… — @yug1224.com1 likes and repost
On Hacker News · 1
- Mar 24, 2026Pool spare GPU capacity to run LLMs at larger scale11 points · 3 comments
Other versions1 project uses a version of this.
Word for word · 1
- Mesh-LLM/mesh-llm★ 3.5k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- mesh/AGENTS.mdAGENTS.md
- skippy/AGENTS.mdAGENTS.md
- benchmark-tuneSkill
- config-settings-managementSkill
- connect-agentsSkill
- deploy-linux-gpuSkill
- deploy-macosSkill
- deploy-windowsSkill
- hf-bf16-gguf-conversion-jobsSkill
- hf-gguf-quant-jobsSkill
- hf-layer-package-jobsSkill
- hf-quant-and-layer-package-jobsSkill
- kv-tool-loop-stabilitySkill
- llama-patch-changesSkill
- manage-ciSkill
- mesh-joinSkill
- metrics-serverSkill
- plugin-web-ui-extensionSkill
- release-notesSkill
- release-validationSkill
- remote-observable-processSkill
- skippy-cache-family-benchSkill
- skippy-correctnessSkill
- skippy-family-certificationSkill
- skippy-metricsSkill
- skippy-model-packageSkill
- skippy-promptSkill
- skippy-servingSkill
- skippy-spec-benchSkill
- telemetry-privacy-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

