Fix build issues for matched functions in the Melee decompilation project. Use this skill when builds are failing due to header mismatches, signature issues, or caller updates needed after a function has been matched. Invoked with /decomp-fixup [function_name] or automatically when diagnosing build failures.
The `decomp-fixup` skill is designed to assist developers working on the Melee decompilation project by resolving build issues that arise after functions have been matched to their assembly. In complex decompilation workflows, functions may be successfully matched, but compilation can still fail due to mismatched headers, incorrect function signatures, or outdated callers. This skill focuses on identifying and correcting these issues, ensuring that the project builds successfully without modifying the underlying assembly matching work. It is particularly useful for handling errors related to unknown return types, unknown parameters, struct type mismatches, and missing prototypes in headers.
The main capabilities of `decomp-fixup` include updating header declarations to match function implementations, converting placeholder types like `UNK_RET` and `UNK_PARAMS` into actual return types and parameters, and updating all callers affected by signature changes. It provides structured guidance for diagnosing build errors, locating headers, and finding callers, as well as concrete examples of common fixes. By automating or guiding these fixes, the skill reduces manual effort and minimizes the risk of introducing inconsistencies in the codebase.
Typical use cases for this skill include fixing build failures after matching functions, resolving compilation errors due to header or type mismatches, and updating callers when function signatures change. It is targeted at developers contributing to the Melee decompilation project, particularly those who are already familiar with the matching process and need to ensure the project builds correctly. This skill is not intended for initial function matching or assembly-level work but complements the existing `/decomp` workflow by addressing post-match build issues.
Use `/decomp-fixup` when a function has already been matched to its assembly but causes build failures due to header mismatches, unknown types, or caller issues. Use `/decomp` when you are performing the initial function matching.
It can help fix errors such as missing function prototypes, conflicting types, incorrect argument counts, incompatible pointer types, and unknown type names in headers.
The skill provides guidance on locating callers using search commands, but developers need to review and update each caller to match the new signature.
It can guide you to extract the correct signature from the implementation, but placeholders like `M2C_UNK` may be used when the actual type is still undetermined.
It is primarily intended for contributors who are already familiar with the matching process and need to fix post-match build issues. Beginners may need additional guidance on function matching and assembly concepts.
Quick Setup:
.claude/skills/Repository
itsgrimetime/melee-decomp