RIPDPI: Skill for Claude Code

.agents/skills/r8-jni-keep-rules/SKILL.md

r8-jni-keep-rules is a skill for Claude Code, Codex from po4yka/RIPDPI. It costs 52 tokens per session (1,874 once invoked), scanned A, original, BSD-3-Clause.

A guide for writing narrow R8 and ProGuard keep rules in Android release builds. These rules stop code shrinking and renaming from breaking JNI calls, navigation routes, or saved protocol data.

In plain words
What is it for?
Use it when adding or debugging JNI bindings, serializable navigation routes, proto-lite classes, or a release build's missing-rules report.
Why use it?
It helps fix release-only crashes caused when R8 removes or renames code that native code or stored data still needs. It avoids broad rules that hide unrelated problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is po4yka/RIPDPI's own configuration. It tells Claude Code and Codex how to work on RIPDPI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything RIPDPI configures →

Reuse

Borrowing it

Nothing to install: this file belongs to po4yka/RIPDPI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.agents/skills/r8-jni-keep-rules/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/po4yka/RIPDPI

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for r8-jni-keep-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/po4yka/ripdpi/r8-jni-keep-rules/github.svg)](https://agentmods.dev/skills/po4yka/ripdpi/r8-jni-keep-rules)
Your own site
<a href="https://agentmods.dev/skills/po4yka/ripdpi/r8-jni-keep-rules"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/r8-jni-keep-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for r8-jni-keep-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/po4yka/ripdpi/r8-jni-keep-rules"><img src="https://agentmods.dev/badge/skills/po4yka/ripdpi/r8-jni-keep-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,874 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01874
Opus 5.5 $0.00021 $0.00750
Sonnet 5.5 $0.00010 $0.00375
Haiku 4.5 $0.00005 $0.00187

Measured yesterday against content hash d08a563056c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

r8-jni-keep-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/r8-jni-keep-rules/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

R8 / JNI Keep-Rule Authoring

Release builds minify the app via R8. Four failure modes are common:

  1. A native method loses its exact symbol name, and System.loadLibrary can't resolve the JNI signature → runtime UnsatisfiedLinkError.
  2. A kotlinx.serialization @Serializable class loses its generated $$serializer or companion, and Navigation Compose type-safe route encode/decode fails → runtime SerializationException on nav transition.
  3. A proto-lite class is renamed, and DataStore can't rehydrate persisted settings → runtime crash on first launch of the minified build.
  4. A Kotlin interface method that native code invokes by name via JNI call_method (not the reverse -- no external fun involved) loses its name because nothing in Kotlin calls it, and the native runtime's callback silently no-ops or crashes at the JNI boundary.

The project keeps keep-rules narrow on purpose. Read the hard rule first:

If a future minified build fails, add the smallest rule that names the exact compatibility boundary. Do not paste missing_rules.txt suggestions verbatim and do not add blanket -dontwarn or -keep rules. — app/proguard-rules.pro:8-10

Where keep-rules live

File Scope Contains
core/engine/consumer-rules.pro JNI boundary for the native engine -keepclasseswithmembernames + native <methods>; blocks for each native-binding class (read the file for the current list), plus interface keep-blocks for Kotlin callbacks native code invokes by name (see below)
core/data/consumer-rules.pro Proto-lite compatibility surface com.poyka.ripdpi.proto.** keep
app/proguard-rules.pro App-level shims (intentionally tiny) Only Guava j2objc -dontwarn today

Rule: Engine/Data compatibility boundaries belong in module-level consumer rules, not in app/proguard-rules.pro. Reviewers reject app-level rules that could have lived in a consumer rule file.

Decision tree

Adding a new JNI binding class

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 116 lines · 52 tokens per session scan A d08a563056c5

Subscribe to this mod's changes

r8-jni-keep-rules is a skill published in the GitHub repository po4yka/RIPDPI (85 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 52 tokens to every session and 1,874 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-07.

Related

r8-jni-keep-rules compared with skills from other repositories

r8-jni-keep-rules next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
r8-jni-keep-rulespo4yka/RIPDPISkill85yesterdayBSD-3-ClauseA52Claude Code, Codex
argent-react-native-app-workflowsoftware-mansion/argentSkill3.2ktodayApache-2.0A46Claude Code, Codex
argent-react-native-optimizationsoftware-mansion/argentSkill3.2ktodayApache-2.0A71Claude Code, Codex
argent-metro-debuggersoftware-mansion/argentSkill3.2ktodayApache-2.0A104Claude Code, Codex
argent-native-profilersoftware-mansion/argentSkill3.2ktodayApache-2.0A37Claude Code, Codex
compose-performancechrisbanes/skillsSkill1.1k2d agoApache-2.0A42Claude Code
extract-apkniki914/zafiroSkill3415d agoMITA105Claude Code, Codex