zinc-unittest — community zinc-unittest, War3Lib, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Lua-based AI Agents needing comprehensive unit testing capabilities for War3 Maps Library The Share War3 Maps Library for myself.

Crainax Crainax
[0]
[0]
Updated: 3/2/2026

Agent Capability Analysis

The zinc-unittest skill by Crainax is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Lua-based AI Agents needing comprehensive unit testing capabilities for War3 Maps Library

Core Value

Empowers agents to automate testing workflows using Lua scripts and template-based test generation, leveraging dependencies like [chain] and utilizing file formats such as .j, .cfg, .w3a, .w3u, and .w3i

Capabilities Granted for zinc-unittest

Automating unit test creation for War3 Maps Library modules
Generating test templates using Lua/tasks/TaskCreateUT.lua
Debugging War3 Maps Library projects using zinc-unittest workflows

! Prerequisites & Limits

  • Requires bash script execution for test creation
  • Lua environment necessary for script interpretation
  • Limited to War3 Maps Library projects with specific file structure
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

zinc-unittest

Install zinc-unittest, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Zinc Unit Test Workflow (War3Lib)

按以下顺序执行,保持最小改动和可复现。

1. 建立三件套文件

  1. 以目标模块 Xxx.j 为中心,确认同目录存在:Xxx.cfgXxx_Test.j
  2. Xxx.cfg 不存在时创建,并补齐:公开 API 关键词 + [chain] 基础依赖。
  3. 需要物编辅助测试时,按需创建同名扩展文件:Xxx.w3a(技能)、Xxx.w3u(单位)、Xxx.w3i(物品)。

说明:cfg 前半段用于外部 dependency 注入关键词;[chain] 是该库底层依赖,用于递归注入。

2. 生成或刷新 _Test.j(必须走任务脚本)

优先复用项目脚本,不手写测试壳。

  1. 运行:bash .codex/skills/zinc-unittest/scripts/create_ut.sh <Xxx.j>
  2. 该流程会调用 Lua/tasks/TaskCreateUT.lua,并使用模板 Jass/template/UTTemplate.j
  3. 已存在 _Test.j 时默认不覆盖,仅更新 Jass/config/UnitTest.h 的 include 到当前测试文件。

如果脚本不可用,再手动按 UTTemplate.j 结构补齐占位符:{UnitTest}LibraryName#include

3. 编写测试逻辑(参考 UnitUtils 风格)

  1. library UTXxx requires Xxx,... 中按功能拆分 Test_* 私有函数。
  2. 使用 UnitTestAutoTimer 安排自动测试,避免初始化竞争。
  3. 聊天命令入口走 s1..s10-参数,复用模板函数 TTestUTXxx* / TTestActUTXxx1
  4. 断言优先使用 UnitTestFramwork.assertBoolean/Integer/Real/String
  5. 需要输出到日志时优先用 Trace(...)(YDLua),不要依赖仅本地可见的原生提示。

4. 宏保护与命名

  1. 测试专用注册与入口放在测试文件中;若写在业务库,必须加:#if (CURRENT_BUILD_VERSION != VERSION_RELEASE)
  2. 不使用 _ 开头标识符。
  3. 用模块名前缀组织测试名与提示文案,保证日志可检索。

5. 验收检查

  1. Xxx.cfg 关键词覆盖公开能力;[chain] 不漏基础库。
  2. _Test.j 可独立触发核心断言,失败日志能定位到具体测试。
  3. 若依赖物编,Xxx.w3a/w3u/w3i 与测试步骤匹配,并在说明中写出用途。

References(按需加载)

  • references/ut-file-layout.md
  • references/assert-trace-pattern.md
  • references/examples.md

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is zinc-unittest?

Ideal for Lua-based AI Agents needing comprehensive unit testing capabilities for War3 Maps Library The Share War3 Maps Library for myself.

How do I install zinc-unittest?

Run the command: npx killer-skills add Crainax/War3Lib/zinc-unittest. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for zinc-unittest?

Key use cases include: Automating unit test creation for War3 Maps Library modules, Generating test templates using Lua/tasks/TaskCreateUT.lua, Debugging War3 Maps Library projects using zinc-unittest workflows.

Which IDEs are compatible with zinc-unittest?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for zinc-unittest?

Requires bash script execution for test creation. Lua environment necessary for script interpretation. Limited to War3 Maps Library projects with specific file structure.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Crainax/War3Lib/zinc-unittest. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use zinc-unittest immediately in the current project.

Related Skills

Looking for an alternative to zinc-unittest or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI