home / skills / hhhh124hhhh / godot-mcp / godot-compatibility-checker

godot-compatibility-checker skill

/server/skills/godot-compatibility-checker

This skill automatically detects Godot 3.x to 4.x compatibility issues and offers targeted fixes based on real project experience.

npx playbooks add skill hhhh124hhhh/godot-mcp --skill godot-compatibility-checker

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
836 B
---
name: Godot Compatibility Checker
description: 自动检测和修复Godot 3.x与4.x之间的API兼容性问题,基于实际项目经验提供针对性解决方案
version: 1.0.0
---

# Godot版本兼容性检查技能

## 指令

当用户遇到Godot版本相关问题或需要进行版本升级时,自动进行兼容性检查和修复。

## 触发条件
- 提及Godot版本升级或迁移
- 遇到API兼容性错误
- 需要在不同Godot版本间运行代码

## 核心修复案例

### 粒子系统修复
```gdscript
# ❌ 错误: material.emission_amount = 50
# ✅ 正确: particles.amount = 50
```

### Tween系统修复
```gdscript
# ❌ 错误: tween.interpolate_property()
# ✅ 正确: tween.tween_property()
```

## 执行步骤
1. 检测Godot版本
2. 扫描代码问题
3. 提供修复方案
4. 验证修复效果

Overview

This skill automatically detects and repairs API compatibility issues between Godot 3.x and 4.x. It bundles common, experience-backed fixes and guides to help projects migrate smoothly and run across versions. The focus is practical: find version mismatches, propose code changes, and verify results in real projects.

How this skill works

The checker first determines the target Godot version for a project, then scans source files for known API differences and deprecated patterns. For each issue it proposes concrete code edits (with examples) and can run a validation pass to ensure the fixes resolve errors. It prioritizes fixes that are low-risk and commonly required when upgrading between Godot 3 and 4.

When to use it

  • Preparing a project to upgrade from Godot 3.x to 4.x or vice versa
  • Encountering runtime or compile errors that reference changed APIs
  • Running CI checks to ensure cross-version compatibility
  • Reviewing third-party addons or assets for version safety
  • After merging code from contributors using a different Godot version

Best practices

  • Run the compatibility check before any major version bump to surface issues early
  • Keep a backup or use version control so suggested edits can be reviewed or reverted
  • Apply fixes in small commits grouped by subsystem (particles, tweens, physics) for easier testing
  • Use the validation pass to confirm fixes resolve the reported errors
  • Maintain a short migration guide in the project that records applied patterns

Example use cases

  • Detect and replace deprecated particle properties (e.g., material.emission_amount -> particles.amount)
  • Update Tween API calls (e.g., interpolate_property -> tween_property) across scenes and scripts
  • Scan an imported asset folder for API usage incompatible with the current Godot runtime
  • Run as part of CI to fail builds that introduce incompatible API usage
  • Generate a targeted migration checklist for a large project before upgrading

FAQ

Can the checker automatically modify my project files?

Yes — it can suggest and apply automated code edits, but changes should be reviewed in version control before deployment.

Does it handle all Godot API differences?

It covers the most common and impactful differences based on real project experience (particles, tweens, common method renames), and can be extended with additional patterns.