xinfer: Skill for Cursor

.cursor/skills/check-model/SKILL.md

check-model is a skill for Cursor from guoqingbao/xinfer. It costs 76 tokens per session (4,335 once invoked), scanned A, original, MIT.

A compatibility checker for xinfer, a tool that loads machine-learning models. It checks a model's configuration, weight files, data types, naming, and whether it can be split across multiple processors.

In plain words
What is it for?
Use it to audit a model from Hugging Face, a local folder, or pasted configuration. Provide tensor names and shapes when available so it can check the weight files and parallel-loading requirements.
Why use it?
It finds model-format problems before xinfer tries to load the model, which can prevent confusing loading errors. It also identifies missing information needed for a reliable check.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is guoqingbao/xinfer's own configuration. It tells Cursor how to work on xinfer 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 xinfer configures →

Reuse

Borrowing it

Nothing to install: this file belongs to guoqingbao/xinfer. 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/guoqingbao/xinfer/main/.cursor/skills/check-model/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/guoqingbao/xinfer

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 check-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/guoqingbao/xinfer/check-model/github.svg)](https://agentmods.dev/skills/guoqingbao/xinfer/check-model)
Your own site
<a href="https://agentmods.dev/skills/guoqingbao/xinfer/check-model"><img src="https://agentmods.dev/badge/skills/guoqingbao/xinfer/check-model/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 check-model

Your own site · 80×15
<a href="https://agentmods.dev/skills/guoqingbao/xinfer/check-model"><img src="https://agentmods.dev/badge/skills/guoqingbao/xinfer/check-model.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,335 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00076 $0.04335
Opus 5 $0.00038 $0.02167
Sonnet 5 $0.00015 $0.00867
Haiku 4.5 $0.00008 $0.00434

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

Security

Grade A, and why

check-model 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 9d 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/check-model/SKILL.md · 349 lines

How it starts

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

Check Model — Pre-Load Compatibility Audit for xinfer

Phase 0: Gather Model Information

Collect model config and tensor info. Accept any of:

Input How to use
HuggingFace config URL Fetch config.json from the URL (e.g. https://huggingface.co/<id>/blob/main/config.json)
HuggingFace model ID Fetch config from https://huggingface.co/<id>/raw/main/config.json
Local model path Read <path>/config.json directly
Pasted config JSON Parse inline
Tensor info User pastes tensor names/shapes/dtypes from HuggingFace safetensor viewer or provides local weights

If tensor info is missing, ask the user to provide it. They can get it by clicking any .safetensors file in the HuggingFace model page and copying the tensor tree.

For local models, extract tensor info with:

import json, struct, sys, glob, os
path = sys.argv[1]
for sf in sorted(glob.glob(os.path.join(path, "*.safetensors"))):
    with open(sf, "rb") as f:
        n = struct.unpack("<Q", f.read(8))[0]
        header = json.loads(f.read(n))
    for k, v in sorted(header.items()):
        if k != "__metadata__":
            print(f"{k}\t{v.get('shape')}\t{v.get('dtype')}")

Phase 1: Parse Config and Identify Model Type

Extract from config.json:

Core parameters

Field Required Notes
architectures Yes Determines model type and loader path
hidden_size Yes Or nested under text_config for multimodal
num_attention_heads Yes Q heads for full attention
num_key_value_heads Yes KV heads for GQA
head_dim If available Defaults to hidden_size / num_attention_heads
num_hidden_layers Yes Total layer count
vocab_size Yes Embedding table size

Hybrid (Qwen3.5/Qwen3Next) parameters

Field When present Notes
layer_types Qwen3.5/Qwen3Next Array of "linear_attention" / "full_attention"
linear_num_key_heads Hybrid models GDN K heads (may differ from V heads)
linear_num_value_heads Hybrid models GDN V heads
linear_key_head_dim Hybrid models Per-head K dimension
linear_value_head_dim Hybrid models Per-head V dimension
linear_conv_kernel_dim Hybrid models Conv1d kernel size (typically 4)
full_attention_interval Hybrid models How often full attention appears

Read the full file on GitHub · 349 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. 9d ago First seen · 349 lines · 76 tokens per session scan A f49a9f355bda

Subscribe to this mod's changes

check-model is a skill published in the GitHub repository guoqingbao/xinfer (315 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 4,335 once invoked, about $0.0004 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-30.