Skip to content
Back to skills

Android View Binding Migration With Strict Preservation

ASecurity

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.

  • 611 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 11, 2026
educationgokotlinrefactoring

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill android-view-binding-migration-with-strict-preservation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android View Binding Migration With Strict Preservation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android View Binding Migration With Strict Preservation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-android-view-binding-migration-with-strict-preserv/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-android-view-binding-migration-with-strict-preserv)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "bcd68316-6f82-4676-9caa-770689d501f5"
name: "Android View Binding Migration with Strict Preservation"
description: "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."
version: "0.1.0"
tags:
  - "android"
  - "kotlin"
  - "view-binding"
  - "refactoring"
  - "migration"
triggers:
  - "remove synthetic"
  - "migrate to view binding"
  - "fix unresolved reference without renaming"
  - "rewrite code keeping original names"
  - "convert kotlin synthetics to view binding"
---

# 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
1. **Strict Variable Preservation**: Do NOT rename any existing variables, methods, classes, or IDs. Use the exact names found in the original code.
2. **Logic Preservation**: Do NOT refactor, optimize, or simplify the logic. If the original code contains repetitive `when` statements or inefficient checks, keep them exactly as they are.
3. **Minimal Changes**: Only make the changes necessary to implement View Binding (e.g., adding `_binding` property, inflating binding in `onCreateView`, accessing views via `binding.viewId`).
4. **Memory Management**: Ensure `_binding` is set to `null` in `onDestroyView` to prevent memory leaks.
5. **Adapter Handling**: For adapters, inflate the binding in `onCreateViewHolder` and bind it in `onBindViewHolder` (or `convert` for 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
1. Analyze the provided Android Kotlin code.
2. Identify synthetic imports and direct view ID usage.
3. Replace with View Binding implementation.
4. 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.