Skip to content
Back to skills

Aio Patch Extract

ASecurity

Extract Claude Code's cli.js + native .node modules from an installed claude binary (or a binary you pass as positional arg). Output lands in dist/<arch>/. Required before aio-patch-compile. Default arch detected from host; ARCH env var overrides for cross-arch extraction.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
ai-agentspythongonode

Works with

  • claude code
  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 20, 2026

npx -y skills add aiocean/claude-plugins --skill aio-patch-extract --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aio Patch Extract?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aio Patch Extract
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiocean-aio-patch-extract/badge)](https://www.skillsdirectory.com/skills/aiocean-aio-patch-extract)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aio-patch-extract
description: |
  Extract Claude Code's cli.js + native .node modules from an installed claude binary (or a binary you pass as positional arg). Output lands in dist/<arch>/. Required before aio-patch-compile. Default arch detected from host; ARCH env var overrides for cross-arch extraction.
when_to_use: aio patch extract, extract claude binary, extract cli.js, carve cli.js, get cli.js, download claude source, extract native modules
argument-hint: "[<binary-path>] (positional, pass-through to tools/extract.sh)"
effort: medium
---

# aio-patch-extract — extract cli.js + native modules from a claude binary

## Goal

Materialize `dist/<arch>/cli.js` + `dist/<arch>/native/*.node` from an installed claude binary so subsequent `aio-patch-compile` can apply patches and recompile.

## Usage

```
/aio-claude-toolkit:aio-patch-extract                          # download latest claude from npm for HOST arch
/aio-claude-toolkit:aio-patch-extract /path/to/claude          # extract from a local binary (positional arg)
ARCH=linux-arm64 /aio-claude-toolkit:aio-patch-extract         # cross-arch (downloads target-arch npm pkg)
CLAUDE_VERSION=2.1.150 /aio-claude-toolkit:aio-patch-extract   # pin a specific upstream version
```

Argument and env precedence (`tools/extract.sh`):
- Positional arg 1: path to a claude binary you already have
- Otherwise: `claude-src/claude` at project root if present
- Otherwise: download `@anthropic-ai/claude-code-<arch>` from npm (CLAUDE_VERSION env pins, default: latest)
- `ARCH` env: override host-detected platform (cross-arch). Supported: `darwin-arm64`, `darwin-amd64`, `linux-arm64`, `linux-amd64`.

## Requires

- Walk-up must find a scaffolded project (`tools/pipeline/patch_cli.py` exists above CWD)
- `python3` (for `extract_cli.py` + `extract_native_modules.py`)
- `npm` (only if downloading a fresh claude — passing a positional binary path skips this)

## Implementation

The skill body invokes `${CLAUDE_PLUGIN_ROOT}/skills/aio-patch-extract/scripts/extract.sh "$@"`.

It:
1. Walks up from CWD to find the project root
2. `cd` to project root
3. Exec `./tools/extract.sh "$@"` (pass-through args, honors `ARCH` env)

`tools/extract.sh` handles binary resolution, npm download fallback, arch detection (or `ARCH` override after sync patch), and pipeline invocation.

Files in this skill

  • SKILL.md2.3 KB
  • scripts/extract.sh294 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.