Browse / Developer Tools / Fix Extern Headers

Fix Extern Headers

Replaces `extern` function declarations with proper header file inclusions to standardize C code.

SkillDeveloper ToolsDocs Standards

The source repository doesn't declare a license. Check its terms before reusing the code.

Key features

  • Provides a workflow for identifying and fixing missing header declarations using project-specific scripts.
  • Offers guidelines for resolving type conflicts, prioritizing precise types over `void*`.
  • Defines a process for handling and logging unresolvable issues to prevent repeated work.
  • Includes strategies for breaking circular dependencies between files.
  • Specifies project style guides, such as using `#pragma once` for header guards.

Use cases

  • Standardizing function prototypes across a large C decompilation project.
  • Refactoring a C codebase to remove all `extern` function declarations.
  • Improving a project's include structure for better code organization and maintainability.

FAQ

When should I use this skill?

This skill is ideal for large C codebases, particularly in game development and decompilation projects (e.g., N64), where cleaning up code structure and removing `extern`s is crucial for progress.

What advanced capabilities does it provide?

It offers guidelines for resolving type conflicts (preferring specific types over `void*`), strategies for breaking circular dependencies, and a process for safely logging unfixable issues to avoid repeated work.

What does the Fix Extern Headers skill do?

It guides Claude in standardizing C code by systematically replacing temporary `extern` function declarations with proper header file inclusions, improving code structure and maintainability.

How does this skill improve my workflow?

It provides a structured, command-based process for refactoring, ensuring consistency. By offering clear strategies for complex issues, it saves time and prevents broken builds.