wc3-map-ts-template: Instructions file for GitHub Copilot

.github/copilot-instructions.md

wc3-map-ts-template copilot-instructions.md is an instructions file for GitHub Copilot from eiriksgata/wc3-map-ts-template. It costs 5,061 tokens per session, scanned B, original, MIT.

Repository instructions for developing Warcraft III maps in TypeScript and using the game’s programming interfaces. They describe the project layout, API wrappers, and documentation conventions.

In plain words
What is it for?
Use them to implement gameplay features, consult the project’s TypeScript API types, and document functions consistently.
Why use it?
They reduce confusion when writing game code that must be compiled to Lua and interact with Warcraft III objects and functions.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is eiriksgata/wc3-map-ts-template's own configuration. It tells GitHub Copilot how to work on wc3-map-ts-template itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wc3-map-ts-template configures →

Reuse

Borrowing it

Nothing to install: this file belongs to eiriksgata/wc3-map-ts-template. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/eiriksgata/wc3-map-ts-template/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/eiriksgata/wc3-map-ts-template

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wc3-map-ts-template copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/eiriksgata/wc3-map-ts-template/copilot-instructions.svg)](https://agentmods.dev/instructions/eiriksgata/wc3-map-ts-template/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/eiriksgata/wc3-map-ts-template/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/eiriksgata/wc3-map-ts-template/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,061 This file is loaded in full into every session.
When invoked 5,061 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05061 $0.05061
Opus 5 $0.02531 $0.02531
Sonnet 5 $0.01012 $0.01012
Haiku 4.5 $0.00506 $0.00506

Measured 4d ago against content hash 4f0d312951ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

wc3-map-ts-template copilot-instructions.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

- Never tell the user: “save in KKWE, then unpack with w2l”.
.github/copilot-instructions.md · 578 lines

How it starts

The opening of the file, as written. The whole thing — 578 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Warcraft III TypeScript Map Development Template

Project Architecture

This is a Warcraft III 1.27a map development template using TypeScript-to-Lua compilation. The project integrates multiple specialized tools for WC3 modding:

  • KKWE (Kunkka World Editor) - Enhanced world editor with JAPI extensions
  • w3x2lni - Map format converter for LNI (Lua Nested Interface) editing
  • typescript-to-lua (tstl) - Compiles TypeScript to Lua for WC3 execution
  • @eiriksgata/wc3ts - TypeScript definitions for Warcraft III APIs

@eiriksgata/wc3ts Library Reference

When developing with this template, always reference the @eiriksgata/wc3ts library for:

Core API Structure

  • handles/ - Wrapper classes for WC3 objects (Unit, Effect, Player, etc.)
  • globals/ - Global constants, enums, and predefined values
  • system/ - Utility systems (base64, binary readers/writers, file operations)
  • utils/ - Helper utilities (color management, KKWE extensions)
  • types/ - TypeScript type definitions for JASS functions

Documentation Patterns

Follow the library's documentation style:

  • Use JSDoc comments with @param, @returns, @deprecated, @note tags
  • Include detailed parameter descriptions
  • Mark deprecated methods and suggest alternatives
  • Use /** @noSelfInFile */ for files that shouldn't have implicit self

Naming Conventions

  • Classes use PascalCase: Unit, Effect, MapPlayer
  • Methods use camelCase: addAbility(), setColor()
  • Constants use UPPER_SNAKE_CASE: UNIT_STATE_LIFE, PLAYER_COLOR_RED
  • Handle properties are readonly: readonly handle: unit

Players 全局数组(重要!)

wc3ts 预定义了 Players 全局数组,可以直接通过索引获取玩家对象:

import { Players } from "@eiriksgata/wc3ts";

// Players[0] = 玩家1 (红色)
// Players[1] = 玩家2 (蓝色)
// Players[2] = 玩家3 (青色)
// ...
// Players[11] = 玩家12
// Players[PLAYER_NEUTRAL_AGGRESSIVE] = 中立敌对 (索引12)
// Players[PLAYER_NEUTRAL_PASSIVE] = 中立被动 (索引15)

// 直接使用 Players[n] 获取玩家,无需 MapPlayer.fromIndex()
const player1 = Players[0];  // 玩家1
const player2 = Players[1];  // 玩家2

// Unit.create 的第一个参数类型是 MapPlayer,直接用 Players[n] 即可
const unit = Unit.create(Players[0], FourCC("hfoo"), x, y, facing);

// 遍历所有玩家
for (let i = 0; i < bj_MAX_PLAYERS; i++) {
  const player = Players[i];
  print(`玩家${i + 1}: ${player.name}`);
}

Read the full file on GitHub · 578 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 578 lines · 5,061 tokens per session scan B 4f0d312951ae

Subscribe to this mod's changes

wc3-map-ts-template copilot-instructions.md is an instructions file published in the GitHub repository eiriksgata/wc3-map-ts-template (25 stars, last pushed 7d ago), licensed MIT. It adds 5,061 tokens to every session, about $0.0253 per session on Opus 5. A static security scan graded it B with 1 finding (subtle steering). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens