rename-global-variable-or-function

Rename global variables and functions in decompilation projects by updating symbol mappings.

178|10|Updated Sep 28, 2024
One-click install
npx skills add https://github.com/cdlewis/snowboardkids2-decomp --skill rename-global-variable-or-function
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rename-global-variable-or-function
Source: https://github.com/cdlewis/snowboardkids2-decomp/tree/main/.claude/skills/rename-global
Command: npx skills add https://github.com/cdlewis/snowboardkids2-decomp --skill rename-global-variable-or-function

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Renaming global variables and functions in a decompilation project can be error-prone, requiring careful updates to symbol mappings to maintain correctness.

Core Features & Use Cases

  • Ensures consistent renaming by annotating memory and ROM addresses (e.g., D_<memory><rom>, func<memory>_<rom>).
  • Guides safe renaming with proper syntax and examples to avoid collisions.
  • Use Case: When you need to rename a symbol to a meaningful name without breaking references.

Quick Start

Rename a global symbol by replacing its name and updating the associated aliases to reflect the new name.

Frequently Asked Questions about rename-global-variable-or-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely rename global variables in a decompilation project without breaking references?

To safely rename global variables in a decompilation project, update the symbol mappings and annotations to preserve memory addresses and maintain reference correctness. Replace the symbol name and update associated aliases to reflect the new identifier.

What naming conventions should I use when renaming decompiled functions?

When renaming decompiled functions, maintain the func_<memory>_<rom> naming schemes and ensure updates align with symbol_addrs.txt conventions to preserve memory and ROM address mappings.

How do symbol mappings work when reorganizing identifiers across memory addresses?

Symbol mappings link renamed identifiers to their specific memory and ROM addresses. Updating these mappings during reorganization ensures the decompilation project maintains its structural integrity and readability without collisions.

Can I update global symbols in decompilation projects without causing naming collisions?

Yes, you can update global symbols without collisions by following proper syntax and annotating memory and ROM addresses. This ensures new meaningful names do not conflict with existing references in the codebase.

Why do I need to update symbol_addrs.txt when renaming global symbols?

Updating symbol_addrs.txt when renaming global symbols is necessary to maintain correct mappings between the new identifiers and their underlying memory and ROM addresses, preventing broken references across the decompilation project.

What is the best way to improve readability of decompiled code by renaming variables?

The best way to improve decompiled code readability is to replace generic names with meaningful identifiers while updating symbol mappings and address annotations to ensure maintainability and prevent reference errors.