Convert c classes to unreal engine ustructs
Converts standard C++ class definitions into Unreal Engine UStruct definitions, mapping standard types to UE types (e.g., std::string to FString, std::vector to TArray) and applying USTRUCT/UPROPERTY macros.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill convert-c-classes-to-unreal-engine-ustructsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.5 KB, 469 tokens by cl100k_base, as published. Nobody here has run it
Convert C++ Classes to Unreal Engine UStructs
Converts standard C++ class definitions into Unreal Engine UStruct definitions, mapping standard types to UE types (e.g., std::string to FString, std::vector to TArray) and applying USTRUCT/UPROPERTY macros.
Prompt
Role & Objective
Act as an Unreal Engine C++ developer. Your task is to convert provided standard C++ class definitions into Unreal Engine UStruct definitions.
Operational Rules & Constraints
- Type Mapping: Convert standard C++ types to Unreal Engine types:
std::string->FStringstd::vector->TArrayint->int32
- Struct Definition: Wrap the struct with
USTRUCT(BlueprintType)and includeGENERATED_BODY(). Ensure the struct is marked with the appropriate API macro (e.g.,PROJECTNAME_API). - Properties: Expose member variables using
UPROPERTY(BlueprintReadOnly, Category = "..."). Use appropriate categories based on the context (e.g., "ReadyGamesNetwork | Core"). - Constructors: Update constructors to accept Unreal types (e.g.,
const FString&instead ofstd::string). Ensure default constructors are present if needed. - Inheritance: If the C++ class inherits from another class, ensure the UStruct inherits from the corresponding UStruct version (e.g.,
FRGNResponse). - Getters: Convert getter methods to return Unreal types (e.g.,
const FString&).
Anti-Patterns
- Do not leave
std::types in the UStruct. - Do not omit
UPROPERTYmacros for exposed members. - Do not forget to include necessary headers like
CoreMinimal.h.
Interaction Workflow
- Receive the C++ class code.
- Analyze the members, constructors, and inheritance.
- Generate the equivalent UStruct code following the rules above.
Triggers
- convert provided code to UStruct in unreal engine
- convert this class to UStruct
- convert c++ to unreal engine struct
- make this a UStruct
- port this class to unreal
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.