⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

fast-anything

@el4cteo⭐ 2.7k stars

Speed up a slow Python, Node.js/TypeScript, Ruby, Java, Go, PHP, C, C++ or C# app by porting its hottest pure functions to Rust and proving each port gives the same results on real recorded calls. Use when the user wants their Python code faster, asks about hot paths or profiling, or says "rewrite the slow part in Rust".

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐⭐ 2.7k on GitHubGitHub ↗

Very popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Rewriting a whole app in Rust costs months, minute-long compiles and gigabytes of target/. Most of the runtime sits in a few functions anyway.

fast-anything finds those functions, has your coding agent port only them to Rust, proves the port gives the same results on real recorded calls, and swaps it in. One command, fully reversible.

Install

npm i -g @el4cteo/fast-anything      # or: cargo install fast-anything

Ports are compiled with your Rust toolchain (rustup).

Use

fast-anything go --agent claude -- python app.py     # or: -- node app.ts / bun app.ts / deno run -A app.ts / ruby app.rb / java App.java / mvn exec:java / gradle run / go run . / php app.php / clang -O2 main.c / Rscript app.R

Or step by step:

commandwhat it does
scan -- <cmd>profiles the app, ranks functions by time × how portable they are
port [id]records up to 500 real calls, creates a one-function Rust crate + TASK.md
verifyrelease-builds the port and replays every recorded call
enable / disableswaps the Rust in or out (one marked block, removed byte for byte)
benchtimes the whole app, original vs Rust, interleaved runs
reportmarkdown + SVG card for your PR
doctorchecks Rust, your runtimes and your agents

--agent takes claude, codex, or any command that reads a prompt on stdin. Without it, hand TASK.md to whatever you use.

Proof, not vibes

That port looked right but compared bytes instead of characters. 148 of 500 real calls caught it. On top of the recorded calls, fast-anything derives extra cases and lets the original answer them: edge cases (NaN, ±infinity, -0.0, zero and ±1, non-ASCII text, empty and up to 16× bigger inputs) and shrunk inputs (tiny and random slices). Nothing is enabled until every case matches: same values (floats within 1e-9), errors where the original errors. A port that is right but slower per call than the original (calling into Rust costs more than the work saved) isn't enabled either. FAST_ANYTHING_DISABLE=1 runs the original any time.

Results

Real runs on an i5-10500, Windows 11 (C and C++: a 4-core GitHub Actions Linux runner). Reproduce them from examples/.

appbeforeafter
Python fuzzy dedupe (700 names)4.91s42ms, 116×
TypeScript fuzzy dedupe (2,000 names)3.11s155ms, 20×
PHP fuzzy dedupe (600 names)2.94s53ms, 55×
Go fuzzy dedupe (3,000 names)3.02s144ms, 21×
Ruby fuzzy dedupe (400 names)3.13s228ms, 14×
C# fuzzy dedupe (4,000 names)4.03s312ms, 13×
Java fuzzy dedupe (4,000 names)3.50s1.18s, 3× (11× on the function; the rest is JVM startup)
C mandelbrot (8 zoom levels)431ms127ms, 3.4×
C++ fuzzy dedupe (6,000 names)3.02s1.09s, 2.7×

fast-anything ports the outermost loop it can, not the tiny function called inside it, so the app crosses into Rust once instead of millions of times. Porting only the inner levenshtein gave 35× and 1.9×.

Why not rewrite it all?

  • Compile time: each port is a one-function crate. Seconds, not minutes.
  • Cache: every port shares one .fast/target. Delete it whenever you like.
  • Risk: your code stays as it is. Rust is opt-in per function, checked against real behavior.

Agents

  • Claude Code plugin: /plugin marketplace add EL4CTEO/fast-anything, then /plugin install fast-anything@fast-anything and /fast-anything:fast python app.py
  • MCP server (Claude Code, Codex, Cursor…), built into the binary: claude mcp add fast-anything -- fast-anything mcp. 8 tools: fast_scan, fast_port, fast_verify, fast_enable, fast_disable, fast_bench, fast_report, fast_status.
  • Skill: skills/fast-anything teaches any agent the loop.

Languages

languagebindingstatus
Python 3.10+PyO3✅
JavaScript / TypeScript (Node 22+, Bun, Deno 2+: bun app.ts, deno run -A app.ts)napi-rs✅
Ruby 3.3+C ABI + JSON, through Ruby's built-in Fiddle✅
Java 22+ (java App.java, Maven, Gradle)the same C bridge, through the FFM API✅
Kotlin/JVM (Gradle, src/main/kotlin, JDK 22+)the Java bridge; top-level functions, object and companion members, extension functions✅
Go 1.22+ (go run .)the same C bridge, through the Windows loader or dlopen (cgo)✅
PHP 8.1+ (php app.php)the same C bridge, through PHP's FFI extension (extension=ffi)✅
C and C++ (gcc, clang or Intel oneAPI icx/icpx: clang -O2 main.c lib.c)the same C bridge, through LoadLibrary or dlopen✅
C# / .NET 8+ (dotnet run -c Release)the same C bridge, through NativeLibrary; profiled with EventPipe, nothing to install✅
R 4.0+ (Rscript app.R)the same C bridge, through base R's .C(); profiled with Rprof, no packages or R headers needed✅

It ports top-level, deterministic functions that take plain data (numbers, strings, lists, dicts, typed arrays…), including ones in your entry script when its main code sits under if __name__ == "__main__": (or if __FILE__ == $0, or if (import.meta.main) / if (require.main === module)). In Python that means module-level functions and @staticmethods (dataclasses, NamedTuples and numeric NumPy arrays count as plain data), in Java, C# and PHP static methods (and PHP functions), in Go plain functions, in C and C++ free functions and static methods. scan says why anything else can't move yet.

With Intel oneAPI on Windows, run fast-anything from a shell where setvars.bat ran (it sets up the linker). SYCL kernels run on the device and aren't ported; with -fsycl, only host functions are profiled and ported.

Ruby, Java, Go, PHP, C, C++, C# and R need no headers, bindings or extra tools: the port is a plain Rust library with one C entry point taking and returning JSON, and fast-anything replays the recorded calls against it directly. Any language that can call C can use that bri

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/fast-anything/SKILL.md2.2 KB7162f523bac5upstream ↗
    ---
    name: fast-anything
    description: Speed up a slow Python, Node.js/TypeScript, Ruby, Java, Go, PHP, C, C++ or C# app by porting its hottest pure functions to Rust and proving each port gives the same results on real recorded calls. Use when the user wants their Python code faster, asks about hot paths or profiling, or says "rewrite the slow part in Rust".
    ---
    
    # fast-anything
    
    The `fast-anything` CLI measures, records, builds, checks and swaps. You write the Rust.
    (The same steps are MCP tools: `fast_scan`, `fast_port`, `fast_verify`, `fast_enable`, `fast_bench`, `fast_report`.)
    
    ## Loop
    
    1. **Scan**: `fast-anything scan -- python app.py`, using the command the user runs their app with
       (a representative workload, not the test suite). Pick the top function marked "port it".
       Skip anything under 2% of the run: porting it can't make a visible difference.
    2. **Port**: `fast-anything port <id>`. It re-runs the app, records up to 500 real calls, and creates
       `.fast/ports/<id>/` with a stub `src/lib.rs` and a `TASK.md`. Read TASK.md fully.
    3. **Write the Rust** in `src/lib.rs` (Ruby, Java, Go, PHP, C, C++, C#: `src/port.rs`; `src/lib.rs` there is generated glue):
       - Same semantics: Unicode code points (`.chars()`; JavaScript compares UTF-16 units), integer ranges, float operation order, error cases.
       - Fast: borrow, no needless allocation, ASCII fast paths, `with_capacity`.
       - Keep the function and module names. Run `cargo check` in the crate.
    4. **Verify**: `fast-anything verify <id>` builds in release mode and replays every recorded call.
       On mismatch, read the failing call, fix, verify again. Never edit the recordings.
    5. **Enable**: `fast-anything enable <id>`, then `fast-anything bench` and `fast-anything report`.
    6. Tell the user the end-to-end speedup, the per-call speedup, and how to undo
       (`fast-anything disable <id>`, or `FAST_ANYTHING_DISABLE=1` for a single run).
    
    ## Don't
    
    - Don't edit the original Python function: the block appended to its module does the swap.
    - Don't enable a port that hasn't passed verify.
    - If a function shows ✗ (I/O, randomness, globals, lives in the entry script), say why it can't be ported yet.
      Suggest moving pure logic into its own module when that's the blocker.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/el4cteo-fast-anything-skills-fast-anything.md

// REPO STATS

2.7k stars