Agent skill

Dota2 Item

by XavierCHN in XavierCHN/x-template

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

MITAuto-check passedDocuments & Office

Install Dota2 Item

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

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

GitHub CLI
$ gh skill install XavierCHN/x-template dota2-item --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-item .claude/skills/dota2-item && 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-item
GitHub stars
217
Token cost
~1.7k tokens
SKILL.md length
473 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 6 steps: 从 dota_ts_adapter 导入… → 用 @registerAbility() 装饰器注册物品类,继承 BaseItem → 重写必要的生命周期方法(OnSpellStart、OnChannelFinish… → …
  • Tasks that involve Excel spreadsheets
  • SKILL.md covers 核心原则, 文件结构, 工作流 and KV 键值参考, plus 1 more section
  • Calls npx

What it does

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

Its SKILL.md is about 1.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 Documents & Office, covering Excel spreadsheets. It works with Microsoft Excel. 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

  • Tasks that involve Excel spreadsheets

Example prompts

  • “/dota2-item”

Requirements

  • Node.js

Workflow steps

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

  1. 从 dota_ts_adapter 导入 BaseItem、registerAbility
  2. 用 @registerAbility() 装饰器注册物品类,继承 BaseItem
  3. 重写必要的生命周期方法(OnSpellStart、OnChannelFinish 等)
  4. 通过 this.GetSpecialValueFor('键名') 读取 KV 中的 AbilityValues
  5. 如果是制作被动技能或者被动物品,使用 GetIntrinsicModifierName 方法获取 modifier 名称,之后在被动modifier里面配置所有的属性或者被动触发的效果。
  6. Modifier 放置规则:如果 modifier 是物品自己的(被该物品引用),直接放在物品同一个 .ts 文件中,不需要单独建文件;只有独立的、机制性的 modifier(不被任何技能/物品直接引用,如通用抛物线运动、通用buff,或者多个技能共用的modifier等)才需…

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

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

  • Network

    No URLs in SKILL.md. Its commands use npx, 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 Item loads about 1.7k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 473 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~1.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). 473 words, ~1,683 tokens.

Download SKILL.mdSave it as .claude/skills/dota2-item/SKILL.md (or your agent's skills folder).
name
dota2-item
description
Dota 2 自定义物品编写指南。触发词:物品、item、装备、道具、配方、recipe、合成。

为 DOTA2 自定义游戏项目编写自定义物品。

核心原则

  1. 配置与代码分离:所有可能与前端共享或需要集中管理的配置、数值、常量(包括但不限于物品属性、价格、冷却、效果数值等),都必须放在 game/scripts/npc/ 下的 KV 文件的 AbilityValues 中。通过 this.GetSpecialValueFor('键名') 在 TSTL 中读取,禁止在代码中硬编码任何可能变化的配置值。修改配置后需运行 npx gulp kv_2_js 刷新 JSON,保证前后端数据一致

文件结构

文件路径用途
物品 KVgame/scripts/npc/items_list/<物品名>.txt物品 KV 键值对(手动创建的自定义物品)
KV 入口game/scripts/npc/npc_items_custom.txt引用 #base "items_list.txt",自动生成部分由 Excel 管理
Excel 数据excels/物品表.xlsx自动生成 items_list.txt(请勿手动修改)
物品源码game/scripts/src/abilities/<模块名>/<物品名>.tsTSTL 物品逻辑(物品继承 BaseItem)
本地化game/resource/addon.csv物品名称、描述、数值标签

工作流

步骤 1:确认物品需求
  • 明确物品类型(被动/主动/切换/消耗品)
  • 确认物品价格、商店标签、品质
  • 确认物品是否可合成、是否需要配方
  • 确认物品是否需要自定义 TSTL 逻辑
步骤 2:编写 KV 配置

在 game/scripts/npc/items_list/<物品名>.txt 中创建 KV 文件,或在 excels/物品表.xlsx 中添加行(由 Gulp 自动生成到 items_list.txt)。

KV 文件必须在 npc_items_custom.txt 中通过 #base 引用后生效。

物品名必须以 item_ 开头。

KV 结构规则:物品名称必须在第一级,所有属性写在第二级的 {} 内:

kv
"item_custom_sword"
{
    "BaseClass"             "item_lua"
    "AbilityBehavior"       "DOTA_ABILITY_BEHAVIOR_PASSIVE"
    "ItemCost"              "2150"
    "ItemQuality"           "rare"
    "AbilityTextureName"    "item_custom_sword"
}
步骤 2b:编译 KV 到 JSON(必须执行)

修改 KV 文件后,必须运行以下命令将 KV 编译为 JSON,供前后端统一引用:

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

编译后输出到:

  • content/panorama/src/json/ — 前端 Panorama 使用
  • game/scripts/src/json/ — 后端 TSTL 使用

前后端数据分离原则:

  • 所有游戏数值配置写在 KV 文件中
  • 前后端都从编译后的 JSON 文件中读取同一份数据
  • 禁止在前端或后端代码中硬编码数值常量,避免数据不一致
步骤 3:编写 TSTL 源码(如需要)

如果物品有自定义行为(包括纯被动),在 game/scripts/src/abilities/<模块名>/<物品名>.ts 中:

  1. 从 dota_ts_adapter 导入 BaseItem、registerAbility
  2. 用 @registerAbility() 装饰器注册物品类,继承 BaseItem
  3. 重写必要的生命周期方法(OnSpellStart、OnChannelFinish 等)
  4. 通过 this.GetSpecialValueFor('键名') 读取 KV 中的 AbilityValues
  5. 如果是制作被动技能或者被动物品,使用 GetIntrinsicModifierName 方法获取 modifier 名称,之后在被动modifier里面配置所有的属性或者被动触发的效果。
  6. Modifier 放置规则:如果 modifier 是物品自己的(被该物品引用),直接放在物品同一个 .ts 文件中,不需要单独建文件;只有独立的、机制性的 modifier(不被任何技能/物品直接引用,如通用抛物线运动、通用buff,或者多个技能共用的modifier等)才需要单独放在 src/modifiers/ 目录下
步骤 4:添加本地化

在 game/resource/addon.csv 中添加:

  • DOTA_Tooltip_ability_item_<物品名> → 物品显示名
  • DOTA_Tooltip_ability_item_<物品名>_Description → 物品描述
  • DOTA_Tooltip_ability_item_<物品名>_<AbilityValues键名> → 数值标签
步骤 5:验证
  • 编译 TSTL(如有自定义逻辑),确认无类型错误
  • 进入游戏测试物品效果

KV 键值参考

物品继承所有技能的 KV 键,此外还有物品专属键。

通用键(继承自技能)
键名说明示例值
BaseClass基类item_lua
AbilityBehavior行为类型DOTA_ABILITY_BEHAVIOR_PASSIVE / DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_ITEM
AbilityTextureName图标名称item_magic_wand
MaxLevel最大等级1 / 3
AbilityCooldown冷却12
AbilityManaCost魔法消耗100
AbilityCastRange施法距离600
AbilityCastPoint施法前摇0.0
AbilityUnitTargetTeam目标队伍DOTA_UNIT_TARGET_TEAM_ENEMY
AbilityUnitTargetType目标类型DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC
AbilityUnitDamageType伤害类型DAMAGE_TYPE_MAGICAL
ScriptFile脚本路径abilities/<模块名>/item_custom.lua
AbilityValues自定义数值(子键)
Precache预缓存(子键:particle、soundfile、model)
物品基础键
键名说明示例值
ItemCost物品价格2150
ItemShopTags商店标签damage;attack_speed
ItemQuality物品品质component / common / rare / epic / secret_shop / consumable
ItemAliases别名tp;town portal scroll;teleport
ID唯一 ID3003
物品属性键
键名说明示例值
ItemStackable是否可堆叠1
ItemInitialCharges初始充能数1
ItemRequiresCharges需要充能1
ItemDisplayCharges显示充能数1
ItemPermanent永久物品0
ItemShareability共享性ITEM_FULLY_SHAREABLE / ITEM_PARTIALLY_SHAREABLE / ITEM_NOT_SHAREABLE
ItemDeclares物品声明DECLARE_USAGE_BOT
ItemCanBeDisassembled可拆分1
ItemCanBeSoldByPlayer玩家可出售0
Show full SKILL.md (184 more words)Show less
物品商店键
键名说明示例值
SecretShop秘密商店1
SideShop边路商店1
IsObsolete是否过时1
SuggestPregame建议出门装1
SuggestEarlygame建议前期装1
SuggestLategame建议后期装1
物品合成键
键名说明示例值
ItemRecipe是否为配方1
ItemResult合成结果item_bfury
ItemRequirements合成需求"01" "item_broadsword;item_mithril_hammer"
UpgradesItems升级物品item_boots
UpgradeRecipe升级配方1
MaxUpgradeLevel最大升级等级3
SubAbilityNames子技能名称ability1;ability2
ReplaceAbility替换技能ability_name
物品特效与声音键
键名说明示例值
Model模型路径models/props_gameplay/quelling_blade.vmdl
Effect效果particles/...
UIDropSound丢弃声音Item.Drop
UIPickupSound拾取声音Item.PickUp
WorldDropSound世界丢弃声音Item.WorldDrop
PingOverrideTextPing 覆盖文本#DOTA_Ping_GG
物品限制键
键名说明示例值
SpeciallyAllowedInNeutralSlot允许放入中立物品栏1
SpeciallyBannedFromNeutralSlot禁止放入中立物品栏1
ShouldNotSuggestMainGame主模式不推荐1
ShowDroppedItemTooltip显示掉落提示1
ShowGiveIndicatorOnTargetCast显示给与指示1
TokenTier代币等级1 / 2 / 3 / 4 / 5
ItemShareability 常量
常量说明
ITEM_FULLY_SHAREABLE完全共享
ITEM_PARTIALLY_SHAREABLE部分共享
ITEM_NOT_SHAREABLE不可共享
ItemQuality 常量
常量说明
component组件
common普通
rare稀有
epic史诗
secret_shop秘密商店
consumable消耗品

TSTL 编程参考

装饰器与基类
装饰器/基类用途
@registerAbility()注册物品类(物品也使用此装饰器)
BaseItem物品基类,所有的物品类都需要继承
物品常用方法
方法用途
OnSpellStart()使用物品时
OnAbilityPhaseStart()使用前摇阶段(返回 bool)
OnChannelFinish(bInterrupted)持续施法结束
GetBehavior()获取行为类型
GetSpecialValueFor(key)读取 AbilityValues 中的值
Precache(context)预缓存资源
GetCooldown(level)获取冷却
GetManaCost(level)获取魔法消耗
GetCurrentCharges()获取当前充能数
SetCurrentCharges(charges)设置充能数
GetCost()获取物品价格
GetPurchaseTime()获取购买时间
GetPurchaser()获取购买者
IsCombineLocked()是否锁定合成
SetCombineLocked(bLocked)锁定/解锁合成
物品事件回调
方法用途
OnItemEquipped(hUnit)装备时
OnItemUnequipped(hUnit)卸下时
OnItemPurchased()购买时
OnItemSold()出售时
OnItemSpawned()物品生成时

© 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-item of XavierCHN/x-template.

Open the folder on GitHubat commit ba97b00

Compare with similar skills

Dota2 Item 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 Item compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dota2 Item this skillXavierCHN/x-template217—~1.7kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Data Table Managern8n-io/n8n207k—~2.3kAutomated safety check: PassCustom licence
Docx4jplutext/docx4j2.4k—~2.5kAutomated safety check: PassNone
Instrument Data To Allotropeaws-samples/amazon-bedrock-agents-healthcare-lifesciences2742 repos~2.7kAutomated safety check: PassApache-2.0
Cyber Pptcrazyykhllc-bit/CyberPPT1.8k—~10kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Official

    Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Docx4j

    plutext/docx4j

    A skill your agent uses when writing Java code that creates, reads or edits Word (.docx), PowerPoint (.pptx) or Excel (.xlsx) files with docx4j — including generating documents, editing existing…

    2.4k GitHub stars~2.5k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed
  • Cyber Ppt

    crazyykhllc-bit/CyberPPT

    当用户需要把 DOCX、PDF、TXT、XLSX、研究报告、业务材料或原始数据转成高密度、可编辑、咨询风格 PPTX 时使用;也适用于需要 SCR 论证、视觉风格探索、详细图表和渲染质检的 PPT。

    1.8k GitHub stars~10k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Jev SEO

    AgriciDaniel/jev-seo

    Full live SEO audit of any website from its homepage URL, powered by Jev (TypeSafe's System One model).

    543 GitHub stars~2.5k tokensUpdated 18 days ago
    Documents & OfficeAuto-check: notes

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 Game Logic

    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…

    217 GitHub stars~2.7k 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 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 Item

What does Dota2 Item do?

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

When should I use Dota2 Item?

Dota2 Item fits situations like: tasks that involve Excel spreadsheets.

How do I install Dota2 Item in Claude Code?

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

How do I install Dota2 Item in Codex?

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

Can I use Dota2 Item 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-item -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-item, .gemini/skills/dota2-item, .github/skills/dota2-item and .opencode/skills/dota2-item in your project.

What does Dota2 Item need to run?

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

Does Dota2 Item 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 Item 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 Item use?

Dota2 Item 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 Item use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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 Item?

Skills that share tags, products or a category with Dota2 Item: Markitdown (ImCa0/just-laws, 781 stars), Data Table Manager (n8n-io/n8n, 207k stars), Docx4j (plutext/docx4j, 2.4k stars) and Instrument Data To Allotrope (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dota2 Item?

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.