Agent skill

Patcher Advanced APIs

by Paresh-Maheshwari in Paresh-Maheshwari/morphe-ai

Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation.

GPL-3.0Auto-check passed

Install Patcher Advanced APIs

skills CLI
$ npx skills add Paresh-Maheshwari/morphe-ai --skill patcher-advanced-apis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Paresh-Maheshwari/morphe-ai patcher-advanced-apis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Paresh-Maheshwari/morphe-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.kiro/skills/patcher-apis .claude/skills/patcher-advanced-apis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
patcher-advanced-apis
GitHub stars
178
Token cost
~1.4k tokens
SKILL.md length
95 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
GPL-3.0

At a glance

Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation.

  • Doing complex bytecode navigation
  • SKILL.md covers Return Overrides (simplest way…, addInstructions — Deprecation…, Instruction Search and Literal & Extension Overrides, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Class manipulation

What it does

Patcher Advanced APIs is an agent skill from Paresh-Maheshwari/morphe-ai. Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation. Use when doing complex bytecode navigation, class manipulation, or using utility functions.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Morphe's AI-powered Android APK patching workspace — multi-agent pipeline for APK analysis, target hunting, patch writing & deployment. The licence is GPL-3.0.

When your agent uses it

  • Doing complex bytecode navigation
  • Class manipulation
  • Using utility functions

Example prompts

  • “/patcher-advanced-apis”

What it can do on your machine

Read from SKILL.md and the folder at commit 2d7fde2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Patcher Advanced APIs loads about 1.4k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 95 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Paresh-Maheshwari/morphe-ai at commit 2d7fde2, republished under its GPL-3.0 licence (© Paresh-Maheshwari). 95 words, ~1,438 tokens.

Download SKILL.mdSave it as .claude/skills/patcher-advanced-apis/SKILL.md (or your agent's skills folder).
name
patcher-advanced-apis
description
Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation. Use when doing complex bytecode navigation, class manipulation, or using utility functions.

When to use: Complex patches needing instruction search, return overrides, literal overrides, view hiding, class hierarchy traversal, or string replacement. These utilities come from morphe-patches-library.

Morphe Advanced APIs + BytecodeUtils

⚠️ Pinned source: morphe-patcher 6f189f9, patches-library 6501aee. Official docs may lag the source — the pinned source wins if anything contradicts this file.

Return Overrides (simplest way to patch)

kotlin
// Skip method entirely — return void/true/false/null/value
method.returnEarly()           // return-void
method.returnEarly(true)       // return true (boolean)
method.returnEarly(false)      // return false
method.returnEarly(0)          // return 0 (int)
method.returnEarly("string")   // return "string"
method.returnEarly(null)       // return null (object)

// Override all return statements (method still executes)
method.returnLate(true)        // all returns become true
method.returnLate(false)       // all returns become false

addInstructions — Deprecation Note

addInstructions(String) (no-index form) is deprecated. Always supply the index:

kotlin
// ✅ Current
method.addInstructions(0, "const/4 v0, 0x1\nreturn v0")

// ❌ Deprecated — will be deleted
method.addInstructions("const/4 v0, 0x1\nreturn v0")
kotlin
// Find by opcode
val index = method.indexOfFirstInstruction(Opcode.INVOKE_VIRTUAL)
val index = method.indexOfFirstInstructionOrThrow(Opcode.RETURN)

// Find by predicate
val index = method.indexOfFirstInstruction {
    getReference<MethodReference>()?.name == "isPremium"
}

// Find string constant
val index = method.indexOfFirstStringInstruction("premium")
val index = method.indexOfFirstStringInstructionOrThrow("premium")

// Find reversed (from end)
val index = method.indexOfFirstInstructionReversed(Opcode.RETURN)
val index = method.indexOfFirstInstructionReversedOrThrow(startIndex) { opcode == Opcode.IF_EQZ }

// Find all indices (reversed for safe modification)
val indices = method.findInstructionIndicesReversedOrThrow(Opcode.RETURN)
val indices = method.findInstructionIndicesReversedOrThrow { opcode == Opcode.CONST_STRING }
val indices = method.findInstructionIndicesReversedOrThrow(stringFilter)

// Find literal value
val index = method.indexOfFirstLiteralInstructionOrThrow(1337L)
method.containsLiteralInstruction(1337L) // boolean check

Literal & Extension Overrides

kotlin
// Override literal with extension call
method.insertLiteralOverride(1337L, "Lcom/example/Ext;->check(I)I")

// Override literal with constant boolean
method.insertLiteralOverride(1337L, false)
method.insertLiteralOverride(literalIndex, true)

Control Flow Label Insertion

kotlin
// Insert at existing control flow label (preserves jump targets)
method.addInstructionsAtControlFlowLabel(index, """
    invoke-static { }, Lcom/example/Ext;->check()Z
    move-result v0
""")

View Hiding

kotlin
// Hide an Android view
method.injectHideViewCall(insertIndex, viewRegister, "Lcom/example/Ext;", "hideView")
method.injectHideViewCall(moveResultIndex, "Lcom/example/Ext;", "hideView")

String Replacement (all classes)

kotlin
// Ready-made patch to replace strings globally
replaceStringPatch(from = "old string", to = "new string")

Navigate Method Calls

kotlin
// Navigate to method called at instruction index
val targetMethod = navigate(someMethod).to(5).original()
val mutable = navigate(someMethod).to(5).stop()

// Chain navigation
val deep = navigate(someMethod).to(5, 10, 2).stop()

// Navigate with predicate
val found = navigate(someMethod).to(2) { it.opcode == Opcode.INVOKE_VIRTUAL }.stop()

Class APIs

kotlin
val classDef = classDefBy("Lcom/example/Class;")
val mutable = mutableClassDefBy(classDef)
mutable.methods.add(newMethod)

// Traverse class hierarchy
traverseClassHierarchy(mutableClass) { /* called for each class */ }

// Get constructor, field, toString
val ctor = mutableClass.constructor()
val field = mutableClass.fieldByName("fieldName")
val toString = classDef.toStringMethod()

toString() Field/Method Discovery

kotlin
// Find field or method from toString() StringBuilder pattern
val field = method.findFieldFromToString("fieldName=")
val targetMethod = method.findMethodFromToString("fieldName=")

Resource APIs

kotlin
val file = get("res/values/strings.xml")
file.writeText(content)
delete("res/values/strings.xml")

document("res/values/strings.xml").use { doc ->
    val el = doc.createElement("string").apply { textContent = "Hello" }
    doc.documentElement.appendChild(el)
}

// Resource ID lookup
val index = method.indexOfFirstResourceIdOrThrow("resource_name")

// List APK entries (raw archive names, not just staged files; useful for native libs)
listApkEntries("lib/").forEach { name -> /* e.g. "lib/arm64-v8a/libapp.so" */ }

Utility Helpers

kotlin
// Access flags
val publicFlags = accessFlags.toPublicAccessFlags()
field.removeFlags(AccessFlags.FINAL)

// Register helpers
val p0 = method.p0Register
val paramCount = method.numberOfParameterRegisters

// Read all registers used by an instruction (from patches-library BytecodeUtils)
val usedRegisters: List<Int> = instruction.registersUsed

// Clone method with extra registers
val cloned = method.cloneParameters()

// Add instructions before last return
method.addInstructionsToEnd("invoke-static {}, Lext;->hook()V")

© Paresh-Maheshwari, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .kiro/skills/patcher-apis of Paresh-Maheshwari/morphe-ai.

Open the folder on GitHubat commit 2d7fde2

Compare with similar skills

Patcher Advanced APIs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Patcher Advanced APIs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Patcher Advanced APIs this skillParesh-Maheshwari/morphe-ai178—~1.4kAutomated safety check: PassGPL-3.0
Acreadiness Generate Instructionsgithub/awesome-copilot40k1 repos~2.1kAutomated safety check: PassMIT
Motion Advancedaffaan-m/ECC277k1 repos~4.7kAutomated safety check: PassMIT
Sensory Instructionsthedaviddias/Front-End-Checklist74k—~533Automated safety check: PassMIT
Copilot Instructions Blueprint Generatorgithub/awesome-copilot40k2 repos~3.7kAutomated safety check: PassMIT
Make Instructionsdotnet/efcore15k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Acreadiness Generate Instructions

    github/awesome-copilot

    Official

    Generate tailored AI agent instruction files via AgentRC instructions command.

    40k GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check passed
  • Motion Advanced

    affaan-m/ECC

    Advanced motion patterns for React / Next.js — drag & drop, gestures, text animations, SVG path drawing, custom hooks, imperative sequences (useAnimate), loaders, and the full API decision tree.

    277k GitHub starsUsed in 1 repo~4.7k tokens
    Auto-check passed
  • Sensory Instructions

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Avoid sensory-only instructions.

    74k GitHub stars~533 tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed
  • Official

    Technology-agnostic blueprint generator for creating comprehensive copilot-instructions.md files that guide GitHub Copilot to produce code consistent with project standards, architecture patterns…

    40k GitHub starsUsed in 2 repos~3.7k tokens
    Agent WorkflowsAuto-check passed
  • Make Instructions

    dotnet/efcore

    Official

    Create and evaluate VS Code file-based instructions (.instructions.md files).

    15k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Writing Agent Instructions

    BuilderIO/agent-native

    How to write great agent instructions for an agent-native app or template: AGENTS.md, skills, and tool/action descriptions.

    7.1k GitHub stars~4.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from Paresh-Maheshwari/morphe-ai

All 13 skills in this repo
  • Build Deploy Troubleshoot

    Paresh-Maheshwari/morphe-ai

    Build, test, deploy, and troubleshoot Morphe patches — gradle commands, CLI usage, git workflow, common errors and fixes.

    178 GitHub stars~1.1k tokensUpdated 12 days ago
    Auto-check passed
  • Dev Environment Setup

    Paresh-Maheshwari/morphe-ai

    Complete Morphe development environment setup — prerequisites, cloning repos, gradle auth, IDE config, build commands.

    178 GitHub stars~1k tokensUpdated 12 days ago
    Auto-check: notes
  • Fingerprinting Guide

    Paresh-Maheshwari/morphe-ai

    Complete guide to Morphe fingerprinting — how to identify obfuscated methods using stable characteristics.

    178 GitHub stars~2.4k tokensUpdated 12 days ago
    Auto-check passed
  • Morphe CLI Reference

    Paresh-Maheshwari/morphe-ai

    Morphe CLI v1.17.0 (morphe-desktop) complete command reference — patch, list-patches, list-versions, options-create, utility install/uninstall.

    178 GitHub stars~2.9k tokensUpdated 12 days ago
    Auto-check passed
  • Morphe Faq And App Notes

    Paresh-Maheshwari/morphe-ai

    Morphe FAQ, current pinned official app targets, and app-specific notes.

    178 GitHub stars~573 tokensUpdated 12 days ago
    Auto-check passed
  • Morphe Library Reference

    Paresh-Maheshwari/morphe-ai

    Complete reference for all Morphe utility libraries — BytecodeUtils, ResourceUtils, FreeRegisterProvider, Settings, UI, Extensions.

    178 GitHub stars~1.9k tokensUpdated 12 days ago
    Auto-check passed

Questions about Patcher Advanced APIs

What does Patcher Advanced APIs do?

Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation. Patcher Advanced APIs is an agent skill from Paresh-Maheshwari/morphe-ai. Advanced Morphe patcher APIs — BytecodeUtils, returnEarly/returnLate, instruction search, navigate(), classDefBy(), resource manipulation.

When should I use Patcher Advanced APIs?

Patcher Advanced APIs fits situations like: doing complex bytecode navigation; class manipulation; using utility functions.

How do I install Patcher Advanced APIs in Claude Code?

Run `npx skills add Paresh-Maheshwari/morphe-ai --skill patcher-advanced-apis -a claude-code`. Or copy the skill folder (.kiro/skills/patcher-apis in Paresh-Maheshwari/morphe-ai) into .claude/skills/patcher-advanced-apis in your project. Claude Code loads it when a task matches its description.

How do I install Patcher Advanced APIs in Codex?

Run `npx skills add Paresh-Maheshwari/morphe-ai --skill patcher-advanced-apis -a codex`. Or copy the skill folder (.kiro/skills/patcher-apis in Paresh-Maheshwari/morphe-ai) into .agents/skills/patcher-advanced-apis in your project. Codex loads it when a task matches its description.

Can I use Patcher Advanced APIs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Paresh-Maheshwari/morphe-ai --skill patcher-advanced-apis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/patcher-advanced-apis, .gemini/skills/patcher-advanced-apis, .github/skills/patcher-advanced-apis and .opencode/skills/patcher-advanced-apis in your project.

What does Patcher Advanced APIs need to run?

SKILL.md names no scripts, command-line tools or credentials: Patcher Advanced APIs is instructions for the agent only.

Does Patcher Advanced APIs access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Patcher Advanced APIs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Patcher Advanced APIs use?

Patcher Advanced APIs is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Patcher Advanced APIs use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Patcher Advanced APIs?

Skills that share tags, products or a category with Patcher Advanced APIs: Acreadiness Generate Instructions (github/awesome-copilot, 40k stars), Motion Advanced (affaan-m/ECC, 277k stars), Sensory Instructions (thedaviddias/Front-End-Checklist, 74k stars) and Copilot Instructions Blueprint Generator (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Patcher Advanced APIs?

Paresh-Maheshwari (a GitHub user) maintains it in Paresh-Maheshwari/morphe-ai, which has 178 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 29, 2026.

Source: Paresh-Maheshwari/morphe-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.