Agent skill

Real Patch Examples

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

Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement.

GPL-3.0Auto-check passed

Install Real Patch Examples

skills CLI
$ npx skills add Paresh-Maheshwari/morphe-ai --skill real-patch-examples -a claude-code

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

GitHub CLI
$ gh skill install Paresh-Maheshwari/morphe-ai real-patch-examples --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/patch-examples .claude/skills/real-patch-examples && 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
real-patch-examples
GitHub stars
175
Token cost
~1.8k tokens
SKILL.md length
143 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
GPL-3.0

At a glance

Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement.

  • Writing patches and need pattern reference
  • SKILL.md covers Pattern 1: Simple Method…, Pattern 2: List Filtering…, Pattern 3: Return Value… and Pattern 4: Class-Based…, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Real Patch Examples is an agent skill from Paresh-Maheshwari/morphe-ai. Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement. Use when writing patches and need pattern reference.

Its SKILL.md is about 1.8k 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

  • Writing patches and need pattern reference

Example prompts

  • “/real-patch-examples”

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

Real Patch Examples loads about 1.8k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 143 words of instructions outside code blocks.

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

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). 143 words, ~1,810 tokens.

Download SKILL.mdSave it as .claude/skills/real-patch-examples/SKILL.md (or your agent's skills folder).
name
real-patch-examples
description
Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement. Use when writing patches and need pattern reference.

When to use: Writing patches and need a pattern reference. Pick the simplest pattern that works — return override for premium checks, conditional hook for toggleable features, list filtering for ad removal. Always use bytecodePatch (fastest).

Real-World Patch Patterns

⚠️ Pinned source: morphe-patcher 6f189f9, patches-library 6501aee. Extension artifacts are .mpe files. addInstructions(String) without index is deprecated — always pass index.

Pattern 1: Simple Method Override (Video Ads)

kotlin
// Fingerprints.kt
object LoadVideoAdsFingerprint : Fingerprint(
    strings = listOf(
        "TriggerBundle doesn't have the required metadata specified by the trigger ",
        "Ping migration no associated ping bindings for activated trigger: ",
    )
)

// VideoAdsPatch.kt
val videoAdsPatch = bytecodePatch(name = "Video ads", description = "Removes video ads.") {
    dependsOn(sharedExtensionPatch, settingsPatch)
    compatibleWith(COMPATIBILITY_YOUTUBE)
    execute {
        PreferenceScreen.ADS.addPreferences(SwitchPreference("morphe_hide_video_ads"))
        LoadVideoAdsFingerprint.method.addInstructionsWithLabels(0, """
            invoke-static { }, $EXTENSION->hideVideoAds()Z
            move-result v0
            if-eqz v0, :show
            return-void
            :show
            nop
        """)
    }
}

Pattern 2: List Filtering (Reddit Ads)

kotlin
// Filter list items by calling extension method
fingerprint.let {
    it.method.apply {
        val index = it.instructionMatches.last().index
        val register = getInstruction<TwoRegisterInstruction>(index).registerA
        addInstructions(index, """
            invoke-static { v$register }, $EXT->filter(Ljava/util/List;)Ljava/util/List;
            move-result-object v$register
        """)
    }
}

Pattern 3: Return Value Override (Background Playback)

kotlin
// Override all return statements in a method
fingerprint.method.apply {
    findInstructionIndicesReversedOrThrow(Opcode.RETURN).forEach { index ->
        val register = getInstruction<OneRegisterInstruction>(index).registerA
        addInstructionsAtControlFlowLabel(index, """
            invoke-static { v$register }, $EXT->isAllowed(Z)Z
            move-result v$register
        """)
    }
}

// Or simply force return value
SomeFingerprint.method.returnEarly(true)

Pattern 4: Class-Based Fingerprint Chaining (Reddit)

kotlin
// Find class via toString fingerprint, then find constructor in that class
object AdPostSectionToStringFingerprint : Fingerprint(
    name = "toString",
    returnType = "Ljava/lang/String;",
    filters = listOf(string("AdPostSection(linkId="))
)

object AdPostSectionConstructorFingerprint : Fingerprint(
    classFingerprint = AdPostSectionToStringFingerprint,
    name = "<init>",
    returnType = "V",
    filters = listOf(string("sections"))
)

Pattern 5: Dynamic Fingerprint (using prior match results)

kotlin
execute {
    val field = SomeToStringFingerprint.method.findFieldFromToString(", fieldName=")

    val dynamicFingerprint = Fingerprint(
        definingClass = SomeToStringFingerprint.originalClassDef.type,
        name = "<init>",
        returnType = "V",
        filters = listOf(fieldAccess(opcode = Opcode.IPUT_BOOLEAN, reference = field))
    )
    dynamicFingerprint.method.apply { /* modify */ }
}

Pattern 6: String Replacement (All Classes)

kotlin
val stringFilter = string("old string")
Fingerprint(filters = listOf(stringFilter)).matchAll().forEach { match ->
    match.method.apply {
        findInstructionIndicesReversedOrThrow(stringFilter).forEach { index ->
            val register = getInstruction<OneRegisterInstruction>(index).registerA
            replaceInstruction(index, "const-string v$register, \"new string\"")
        }
    }
}

Pattern 7: Method Injection (AdGuard — create new method)

kotlin
val newMethod = ImmutableMethod(
    classDef.type, "getPaidLicense", null, returnType,
    AccessFlags.STATIC.value, null, null,
    MutableMethodImplementation(7)
).toMutable().apply {
    addInstructions(0, """
        new-instance v0, ${LicenseFingerprint.classDef.type}
        // construct license object with fields
        return-object v0
    """)
}
classDef.methods.add(newMethod)
originalMethod.addInstructions(0, """
    invoke-static {}, $newMethod
    move-result-object v0
    return-object v0
""")

Pattern 8: Root/Emulator Detection Bypass (by class name)

kotlin
classDefBy("Lcom/google/firebase/crashlytics/internal/common/CommonUtils;")
    .methods.first { it.name == "isRooted" }
    .toMutable()
    .addInstructions(0, "const/4 v0, 0x0\nreturn v0")

Pattern 9: SSL Pinning Removal (OkHttp)

kotlin
classDefBy("Lokhttp3/CertificatePinner;")
    .methods.filter { it.name == "check" }
    .forEach { it.toMutable().addInstructions(0, "return-void") }

Pattern 10: Pairip License Bypass (universal)

kotlin
ProcessLicenseResponseFingerprint.method.addInstruction(0, "const/4 p1, 0x0")
ValidateLicenseResponseFingerprint.method.returnEarly()

Pattern 11: Navigate to Called Method via InstructionMatch

kotlin
// Navigate to the mutable method called at a matched instruction
val calledMethod = MyFingerprint.instructionMatches[0].getMethodCalled()
calledMethod.returnEarly(true)

Pattern 12: Patch Availability (root-only feature)

kotlin
val mountOnlyPatch = bytecodePatch(name = "Mount Feature") {
    availability { installer, _ ->
        if (installer == InstallerType.MOUNT) PatchAvailability.ENABLED
        else PatchAvailability.UNAVAILABLE
    }
    category("Misc")
    execute { /* … */ }
}

Patch File Organization (morphe-patches)

patches/src/main/kotlin/app/morphe/patches/
├── shared/              # Shared across all apps
│   ├── Fingerprints.kt
│   └── misc/
│       ├── debugging/
│       ├── gms/         # GmsCore/MicroG support
│       ├── settings/    # Settings framework + preferences
│       ├── extension/   # Shared extension loading
│       └── ...
├── youtube/
│   ├── shared/Constants.kt   # COMPATIBILITY_YOUTUBE
│   ├── ad/video/             # Video ads
│   ├── ad/general/           # General ads
│   ├── layout/               # UI modifications
│   ├── misc/                 # Background playback, spoofing, etc.
│   ├── video/                # Playback speed, quality, etc.
│   └── interaction/          # Seekbar, downloads, swipe controls
├── music/
│   ├── shared/Constants.kt   # COMPATIBILITY_YOUTUBE_MUSIC
│   └── ...
└── reddit/
    ├── shared/Constants.kt   # COMPATIBILITY_REDDIT
    └── ...

extensions/
├── youtube/src/main/java/    # YouTube extension code (.mpe output)
├── music/src/main/java/      # Music extension code
├── reddit/src/main/java/     # Reddit extension code
├── shared/src/main/java/     # Shared extension code
└── shared-youtube/           # Shared between YT and YT Music

© 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/patch-examples of Paresh-Maheshwari/morphe-ai.

Open the folder on GitHubat commit 2d7fde2

Compare with similar skills

Real Patch Examples 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.

Real Patch Examples compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Real Patch Examples this skillParesh-Maheshwari/morphe-ai175—~1.8kAutomated safety check: PassGPL-3.0
Threejs World Generationcalesthio/OpenMontage65k—~2kAutomated safety check: PassAGPL-3.0
Surgical PatchJuliusBrussee/caveman110k1 repos~166Automated safety check: PassApache-2.0
Patch Editnexu-io/open-design100k—~470Automated safety check: PassApache-2.0
Patch Release CheckClickHouse/ClickHouse50k—~4kAutomated safety check: NotesApache-2.0
Slate Patchudecode/plate17k—~3.8kAutomated safety check: PassCustom licence

Similar skills

  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    65k GitHub stars~2k tokensUpdated 5 days ago
    Game DevelopmentAuto-check passed
  • Surgical Patch

    JuliusBrussee/caveman

    Fix bugs and small behavior changes at the narrowest responsible layer. Use when regression proof, preserved surrounding behavior, and task-relevant tests…

    110k GitHub starsUsed in 1 repo~166 tokens
    DevelopmentAuto-check passed
  • Patch Edit

    nexu-io/open-design

    Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.

    100k GitHub stars~470 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Patch Release Check

    ClickHouse/ClickHouse

    Check whether ClickHouse's supported versions (last 3 majors + latest LTS) have recent stable patch releases, diagnose why the scheduled AutoReleases pipeline failed, and identify which releases…

    50k GitHub stars~4k tokensUpdated today
    DatabasesAuto-check: notes
  • Slate Patch

    udecode/plate

    Fix Slate v2 bugs in one pass with reproduction, behavior tests, architecture/DX/perf pressure, proactive rearchitecture when the patch is not the cleanest long-term shape, and final autoreview.

    17k GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed
  • Authoring VPhone Patch Sets

    Lakr233/vphone-cli

    Explains how to declare a firmware patch in a vphone patch set, add a new set, or write a preset, including naming, gating and the checks that catch undeclared patches.

    15k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-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.

    175 GitHub stars~1.1k tokensUpdated 9 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.

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

    Paresh-Maheshwari/morphe-ai

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

    175 GitHub stars~2.4k tokensUpdated 9 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.

    175 GitHub stars~2.9k tokensUpdated 9 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.

    175 GitHub stars~573 tokensUpdated 9 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.

    175 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed

Questions about Real Patch Examples

What does Real Patch Examples do?

Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement. Real Patch Examples is an agent skill from Paresh-Maheshwari/morphe-ai. Real-world Morphe patch patterns from official morphe-patches repo — method override, list filtering, return value override, class chaining, dynamic fingerprints, string replacement.

When should I use Real Patch Examples?

Real Patch Examples fits situations like: writing patches and need pattern reference.

How do I install Real Patch Examples in Claude Code?

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

How do I install Real Patch Examples in Codex?

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

Can I use Real Patch Examples 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 real-patch-examples -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/real-patch-examples, .gemini/skills/real-patch-examples, .github/skills/real-patch-examples and .opencode/skills/real-patch-examples in your project.

What does Real Patch Examples need to run?

SKILL.md names no scripts, command-line tools or credentials: Real Patch Examples is instructions for the agent only.

Does Real Patch Examples 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 Real Patch Examples 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 Real Patch Examples use?

Real Patch Examples 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 Real Patch Examples use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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 Real Patch Examples?

Skills that share tags, products or a category with Real Patch Examples: Threejs World Generation (calesthio/OpenMontage, 65k stars), Surgical Patch (JuliusBrussee/caveman, 110k stars), Patch Edit (nexu-io/open-design, 100k stars) and Patch Release Check (ClickHouse/ClickHouse, 50k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Real Patch Examples?

Paresh-Maheshwari (a GitHub user) maintains it in Paresh-Maheshwari/morphe-ai, which has 175 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.