support-new-llm
Skill by alibaba
Adds support for new LLM models to the MNN framework. It covers downloading models from HuggingFace or ModelScope, analyzing architecture, adding field mappings, aligning hook outputs, and exporting MNN models. It is meant for developers porting LLMs to MNN.
Install support-new-llm
Built from the published package, never by AI.
git clone --depth 1 https://github.com/alibaba/MNN /tmp/MNN && mkdir -p ~/.claude/skills && cp -r /tmp/MNN/skills/support-new-llm ~/.claude/skills/support-new-llmRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/alibaba/MNN /tmp/MNN && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/MNN/skills/support-new-llm ~/.gemini/antigravity-cli/skills/support-new-llmAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill guides an AI agent through adding a new large language model to the MNN framework. It starts by downloading the model from HuggingFace or ModelScope, or using a local path, and checking that the original transformers inference runs. The agent then reads config.json and the modeling code, registers field mappings in model_mapper.py, and compares intermediate hook outputs against the HuggingFace model.
The workflow uses a test-driven approach split into six steps, each with its own pass criteria. A tier system classifies the model (text, MoE, audio, vision, or new architecture) and selects which steps apply. The final step exports the MNN model and checks it with the C++ llm_demo. It is intended for developers who maintain or extend MNN's LLM export tooling.
Written from the project's SKILL.md and checked against it.
What it can do
- Download and analyzeDownloads a model from HuggingFace or ModelScope and analyzes its architecture.
- Tier classificationClassifies a model into Tier 1 to 6 from config.json fields and layer types.
- Add field mappingsRegisters model field mappings in model_mapper.py.
- Hook alignment testsCompares intermediate results at five checkpoints against the HuggingFace model.
- Export MNN modelExports the model to MNN format and verifies output with the C++ llm_demo.
- Multimodal and new operatorsGuides vision and audio encoder support and new operator work for specialized architectures.
What you need
- MNN repository with the transformers/llm export tooling
- Python with HuggingFace transformers
- Access to HuggingFace or ModelScope for the model files
- C++ build of the MNN LLM demo
Try asking
- Support the Qwen3 MoE model in MNN
- Add MNN support for this HuggingFace model link
- Classify this model's Tier from its config.json
Good to know
- Steps are required only as the model tier demands, so not every step applies to every model.
- Each step must pass its test before the next step starts.
- The skill tells the agent not to read the schema/private/ and source/internal/ directories.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/support-new-llm/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB -
common-pitfalls.md23 KB -
step1-analyze.md10 KB -
step2-mapping.md11 KB -
step3-test-python.md13 KB
Show all 8 files
-
step4-export.md6 KB -
step5-multimodal.md16 KB -
step6-new-architecture.md16 KB
Alternatives to support-new-llm
All alternatives →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
Compare with agent-reproduce-align, google_contacts or m06-error-handling
support-new-llm: common questions
Which models does this skill already cover?
The source includes a lookup table of supported model_type values, such as llama, qwen2, gemma3, and lfm2. If the model type is already listed, the source says no changes are needed.
What is the test-driven workflow?
The workflow has six steps, each with its own pass criteria, and the agent must pass the current step's test before moving on. Steps are chosen by the model's tier.
How is the exported model checked?
The source says the final step runs the exported MNN model through the C++ llm_demo and compares its output against the HuggingFace model's quality.
How do I install support-new-llm?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is support-new-llm free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is support-new-llm safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to support-new-llm?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
