ui-refactor
Specialized skill for refactoring legacy Android views to View Binding and enforcing Leanback UI standards.
Best use case
ui-refactor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Specialized skill for refactoring legacy Android views to View Binding and enforcing Leanback UI standards.
Teams using ui-refactor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ui-refactor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ui-refactor Compares
| Feature / Agent | ui-refactor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Specialized skill for refactoring legacy Android views to View Binding and enforcing Leanback UI standards.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Skill: UI Refactor (Leanback & View Binding) ## Purpose This skill provides deep expertise in migrating legacy Android layouts to View Binding and ensuring compliance with the project's Leanback/TV UI standards. ## Guidelines & Constraints - **View Binding**: All `findViewById` calls must be removed. - **Null Safety**: Use `_binding` and `binding` pattern in Fragments to avoid leaks. - **Leanback**: Ensure focus effects are present for all interactive elements. - **Naming**: IDs must be `snake_case`. ## Trigger Logic - Activated when the user requests a UI refactor, View Binding migration, or new TV screen implementation. ## Instructions 1. **Analyze Layout**: Identify all IDs and nested includes. 2. **Generate Binding**: Use the generated binding class for the layout. 3. **Migration**: Replace manual view lookups with binding references. 4. **Verification**: Confirm focus behavior in D-pad navigation. ## References - `prompts/agents/ui-standards.md` - `prompts/agents/architecture.md`
Related Skills
fp-refactor
Comprehensive guide for refactoring imperative TypeScript code to fp-ts functional patterns
codebase-cleanup-refactor-clean
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
code-refactoring-tech-debt
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
code-refactoring-refactor-clean
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
code-refactoring-context-restore
Use when working with code refactoring context restore
refactor-pass
Performs an automated refactor pass on recent code changes to improve simplicity, remove dead code, and straighten logic flows. It includes a critical step to verify behavior by running build/tests after modifications.
tdd-workflows-tdd-refactor
Use when working with tdd workflows tdd refactor
swiftui-view-refactor
Refactor SwiftUI views into smaller components with stable, explicit data flow.
orchestrate-batch-refactor
Plan and execute large refactors with dependency-aware work packets and parallel analysis.
review-and-refactor
Review and refactor code in your project according to defined instructions
refactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
refactor-method-complexity-reduce
Refactor given method `${input:methodName}` to reduce its cognitive complexity to `${input:complexityThreshold}` or below, by extracting helper methods.