跳到正文
cccskills
免费在 GitHub 公开

actions-and-doafter

Implement actions, cooldowns, DoAfter flows, interruption, cancellation, and authoritative completion safely.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md1.9 KB
  • agents/openai.yaml245 B
  • references/action-lifecycle.md440 B
  • references/doafter-checklist.md430 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Use actions for reusable player abilities and DoAfter flows for interruptible, time-based completion.

Action lifecycle

  1. Find the owner component and system.
  2. Decide whether the action is granted by prototype, component startup, equipment, role, or runtime state.
  3. Keep action identity and event contract in Shared when client prediction or UI needs it.
  4. Validate user, target, cooldown, range, access, and current state on the server.
  5. Start the action or DoAfter exactly once.
  6. Apply resources, cooldowns, and persistent effects only at the correct authoritative point.
  7. Remove or disable the action when its source disappears.

DoAfter design

Define interruption rules deliberately: movement, damage, hand changes, target movement, target deletion, range, incapacitation, and duplicate requests. Use the established DoAfter event pattern in the current codebase.

Do not mutate valuable state before completion unless rollback is explicit. Completion handlers must revalidate state because the world may have changed during the delay.

Prediction

Immediate local animation, popup, or sound may be predicted. The final protected outcome remains authoritative. Prevent duplicate feedback when the server confirms or rejects the action.

Common failures

  • action remains after the granting component is removed;
  • cooldown is applied before a rejected attempt;
  • two concurrent DoAfters complete the same operation;
  • target deletion leaves stale state;
  • completion trusts conditions checked only at start;
  • predicted sound or popup plays twice.

Verification

Test success, cancellation by every configured interrupt, repeated requests, target deletion, disconnect, source removal, cooldown, and rejection under latency.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Implement privileged commands, admin UI, role checks, audit logs, and safe operational controls.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

Plan, verify, implement, and deliver repository work through evidence-backed ownership and quality gates.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

Implement replicated appearance data, GenericVisualizer mappings, sprite layers, overlays, and client visual systems.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

atmos

免费

Modify atmos simulation, gases, fire, pressure, pipes, devices, UI, and hot paths safely.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

audio

免费

Add data-driven audio with correct prediction, audience, resources, attribution, and verification.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

Implement BUI contracts, server validation, localized client windows, lifecycle cleanup, and state refresh.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new112026年10月22日 更新

查看 ArcaneSS14 的全部技能

报告此技能的问题