xfuel-protocol: Skill for Cursor

.cursor/skills/add-zkp-gadget/SKILL.md

add-zkp-gadget is a skill for Cursor from XFuel-Lab/xfuel-protocol. It costs 130 tokens per session (1,626 once invoked), scanned A, original, Apache-2.0.

Development instructions for adding a new sound-proof gadget to the Rust crate that proves operations in XFuel's zkLLM system. A zero-knowledge proof lets someone verify a computation without seeing all of its private inputs.

In plain words
What is it for?
Adding support for transformer or state-space-model operations such as matrix multiplication, elementwise products, activations, normalization, attention, and other lookup-backed non-linear operations.
Why use it?
It helps developers choose the right existing proof method and record any step that is not formally proven. This reduces the risk of accepting an incorrect computation silently.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is XFuel-Lab/xfuel-protocol's own configuration. It tells Cursor how to work on xfuel-protocol itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything xfuel-protocol configures →

Reuse

Borrowing it

Nothing to install: this file belongs to XFuel-Lab/xfuel-protocol. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/XFuel-Lab/xfuel-protocol/main/.cursor/skills/add-zkp-gadget/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/XFuel-Lab/xfuel-protocol

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-zkp-gadget

README.md
[![agentmods](https://agentmods.dev/badge/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget/github.svg)](https://agentmods.dev/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget)
Your own site
<a href="https://agentmods.dev/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget"><img src="https://agentmods.dev/badge/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-zkp-gadget

Your own site · 80×15
<a href="https://agentmods.dev/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget"><img src="https://agentmods.dev/badge/skills/xfuel-lab/xfuel-protocol/add-zkp-gadget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.01626
Opus 5 $0.00065 $0.00813
Sonnet 5 $0.00026 $0.00325
Haiku 4.5 $0.00013 $0.00163

Measured 11d ago against content hash e44fdd6fff55, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

add-zkp-gadget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/add-zkp-gadget/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Adding a sound gadget to xfuel-zkp

The prover is matmul-first + manifest-selected gadgets: one codebase covers the open-weight LLM market, and a new model architecture should be config + at most one new gadget, never a rewrite. Every gadget must be sound (a cheating prover is rejected) or explicitly honest (the unproven step is recorded as a typed obligation). Never silently trust a step.

The decision rule (how to prove any op)

Reduce the operator to primitives the crate already owns; only reach for a lookup when the op is a genuine non-linearity.

The op is… Prove it with Example
A linear map with public coefficients (residual, transpose, RoPE with fixed-point cos/sin, row-sum) Direct recomputation by the verifier from bound tensors — no proof object attention residual + Kᵀ + causal mask; norm sum-of-squares
A matrix product A·B matmul::{prove,verify} (sumcheck) Q/K/V/O projections, Q·Kᵀ, P·V
An elementwise product z = a ⊙ b gadgets::{prove,verify}_hadamard gating, x⊙x, softmax normalization E ⊙ r
A non-linearity on quantized codes (silu, gelu, rsqrt, exp, 1/x) a canonical lookup table (table::ScalarTable) + lookup logup argument activation, norm rsqrt, softmax exp/reciprocal
Not yet wired gadgets::LookupObligation::new(op, input, output) — push it and return it placeholder norm/activation paths

Critical soundness rule — never impose an exact in-field algebraic constraint on a rounded fixed-point value. inv_rms² · (ss/d + eps) = 1 is unsatisfiable for a rounded inv_rms, and P · rowsum = exp fails for a rounded probability. The sound move is always a canonical table: prover and verifier build a byte-identical code → f(code) table, and the lookup proves membership. The table is the spec; numeric fidelity (calibration) is the separate M5.3 requant concern.

Worked examples to copy

Read the closest existing gadget and mirror its structure — do not invent a new shape.

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 96 lines · 130 tokens per session scan A e44fdd6fff55

Subscribe to this mod's changes

add-zkp-gadget is a skill published in the GitHub repository XFuel-Lab/xfuel-protocol (1 stars, last pushed 11d ago), licensed Apache-2.0. It adds 130 tokens to every session and 1,626 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

klever-dev

End-to-end Klever blockchain development — smart contracts (Rust/WASM), transaction building (@klever/connect, klever-go-sdk), deployment via ksc + koperator, and on-chain interaction via MCP tools. Use when the task involves KLV, KDA tokens, klv1 addresses, Klever smart contracts, or Klever node/API interaction.

klever-io/mcp-klever-vm · 76 tokens

jolt

Wrap a Rust function in a Jolt zero-knowledge proof.

a16z/jolt · 15 tokens

solana

Use when working on Solana software, including one or more of: Solana client code using TypeScript, Rust libraries that use Solana crates, Anchor programs, Quasar programs, LiteSVM tests, including Rust program files, TypeScript tests, and Anchor.toml or Quasar.toml configuration. Designed to create minimal, reusable…

quicknode/solana-finance-claude-plugin · 76 tokens

solana-toolkit-guide

Guide to the Solana Wallet Toolkit — vanity address generation with multi-threaded search, official Solana Labs libraries, Rust and TypeScript implementations. Includes wallet generation, custom address prefixes, and OG names on the blockchain.

nirholas/three.ws · 50 tokens

solana

Expert guidelines for Solana program development with Rust, Anchor framework, and Web3.js integration.

Mindrally/skills · 21 tokens

smart-contracts

Stellar smart contract development (Rust, soroban-sdk). Entry point with project setup, contract anatomy, and build/deploy workflow, routing to three companion files in this directory — development.md (storage/TTL, authorization, cross-contract calls, tokens, events, errors, upgrades, fees, troubleshooting)…

stellar/stellar-dev-skill · 151 tokens