원클릭으로
code-style
GDScript coding standards for The Sparkling Farce. Use when writing or reviewing code for style compliance.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
GDScript coding standards for The Sparkling Farce. Use when writing or reviewing code for style compliance.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | code-style |
| description | GDScript coding standards for The Sparkling Farce. Use when writing or reviewing code for style compliance. |
The Sparkling Farce enforces strict GDScript style. These are non-negotiable.
# CORRECT - Explicit type annotation
var health: int = 100
var name: String = "Max"
var position: Vector2 = Vector2.ZERO
var items: Array[ItemData] = []
var stats: Dictionary[String, int] = {}
# WRONG - Type inference (walrus operator)
var health := 100
var name := "Max"
var position := Vector2.ZERO
Why: Project settings enforce untyped_declaration = Error and infer_on_variant = Error.
# CORRECT
if "key" in dict:
var value = dict["key"]
if "key" not in dict:
push_error("Missing key")
# WRONG
if dict.has("key"):
var value = dict["key"]
# CORRECT - All parameters and return types annotated
func calculate_damage(attacker: Unit, defender: Unit, is_critical: bool = false) -> int:
return 0
# WRONG - Missing types
func calculate_damage(attacker, defender, is_critical = false):
return 0
# CORRECT - Typed loop variable
for item: ItemData in inventory:
process(item)
for i: int in range(10):
print(i)
for key: String in dict.keys():
print(key)
# WRONG - Untyped loop variable
for item in inventory:
process(item)
# CORRECT - Direct signal emission
battle_started.emit(battle_data)
damage_dealt.emit(attacker, defender, amount)
# WRONG - String-based emission
emit_signal("battle_started", battle_data)
| Type | Convention | Example |
|---|---|---|
| Classes | PascalCase | CharacterData, BattleManager |
| Functions | snake_case | calculate_damage(), get_active_unit() |
| Variables | snake_case | current_hp, active_units |
| Constants | UPPER_SNAKE | MAX_HP, DEFAULT_SPEED |
| Private | _prefix | _internal_state, _calculate_bonus() |
| Signals | snake_case | battle_started, unit_died |
# Preload for constants (compile-time)
const CharacterData = preload("res://core/resources/character_data.gd")
# Load for runtime resources
var scene: PackedScene = load("res://scenes/battle/battle.tscn")
## Brief description of the class.
##
## Longer description if needed, explaining purpose,
## usage patterns, and integration notes.
class_name MyClass
extends Node
## Calculates damage between two units.
##
## [param attacker]: The unit dealing damage
## [param defender]: The unit receiving damage
## [return]: The final damage amount after modifiers
func calculate_damage(attacker: Unit, defender: Unit) -> int:
pass
Full style guide: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
Where to place game content vs platform code. Use when creating new files or moving existing code.
Run the project test suite. Use when user mentions "diagnostics", "run level 1 diagnostics", or asks to run tests.
Core development philosophy - fix platform code, not mod content. Load when making decisions about what to fix or implement.
Correct patterns for accessing game resources via ModLoader registry. Use when loading characters, items, abilities, or any mod content.
View the newest screenshot(s) from the user's Screenshots folder. Use when user says SNS, SNS2, SNS3, or asks to see a screenshot.
Reference for preferred UNIX tools over LLM processing. Use when processing JSON, text, searching files, or doing batch operations.