godot-api

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Godot API Lookup

Godot API 查询

This skill is a narrow reference tool. Keep answers targeted to the caller's question.
Do not list or enumerate
${GODOT_API_SKILL_DIR}/doc_api/
or
${GODOT_API_SKILL_DIR}/doc_source/
. Those directories contain nearly a thousand files and listing them wastes context. Navigate through
_common.md
,
_other.md
, and the specific class file you actually need.
本技能是一款精准的参考工具。回答需紧扣提问者的问题。
请勿列出或枚举
${GODOT_API_SKILL_DIR}/doc_api/
${GODOT_API_SKILL_DIR}/doc_source/
目录。这些目录包含近千个文件,列出它们会浪费上下文信息。请通过
_common.md
_other.md
以及你实际需要的特定类文件进行查找。

How to answer

回答方式

  1. If you already know the class or likely class, search
    ${GODOT_API_SKILL_DIR}/doc_api/_common.md
    and
    _other.md
    for the class name instead of reading the whole index files.
  2. If the caller does not name a class, use
    ${GODOT_API_SKILL_DIR}/doc_api/_common.md
    and
    _other.md
    to identify likely candidates, then read only the relevant docs.
  3. Read only the relevant
    ${GODOT_API_SKILL_DIR}/doc_api/{ClassName}.md
    file or files.
  4. Return only what the caller needs:
    • Specific question (for example, "how to detect collisions") -> return the relevant methods, signals, or patterns with short descriptions
    • Full API request (for example, "full API for CharacterBody3D") -> return the whole class doc summary
C# syntax reference:
${GODOT_API_SKILL_DIR}/csharp.md
— C# Godot syntax, patterns, and recipes. Read it when the caller asks about C# Godot syntax, idioms, or common patterns such as input handling, tweens, state machines, or signals.
Bootstrap if
doc_api
is empty:
bash
bash ${GODOT_API_SKILL_DIR}/tools/ensure_doc_api.sh
  1. 如果你已经知道目标类或可能的类,请在
    ${GODOT_API_SKILL_DIR}/doc_api/_common.md
    _other.md
    中搜索类名,而非阅读整个索引文件。
  2. 如果提问者未指定类,请使用
    ${GODOT_API_SKILL_DIR}/doc_api/_common.md
    _other.md
    确定可能的候选类,然后仅阅读相关文档。
  3. 仅阅读相关的
    ${GODOT_API_SKILL_DIR}/doc_api/{ClassName}.md
    文件。
  4. 仅返回提问者需要的内容:
    • 特定问题(例如“如何检测碰撞”)-> 返回相关方法、信号或模式,并附上简短说明
    • 完整API请求(例如“CharacterBody3D的完整API”)-> 返回整个类文档摘要
C#语法参考
${GODOT_API_SKILL_DIR}/csharp.md
—— 包含Godot C#语法、模式和实用示例。当提问者询问Godot C#语法、惯用写法或常见模式(如输入处理、补间动画、状态机或信号)时,请查阅此文件。
doc_api
目录为空,请执行以下命令初始化:
bash
bash ${GODOT_API_SKILL_DIR}/tools/ensure_doc_api.sh