liger-autopatch
Skill by linkedin
Adds Liger Kernel support for a new HuggingFace Transformers model, or updates an existing monkey-patch. It is for developers working on Liger Kernel who need to add or fix model patches.
Install liger-autopatch
Built from the published package, never by AI.
git clone --depth 1 https://github.com/linkedin/Liger-Kernel /tmp/Liger-Kernel && mkdir -p ~/.claude/skills && cp -r /tmp/Liger-Kernel/.agents/skills/liger-autopatch ~/.claude/skills/liger-autopatchRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/linkedin/Liger-Kernel /tmp/Liger-Kernel && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Liger-Kernel/.agents/skills/liger-autopatch ~/.gemini/antigravity-cli/skills/liger-autopatchAntigravity 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
liger-autopatch is an agent skill for adding Liger Kernel optimization support to HuggingFace Transformers models. In create mode, it reads the HF modeling source and produces a model profile that answers 12 architectural questions. It then generates an lce_forward function, a monkey-patch function, tests, and a README entry, with changes to up to 13 files. In modify mode, it analyzes the impact of a change to an existing monkey-patch and applies it.
Each stage has a human checkpoint for review. The validation stage runs an instance patching test, convergence tests, and a checkstyle lint check, and retries up to 3 times on failure. The skill is aimed at contributors to Liger Kernel who need to patch an unsupported model or update an existing patch after upstream HF changes.
Written from the project's SKILL.md and checked against it.
What it can do
- Analyze modelReads the HF modeling source and produces a model profile answering 12 architectural questions.
- Generate patch codeGenerates an lce_forward function and a monkey-patch function for the target model.
- Generate tests and docsUpdates test files and adds a README entry for the new model patch.
- Modify existing patchesAnalyzes the change impact and applies updates to an existing monkey-patch.
- Validate changesRuns instance patching, convergence and checkstyle checks, retrying up to 3 times on failure.
Try asking
- Add Liger Kernel support for a new HuggingFace Transformers model
- Add a new kernel to an already-supported Liger model
- Fix instance patching in an existing Liger monkey-patch
Good to know
- Each stage ends with a human checkpoint that requires confirmation before proceeding.
- Validation is mandatory in modify mode.
- Validation retries are limited to 3 attempts on failure.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/liger-autopatch/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB -
code-generator.md8 KB -
decision-matrix.md5 KB -
examples/gemma-profile.md2 KB -
examples/llama-profile.md2 KB
Show all 12 files
-
model-analyzer.md3 KB -
templates/lce-forward-dense.md2 KB -
templates/lce-forward-moe.md1 KB -
templates/monkey-patch-fn.md4 KB -
templates/test-convergence.md4 KB -
templates/test-instance-patch.md2 KB -
validator.md4 KB
Alternatives to liger-autopatch
All alternatives →Generates 3 to 10 second short-form video clips for product reveals, motion teasers and ambient loops. It defaults to Seedance 2 and also works with Kling 3 and 4, Veo 3 and Sora 2, saving one MP4 to the project folder.
Builds a strategic SEO plan for new or existing websites, covering competitors, architecture, content, technical setup and a 12-month roadmap. It is aimed at people who need an SEO strategy rather than a one-time audit.
Audits and rewrites a LinkedIn profile for people who want their headline, About section and other parts improved. It scores the headline, audits the whole profile from 0 to 100 and drafts an About section that works above the fold.
Builds a LinkedIn plan covering content pillars, positioning, posting cadence and whether to start a newsletter. Aimed at people pursuing a career change, consulting, thought leadership or similar goals on LinkedIn.
Guides an AI assistant to design or rewrite a single-offer landing page for SaaS, apps and services. It covers structure, layout, copywriting, conversion tactics, and SEO/AEO.
Analyzes your own exported LinkedIn post data to show which posts worked, test whether a pattern is real, and plan posting experiments. Built for people who want to understand their own LinkedIn numbers. It refuses to draw conclusions from fewer than 10 posts.
Compare with video-shortform, seo-plan or linkedin-profile
liger-autopatch: common questions
What files does liger-autopatch change when adding a model?
In create mode it can generate or modify up to 13 files, including the model's lce_forward file, monkey_patch.py, several test files, test/utils.py and README.md.
Does liger-autopatch run tests on the changes?
Yes. The validation stage runs the instance patching test, the convergence tests for the model, and make checkstyle.
When should I use modify mode instead of create mode?
Use modify mode when updating, fixing or extending an existing monkey-patch, such as adding a kernel to an already-supported model or fixing instance patching.
How do I install liger-autopatch?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is liger-autopatch free?
The code is published under the BSD-2-Clause licence. The service it connects to may have its own pricing.
Is liger-autopatch safe to use?
It scores 92 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 liger-autopatch?
Similar skills: video-shortform, seo-plan, linkedin-profile, linkedin-strategy.
