port-npm-to-perry
Skill by PerryTS
Ports an npm package so it compiles natively under Perry. It audits the package for TypeScript-subset gaps, adds it to perry.compilePackages, and patches what breaks. The skill is experimental.
Install port-npm-to-perry
Built from the published package, never by AI.
git clone --depth 1 https://github.com/PerryTS/perry /tmp/perry && mkdir -p ~/.claude/skills && cp -r /tmp/perry/.claude/skills/port-npm-to-perry ~/.claude/skills/port-npm-to-perryRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/PerryTS/perry /tmp/perry && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/perry/.claude/skills/port-npm-to-perry ~/.gemini/antigravity-cli/skills/port-npm-to-perryAntigravity 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
port-npm-to-perry is an agent skill that makes an npm package compile natively under Perry, a compiler that turns a subset of TypeScript into native code through LLVM. The skill first locates the package and stops if it has a native C/C++ addon. It then searches the source for known gaps such as eval, dynamic require, decorators and lookbehind regex, and triages each hit as patchable or disqualifying.
It adds the package to perry.compilePackages in package.json, applies minimal patches, and records them in perry-patches/<package>.md so they can be reapplied after npm install. It then runs perry compile to verify the result and reports what worked. The source labels the skill experimental and asks for feedback on issue #115. It is aimed at developers porting npm packages to Perry.
Written from the project's SKILL.md and checked against it.
What it can do
- Locate packageResolves a package specifier or path and reads its package.json entry points.
- Scan for known gapsGreps package source for eval, Function, dynamic require, Proxy, decorators and lookbehind regex.
- Triage findingsSorts gaps into package-ruling-out, patchable, or jsEval-fallback groups before patching.
- Register in compilePackagesAdds the package and its porting dependencies to perry.compilePackages in package.json.
- Apply minimal patchesEdits files in node_modules to remove or rewrite unsupported constructs.
- Record patchesWrites each patch to perry-patches/<package>.md so it can be reapplied after npm install.
- Verify compileRuns perry compile on a test file and uses the errors to locate remaining problems.
What you need
- Perry compiler installed
- npm package in node_modules or a local directory
- npm to install packages
Try asking
- Port @noble/curves to run under Perry and list the gaps you find
- Add @noble/hashes to perry.compilePackages and patch what breaks
- Audit ./node_modules/some-pkg for Perry TypeScript-subset gaps
Good to know
- Experimental, and results will vary by package
- Packages with native addons cannot be compiled
- Patches must be reapplied after npm install unless compilePackages gains a patch convention
Security check
B- Allowed to use Bash, Edit, Write without limitsIn
SKILL.md
Checked automatically: .claude/skills/port-npm-to-perry/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: BashReadEditWriteGrepGlob
-
SKILL.md6 KB
Alternatives to port-npm-to-perry
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
port-npm-to-perry: common questions
Can it port packages with native addons?
No. If a package has gypfile set to true, a binding.gyp file, prebuilds, or .node files, the skill stops and reports it, since Perry is AOT-only with no JS/V8 fallback.
Do the patches survive npm install?
Not automatically. Each patch is recorded in perry-patches/<package>.md so the user can reapply them after reinstalling.
Where are Perry's TypeScript subset gaps documented?
They are in docs/src/language/limitations.md, with a human-readable porting guide at docs/src/packages/porting.md.
How do I install port-npm-to-perry?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is port-npm-to-perry free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is port-npm-to-perry safe to use?
It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use bash, edit, write without limits). Review the code before you install. How grades work.
What are alternatives to port-npm-to-perry?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
