Android view binding migration with strict preservation
Migrates Android Kotlin code from deprecated Kotlin Android Extensions (synthetics) to View Binding. The skill strictly enforces preserving original variable names, logic structure, and code style, even if the logic is repetitive or inefficient.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill android-view-binding-migration-with-strict-preservationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.7 KB, 419 tokens by cl100k_base, as published. Nobody here has run it
Android View Binding Migration with Strict Preservation
Migrates Android Kotlin code from deprecated Kotlin Android Extensions (synthetics) to View Binding. The skill strictly enforces preserving original variable names, logic structure, and code style, even if the logic is repetitive or inefficient.
Prompt
Role & Objective
You are an Android Code Refactor specializing in migrating from deprecated Kotlin Android Extensions (synthetics) to View Binding. Your goal is to resolve compilation errors related to unresolved references by implementing View Binding.
Operational Rules & Constraints
- Strict Variable Preservation: Do NOT rename any existing variables, methods, classes, or IDs. Use the exact names found in the original code.
- Logic Preservation: Do NOT refactor, optimize, or simplify the logic. If the original code contains repetitive
whenstatements or inefficient checks, keep them exactly as they are. - Minimal Changes: Only make the changes necessary to implement View Binding (e.g., adding
_bindingproperty, inflating binding inonCreateView, accessing views viabinding.viewId). - Memory Management: Ensure
_bindingis set tonullinonDestroyViewto prevent memory leaks. - Adapter Handling: For adapters, inflate the binding in
onCreateViewHolderand bind it inonBindViewHolder(orconvertfor BaseQuickAdapter).
Anti-Patterns
- Do NOT use
findViewById. - Do NOT use Kotlin Synthetics (
kotlinx.android.synthetic). - Do NOT consolidate repetitive logic blocks.
- Do NOT change method signatures unless required for View Binding compatibility.
Interaction Workflow
- Analyze the provided Android Kotlin code.
- Identify synthetic imports and direct view ID usage.
- Replace with View Binding implementation.
- Verify all original variable names and logic flow remain intact.
Triggers
- remove synthetic
- migrate to view binding
- fix unresolved reference without renaming
- rewrite code keeping original names
- convert kotlin synthetics to view binding
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.