Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

magisk-native

Skill by topjohnwu

magisk-native gives guidelines, architecture notes, FFI details and build workflows for the native/ subproject of the Magisk codebase. It is for developers and AI assistants working on native C, C++ and Rust code.

  • Score 89
  • 64k stars
  • GPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install magisk-native

Built from the published package, never by AI.

git clone --depth 1 https://github.com/topjohnwu/Magisk /tmp/Magisk && mkdir -p ~/.claude/skills && cp -r /tmp/Magisk/.agents/skills/magisk-native ~/.claude/skills/magisk-native

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install magisk-native in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

magisk-native is a skill with guidelines, architecture notes, C++/Rust FFI details, development conventions and build workflows for the native/ subproject of the Magisk codebase. It covers native C, C++ and Rust code, including magisk, magiskinit, magiskboot, magiskpolicy, resetprop, zygisk, and native crates and modules.

The build runs in stages: generating flags and bindings, building Rust static libraries with Cargo, then compiling C and C++ with ndk-build. Rust code bridges to C++ through cxx. The skill also describes Magisk-specific Rust idioms, such as Utf8CStr, cstr! and the LoggedError model. It is meant for anyone changing, building, debugging or testing native code in that directory.

Written from the project's SKILL.md and checked against it.

What it can do

  • CodegenRun ./build.py gen before editing native sources to generate FFI bindings and headers.
  • Native buildBuild all native binaries or specific targets with ./build.py native.
  • Rust lintRun Rust Clippy lint checks with ./build.py clippy.
  • Cargo commandsRun cargo check and cargo test through ./build.py cargo.
  • C++/Rust FFIExplains the cxx bridge modules and generated *-rs.hpp and *-rs.cpp files.
  • String handlingDescribes Utf8CStr, Utf8CString and the cstr! macro for null-terminated UTF-8 strings.
  • Error modelDescribes the LoggedError and LoggedResult approach for logging errors at the failure point.
  • Clean artifactsClean native build artifacts with ./build.py clean native.

What you need

  • Magisk repository with build.py at the root
  • cargo for Rust builds
  • ndk-build for C and C++ builds
  • Top-level AGENTS.md and magisk-git guidance

Try asking

  • Add a new applet to magiskboot and show the codegen steps to run first
  • Run clippy on the Rust code in native/ and fix any lint errors
  • Build only magiskpolicy using the native build commands

Good to know

  • Do not use .unwrap() in Rust code because clippy denies it in the workspace.
  • Magisk uses nightly Rust features such as unix_socket_ancillary_data and nonpoison_mutex.
  • Standalone tools such as cargo must be prefixed with scripts/env.py.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/magisk-native/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB

Alternatives to magisk-native

All alternatives →
openclaw-github-repo-commandersickn33
94

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.

AAA Skill 50k
gradiogradio-app
94

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.

AAA Skill 44k
hig-components-menussickn33
94

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.

AAA Skill 50k
fastapi-templateswshobson
94

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.

AAA Skill 43k
appfunctionsandroid
94

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.

AAA Skill 11k
agent-qa-authoringsickn33
94

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.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

magisk-native: common questions

Which native binaries does this skill cover?

The source names magisk, magiskinit, magiskboot, magiskpolicy and resetprop as native binary output targets, and it also mentions zygisk.

Do I need to run codegen before editing native code?

Yes. The source says to always run ./build.py gen before editing native sources to generate FFI bindings, headers and flags.

Which language standards does the native code use?

The source states Rust Edition 2024 for Rust and C++20 with libc++ static linking for C++.

How do I install magisk-native?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is magisk-native free?

The code is published under the GPL-3.0 licence. The service it connects to may have its own pricing.

Is magisk-native safe to use?

It scores 89 of 100. Grades: maintenance A, licence C, 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 magisk-native?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

magisk-native Install

Add to stack

Loading.