thedivergentai/godot-ability-system
Expert patterns for RPG/action ability systems including cooldown strategies, combo systems, ability chaining, skill trees with prerequisites, upgrade paths, and resource management. Use when implementing unlockable abilities, character progression, or complex skill systems. Trigger keywords: PlayerAbility, AbilityManager, cooldown, SkillTree, SkillNode, prerequisites, can_use, execute, ComboSystem, ability_chain, global_cooldown, charge_system, upgrade_path.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-ability-system
Resource abilities + scene-scoped managers — not AbilityManager / skill-tree novels.
| Scope | Policy | Script |
|-------|--------|--------|
| Per character / enemy / turret | Scene-scoped manager as child (default) | ability_manager.gd or composition ability_container.gd on the entity |
| Shared unlock / loadout catalog across scenes | Autoload catalog / progression only (ranks, unlock flags) — not live cast state | Thin Autoload data; casts still go through the entity manager |
| Global "cast any ability anywhere" Autoload | Avoid | Breaks encapsulation and multiplayer authority |
Resolved policy: Live cooldowns, GCD, and execute() run on a scene-scoped AbilityManager / AbilityContainer under the caster. Autoloads may store unlock ranks; they must not be the combat cast oracle. Skill-tree UI reads/writes progression data, then calls into the caster’s manager — never /root/AbilityManager.use_* for combat.
_process() — Use _physics_process(delta) or one-shot Timers so cooldowns stay deterministic under frame spikes.execute() (ability_resource.gd).is_casting / anim signals.Time.get_unix_time_from_system() + remaining).queue_free until measured otherwise.execute()Do NOT paste inline AbilityManager / ComboSystem / SkillTreeManager novels into scenes. Skill trees are progression UI + prerequisite graphs that grant Resources to the caster’s container.
duplicate(true) required)process_tick must use physics-frame delta (_physics_process) or Timer nodes owned by the container._process; it must not own the truth.get_node("/root/Player").has_method(&"take_damage") / combat DamageData — see combat skill.call_group or space queries; do not scan the whole tree each cast.can_use + costs (godot-multiplayer-networking).@tool GraphEdit for design-time graphs; runtime still grants Resources to scene managers.> CAUTION: Status/buff templates applied at runtime must use duplicate(true). One poisoned .tres mutates every character sharing that asset — see status_effect_manager.gd.
AbilityResource entries._physics_process, not UI _process.Time.get_unix_time_from_system() + remaining), not raw remaining floats — prevents clock/load exploits.> MANDATORY for combos/charges/skill-tree/status/network depth beyond bullets above: elite-ability-patterns.md. Do NOT Load for a first AbilityResource + AbilityManager pass.
> Progressive disclosure: Skim Official Documentation only for the APIs you are implementing (Resources, timers, signals, save, multiplayer). Open Related Skills when wiring adjacent systems—do not preload the whole lattice.
Resource data (not hardcoded manager switches) so designers can author and share assets.duplicate(true) when applying a status/buff template at runtime so one character’s ticking state cannot mutate the shared .tres for everyone.@export / @export_group power Inspector-tuned costs, cooldowns, prerequisites, and effect arrays on ability Resources.ability_cast, ability_ready, and cooldown lifecycle signals so UI and VFX subscribe without coupling to AbilityManager internals._physics_process (fixed delta); avoid _process for cooldown math that desyncs under frame spikes.Timer children are a clean composition pattern for per-ability cooldowns in container-style managers.create_timer() / await patterns fit cast times and short buff durations without adding persistent Timer nodes for every cast.call_group (or query groups) instead of hand-rolled scene scans for every hit target.get_unix_time_from_system() + remaining), not raw remaining floats, across save/load.@rpc confirmation/cancel is the engine baseline for predicted ability casts.BaseAbility → MagicAbility → FireAbility inheritance for runtime behavior.execute() / can_cast(), typed Resources, and await-on-timer cast flows assume solid GDScript patterns.execute() results; keep DamageData separate from ability metadata.can_use / use_ability rather than embedding cooldown logic in input callbacks.is_casting.Take thedivergentai/godot-ability-system from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.