Agent skill

Dota2 Game Logic

by XavierCHN in XavierCHN/x-template

DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration…

MITAuto-check passedGame Development

Install Dota2 Game Logic

skills CLI
$ npx skills add XavierCHN/x-template --skill dota2-game-logic -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install XavierCHN/x-template dota2-game-logic --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/XavierCHN/x-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/dota2-game-logic .claude/skills/dota2-game-logic && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dota2-game-logic
GitHub stars
217
Token cost
~2.7k tokens
SKILL.md length
454 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration…

  • Works in 5 steps: 使用 TSTL 开发:TypeScript 编写,通过 tstl 编译为 Lua… → 严格使用 dota_ts_adapter:所有技能/物品/modifier… → 前后端通信优先级:前端 API 可获取的数据不给后端加 → Game… → …
  • User asks to create
  • SKILL.md covers 核心原则, 文件结构, 工作流 and 游戏模式入口, plus 5 more sections
  • Calls npx and yarn

What it does

Dota2 Game Logic is an agent skill from XavierCHN/x-template. DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration, modules, game events, net tables, or data synchronization.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Multiplayer and networking. It works with Lua and TypeScript. The repository describes itself as: DOTA2自定义游戏开发模板项目,使用typesscript和react开发; Xavier's DOTA 2 custom game template using typescript and react-panorama. The licence is MIT.

When your agent uses it

  • User asks to create
  • Modify DOTA2 custom game server-side logic
  • Game mode configuration
  • Data synchronization

Example prompts

  • “/dota2-game-logic”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 使用 TSTL 开发:TypeScript 编写,通过 tstl 编译为 Lua 运行在 Dota 2 服务端
  2. 严格使用 dota_ts_adapter:所有技能/物品/modifier 必须通过 @registerAbility() / @registerModifier() 注册,继承 BaseAbility / BaseItem / BaseModifier
  3. 前后端通信优先级:前端 API 可获取的数据不给后端加 → Game Events → NetTable → XNetTable
  4. 配置与代码分离:所有可能与前端共享或需要集中管理的配置、数值、常量(包括但不限于技能属性、物品数据、单位属性、游戏规则参数、界面配置等),都必须放在 game/scripts/npc/ 下的 KV 文件中。后端代码通过编译后的 JSON…
  5. 编译验证:代码修改完成后,必须运行编译验证,确保无错误

What it can do on your machine

Read from SKILL.md and the folder at commit ba97b00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • yarn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dota2 Game Logic loads about 2.7k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 454 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from XavierCHN/x-template at commit ba97b00, republished under its MIT licence (© XavierCHN). 454 words, ~2,655 tokens.

Download SKILL.mdSave it as .claude/skills/dota2-game-logic/SKILL.md (or your agent's skills folder).
name
dota2-game-logic
description
DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration, modules, game events, net tables, or data synchronization.

为 DOTA2 自定义游戏项目编写服务端游戏逻辑。

核心原则

  1. 使用 TSTL 开发:TypeScript 编写,通过 tstl 编译为 Lua 运行在 Dota 2 服务端
  2. 严格使用 dota_ts_adapter:所有技能/物品/modifier 必须通过 @registerAbility() / @registerModifier() 注册,继承 BaseAbility / BaseItem / BaseModifier
  3. 前后端通信优先级:前端 API 可获取的数据不给后端加 → Game Events → NetTable → XNetTable
  4. 配置与代码分离:所有可能与前端共享或需要集中管理的配置、数值、常量(包括但不限于技能属性、物品数据、单位属性、游戏规则参数、界面配置等),都必须放在 game/scripts/npc/ 下的 KV 文件中。后端代码通过编译后的 JSON 读取,严禁在代码中硬编码任何可能变化的配置值。修改配置后需运行 npx gulp kv_2_js 刷新 JSON
  5. 编译验证:代码修改完成后,必须运行编译验证,确保无错误

文件结构

文件路径用途
服务端入口game/scripts/src/addon_game_mode.ts游戏模式初始化入口
客户端入口game/scripts/src/addon_game_mode_client.ts客户端逻辑入口
游戏模块game/scripts/src/modules/游戏功能模块(GameConfig、Debug 等)
模块激活game/scripts/src/modules/index.ts模块激活入口(ActivateModules())
技能源码game/scripts/src/abilities/<模块名>/技能和物品的 TSTL 逻辑
独立 Modifiergame/scripts/src/modifiers/<模块名>/独立的机制性 modifier
工具函数game/scripts/src/utils/通用工具库
事件类型shared/gameevents.d.ts前后端通信事件类型声明
网络表类型shared/net_tables.d.tsCustomNetTable 类型声明
X网络表类型shared/x-net-table.d.tsXNetTable 类型声明
网络表注册game/scripts/custom_net_tables.txt注册 NetTable 表名(KV3 格式)
KV 配置game/scripts/npc/NPC 键值对定义(技能/英雄/物品/单位)
KV 编译 JSONgame/scripts/src/json/KV → JSON 编译产物,后端 TSTL 从这里读取数据
前端 JSONcontent/panorama/src/json/KV → JSON 编译产物,前端 Panorama 从这里读取统一数据
本地化game/resource/addon.csv文本本地化
TSTL 配置game/scripts/tsconfig.jsonTSTL 开发环境编译配置
TSTL 生产配置game/scripts/tsconfig.prod.jsonTSTL 生产环境编译配置(加密)

工作流

步骤 1:确认需求
  • 明确功能需求、涉及的模块、需要修改的文件
  • 确定是否需要前后端通信(Game Events 或 Net Table)
  • 确定是否需要新建模块或修改现有模块
步骤 2:编写代码
  • 模块代码放在 game/scripts/src/modules/ 下
  • 在 modules/index.ts 的 ActivateModules() 中激活新模块
  • 如需通信,在 shared/gameevents.d.ts 声明事件类型
步骤 2b:编译 KV 到 JSON(如修改了 KV 文件)

如果修改了 game/scripts/npc/ 下的 KV 文件,必须运行以下命令将 KV 编译为 JSON,保证前后端数据一致:

bash
# 编译所有 KV 文件为 JSON
npx gulp kv_2_js
# 或快捷命令(同时执行 sheet→kv 和 kv→js)
npx gulp jssync

前后端数据分离原则:

  • 所有游戏数值配置写在 KV 文件中,前后端都从编译后的 JSON 读取同一份数据
  • 禁止在后端代码中硬编码数值常量,所有值必须从 KV → JSON 获取
步骤 3:配置数据通信(如需要)
  • Game Events:声明类型 → 后端发送/监听 → 前端接收/发送
  • NetTable:注册表名 → 声明类型 → 后端写入 → 前端读取
  • XNetTable:仅用于大数据量场景
步骤 4:编译验证(必须执行)

完成代码编写后,必须运行编译命令验证没有错误:

bash
# 验证服务端 TSTL 编译
npx tstl --project game/scripts/tsconfig.json
  • 如果编译成功(退出码 0),无错误输出,则验证通过
  • 如果编译失败,根据错误信息修复代码后重新编译验证
  • 必须确保编译通过后才能告知用户完成

游戏模式入口

addon_game_mode.ts

服务端入口文件,通过 Object.assign(getfenv(), {...}) 将函数注册到 Dota 2 引擎:

typescript
import 'utils/index';
import { ActivateModules } from './modules';
import Precache from './utils/precache';

Object.assign(getfenv(), {
    Activate: () => {
        ActivateModules();
    },
    Precache: Precache,
});
  • Activate():游戏模式激活时调用,初始化所有模块
  • Precache():预缓存资源
模块激活 (modules/index.ts)
typescript
import { XNetTable } from '../utils/xnet-table';

declare global {
    interface CDOTAGameRules {
        XNetTable: XNetTable;
    }
}

export function ActivateModules() {
    GameRules.XNetTable = new XNetTable();
    new GameConfig();
    new Debug();
}

模块开发

新建模块
  1. 在 game/scripts/src/modules/ 创建 <模块名>.ts
  2. 导出类并在 modules/index.ts 中激活
typescript
// modules/MyModule.ts
import { reloadable } from '../utils/tstl-utils';

@reloadable
export class MyModule {
    constructor() {
        // 初始化逻辑
        ListenToGameEvent('entity_killed', event => this.OnEntityKilled(event), this);
    }

    OnEntityKilled(event: EntityKilledEvent): void {
        // 处理逻辑
    }
}
typescript
// modules/index.ts - 添加激活
import { MyModule } from './MyModule';

export function ActivateModules() {
    // ...existing modules...
    new MyModule();
}
GameConfig 常用配置
typescript
export class GameConfig {
    constructor() {
        // 游戏设置
        GameRules.SetCustomGameSetupAutoLaunchDelay(3);
        GameRules.SetHeroSelectionTime(0);
        GameRules.SetPreGameTime(0);
        GameRules.SetStartingGold(0);
        GameRules.SetSameHeroSelectionEnabled(true);
        GameRules.SetHeroRespawnEnabled(false);

        // 游戏模式实体设置
        const game = GameRules.GetGameModeEntity();
        game.SetCustomGameForceHero('npc_dota_hero_phoenix');
        game.SetBuybackEnabled(false);
        game.SetDaynightCycleDisabled(true);

        // 队伍人数
        GameRules.SetCustomGameTeamMaxPlayers(DotaTeam.GOODGUYS, 3);
        GameRules.SetCustomGameTeamMaxPlayers(DotaTeam.BADGUYS, 3);
    }
}

dota_ts_adapter 核心

装饰器与基类
装饰器/基类用途
@registerAbility()注册技能/物品类,类名即为注册名
@registerModifier()注册 modifier 类,类名即为注册名,自动调用 LinkLuaModifier
BaseAbility技能基类,super.* 可调用原生 CDOTA_Ability_Lua 方法
BaseItem物品基类,super.* 可调用原生 CDOTA_Item_Lua 方法
BaseModifiermodifier 基类,提供 apply/find_on/remove 静态方法
BaseModifierMotionHorizontal水平运动 modifier 基类
BaseModifierMotionVertical垂直运动 modifier 基类
BaseModifierMotionBoth双向运动 modifier 基类
Modifier 静态方法(类型安全)
typescript
// 施加 modifier(参数类型与 OnCreated 参数自动关联)
const mod = MyModifier.apply(target, caster, ability, { duration: 5 });

// 查找 modifier
const existing = MyModifier.find_on(target);

// 移除 modifier
MyModifier.remove(target);
@reloadable 装饰器

标记支持热重载的类,在 Debug 模式下 -s 指令可重载脚本:

typescript
import { reloadable } from '../utils/tstl-utils';

@reloadable
export class MyModule { /* ... */ }

前后端通信

Show full SKILL.md (183 more words)Show less
Game Events

声明(shared/gameevents.d.ts):

typescript
declare interface CustomGameEventDeclarations {
    c2s_player_action: { action_type: number; target_entity: number };
    s2c_sync_data: { data_key: string; data_value: number };
}

后端发送:

typescript
// 发送给所有客户端
CustomGameEventManager.Send_ServerToAllClients('s2c_sync_data', {
    data_key: 'score',
    data_value: 100,
});

// 发送给指定玩家
CustomGameEventManager.Send_ServerToPlayer(playerID, 's2c_sync_data', {
    data_key: 'score',
    data_value: 100,
});

后端监听:

typescript
// 监听前端事件
CustomGameEventManager.RegisterListener('c2s_player_action', (userID, event) => {
    const playerID = userID as PlayerID;
    // 处理逻辑
});
CustomNetTable

1. 注册表名(game/scripts/custom_net_tables.txt):

<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
{
    custom_net_tables = 
    [
        "hero_list",
        "game_timer",
        "my_table"
    ]
}

2. 声明类型(shared/net_tables.d.ts):

typescript
declare interface CustomNetTableDeclarations {
    my_table: {
        my_key: {
            value: number;
            name: string;
        };
    };
}

3. 后端写入:

typescript
CustomNetTables.SetTableValue('my_table', 'my_key', {
    value: 42,
    name: 'hello',
});

限制:每个表不超过 2MB,超过请使用 XNetTable。

XNetTable

大数据量场景使用,通过 Game Events 分片传输。访问 GameRules.XNetTable:

typescript
// 写入
GameRules.XNetTable.Set('large_table', 'some_key', data);

// 需要在 shared/x-net-table.d.ts 声明类型

常用 API

游戏规则
API用途
GameRules.GetGameTime()获取游戏时间
GameRules.GetGameModeEntity()获取游戏模式实体
GameRules.SetCustomGameTeamMaxPlayers(team, count)设置队伍人数上限
GameRules.IsDaytime()是否白天
GameRules.SetHeroSelectionTime(seconds)选英雄时间
GameRules.SetPreGameTime(seconds)准备时间
GameRules.SetStartingGold(gold)初始金钱
单位操作
API用途
CreateUnitByName(name, origin, findClear, owner, playerOwner)创建单位
unit.Kill(ability, attacker)杀死单位
unit.RemoveSelf()移除单位
unit.AddAbility(name)添加技能
unit.FindAbilityByName(name)查找技能
unit.AddNewModifier(caster, ability, name, kv)添加 modifier
unit.GetAbsOrigin()获取位置
unit.SetAbsOrigin(vec)设置位置
unit.GetHealth() / unit.SetHealth(v)生命值
unit.GetTeamNumber()获取队伍
unit.IsAlive()是否存活
粒子与音效
API用途
ParticleManager.CreateParticle(path, attach, unit)创建粒子
ParticleManager.SetParticleControl(particle, cp, vec)设置控制点
ParticleManager.ReleaseParticleIndex(particle)释放粒子
EmitSoundOn(soundName, unit)在单位上播放音效
EmitGlobalSound(soundName)全局播放音效
StopSoundOn(soundName, unit)停止音效
定时器
typescript
// 延迟执行
Timers.CreateTimer(delay, () => {
    // 回调
});

// 循环执行(返回间隔秒数继续循环,返回 null 停止)
Timers.CreateTimer(() => {
    // 每帧执行
    return 0.03;
});

// 使用 timer_utils
import { registerTimerFunction } from '../utils/timer_utils';
向量操作
typescript
const pos = unit.GetAbsOrigin();
const direction = (target.GetAbsOrigin() - pos as Vector).Normalized();
const distance = (target.GetAbsOrigin() - pos as Vector).Length();
const newPos = pos + direction * 100 as Vector;

调试

聊天指令(工具模式自动启用)
指令说明
-help显示所有测试指令
-s重载脚本(script_reload)
-r重启游戏
-debug切换调试模式(线上需白名单)
-testx [filter]运行测试用例
控制台输出
typescript
print('debug message'); // 服务端控制台输出
Say(hero, 'message', true); // 在游戏中显示消息

编译验证(必须)

代码编写完成后,必须执行以下命令验证编译无错误:

bash
# 编译服务端 TSTL(非 watch 模式,仅编译一次检查错误)
npx tstl --project game/scripts/tsconfig.json
  • 编译成功:退出码 0,无错误输出
  • 编译失败:输出错误信息(文件名、行号、错误描述),修复后重新编译
  • 必须确保编译通过后才能认为任务完成

如果同时修改了前端代码,还需要验证前端编译:

bash
# 编译前端 Panorama(非 watch 模式)
npx webpack --config content/panorama/webpack.dev.js
完整验证命令
bash
# 同时验证服务端 + 前端
npx tstl --project game/scripts/tsconfig.json && npx webpack --config content/panorama/webpack.dev.js

常见陷阱

  1. 忘记注册 modifier:使用 @registerModifier() 装饰器,否则 LinkLuaModifier 不会被调用
  2. modifier 放错位置:技能/物品自己的 modifier 放在同一文件,独立机制性的才放 src/modifiers/
  3. NetTable 未注册:新表名必须加到 custom_net_tables.txt
  4. 事件类型未声明:自定义事件必须在 shared/gameevents.d.ts 声明,否则前后端类型不一致
  5. KV 文件未引用:新建的 KV 文件必须在对应的入口文件中 #base 引用
  6. ScriptFile 路径错误:KV 中的 ScriptFile 指向编译后的 .lua 文件路径(如 abilities/module/ability.lua)
  7. print vs Say:print() 只在服务端控制台输出,Say() 在游戏内显示
  8. Vector 运算:向量运算结果需要 as Vector 类型断言
  9. 编译后才能测试:TSTL 代码修改后需要编译才能在游戏中生效,开发模式用 yarn dev 自动编译
  10. shared/ 类型声明:shared/ 目录的修改会同时影响前后端编译,确保声明正确

© XavierCHN, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/dota2-game-logic of XavierCHN/x-template.

Open the folder on GitHubat commit ba97b00

Compare with similar skills

Dota2 Game Logic next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dota2 Game Logic compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dota2 Game Logic this skillXavierCHN/x-template217—~2.7kAutomated safety check: PassMIT
Glasses AppbrilliantlabsAR/brilliant_sdk115—~1.2kAutomated safety check: PassBSD-3-Clause
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Fantasy Framework Development Guideqq362946/Fantasy1.4k—~5.8kAutomated safety check: PassCustom licence
Anatomywheresryan22/anatomy500—~7.7kAutomated safety check: PassMIT

Similar skills

  • Glasses App

    brilliantlabsAR/brilliant_sdk

    Build an app for Brilliant Labs smart glasses (Halo or Frame) with this SDK, in Python, Flutter or WebBluetooth/TypeScript.

    115 GitHub stars~1.2k tokensUpdated 4 days ago
    MobileAuto-check passed
  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Development and review guide for the Fantasy C# distributed game server framework: ECS, FTask, routing, service discovery, config and databases.

    1.4k GitHub stars~5.8k tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed
  • Anatomy

    wheresryan22/anatomy

    Build crafted, highly detailed, interactive isometric SVG figures that explain a technical idea as a real physical object (a test rig, a dial gauge, a cabinet of drawers, a plotter, a lock), with…

    500 GitHub stars~7.7k tokensUpdated today
    Game DevelopmentAuto-check passed
  • Validate Gsdk

    PlayFab/gsdk

    Validates PlayFab Game Server SDK (GSDK) integrations in game server projects.

    170 GitHub stars~645 tokensUpdated 2 days ago
    Game DevelopmentAuto-check passed

More from XavierCHN/x-template

  • Dota2 Localization

    XavierCHN/x-template

    为 DOTA2自定义游戏 项目生成 Dota 2 本地化文本(addon.csv)。触发词:本地化、翻译、loc、i18n、addon.csv、文本、tooltip、多语言。Use when user asks to generate localization entries for abilities/units/items/modifiers, translate Chinese to…

    217 GitHub stars~567 tokensUpdated 4 mo ago
    Auto-check passed
  • Dota2 UI

    XavierCHN/x-template

    DOTA2 自定义游戏 UI(Panorama)开发指南。触发词:UI、界面、面板、panorama、frontend、前端、HUD、layout、xml、css、样式。Use when user asks to create or modify DOTA2 custom game UI panels, React components, CSS styles, layout XML…

    217 GitHub stars~5.5k tokensUpdated 4 mo ago
    Auto-check passed
  • Dota2 Ability

    XavierCHN/x-template

    Dota 2 自定义技能编写指南。触发词:技能、ability、spell、被动、主动. An agent skill from XavierCHN/x-template.

    217 GitHub stars~3.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Dota2 Item

    XavierCHN/x-template

    Dota 2 自定义物品编写指南。触发词:物品、item、装备、道具、配方、recipe、合成. An agent skill from XavierCHN/x-template.

    217 GitHub stars~1.7k tokensUpdated 4 mo ago
    Auto-check passed
  • Dota2 Unit

    XavierCHN/x-template

    Dota 2 自定义单位编写指南。适用于编写/修改单位 KV 配置文件(game/scripts/npc/customunits/)。触发词:单位、unit、creature、怪物、召唤物、建筑、塔、npc。

    217 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Dota2 Game Logic

What does Dota2 Game Logic do?

DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration…. Dota2 Game Logic is an agent skill from XavierCHN/x-template. DOTA2 自定义游戏服务端逻辑开发指南。触发词:游戏逻辑、服务端、server、game mode、游戏模式、GameRules、modifier、timer、lua、TSTL。Use when user asks to create or modify DOTA2 custom game server-side logic, game mode configuration, modules, game events, net tables, or data synchronization.

When should I use Dota2 Game Logic?

Dota2 Game Logic fits situations like: user asks to create; modify DOTA2 custom game server-side logic; game mode configuration; data synchronization.

How do I install Dota2 Game Logic in Claude Code?

Run `npx skills add XavierCHN/x-template --skill dota2-game-logic -a claude-code`. Or copy the skill folder (.agents/skills/dota2-game-logic in XavierCHN/x-template) into .claude/skills/dota2-game-logic in your project. Claude Code loads it when a task matches its description.

How do I install Dota2 Game Logic in Codex?

Run `npx skills add XavierCHN/x-template --skill dota2-game-logic -a codex`. Or copy the skill folder (.agents/skills/dota2-game-logic in XavierCHN/x-template) into .agents/skills/dota2-game-logic in your project. Codex loads it when a task matches its description.

Can I use Dota2 Game Logic in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add XavierCHN/x-template --skill dota2-game-logic -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dota2-game-logic, .gemini/skills/dota2-game-logic, .github/skills/dota2-game-logic and .opencode/skills/dota2-game-logic in your project.

What does Dota2 Game Logic need to run?

Going by SKILL.md and its folder, Dota2 Game Logic needs the command-line tools its instructions call (npx and yarn). Our summary lists: Node.js.

Does Dota2 Game Logic access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dota2 Game Logic safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dota2 Game Logic use?

Dota2 Game Logic is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dota2 Game Logic use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dota2 Game Logic?

Skills that share tags, products or a category with Dota2 Game Logic: Glasses App (brilliantlabsAR/brilliant_sdk, 115 stars), Image to Three.js Model (img2threejs/img2threejs, 18k stars), Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars) and Fantasy Framework Development Guide (qq362946/Fantasy, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dota2 Game Logic?

XavierCHN (a GitHub user) maintains it in XavierCHN/x-template, which has 217 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on May 23, 2026.

Source: XavierCHN/x-template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.