batch-files

batch-files is a skill for Claude Code, Codex from boshi-xixixi/TraeSkill. It costs 102 tokens per session (4,644 once invoked), scanned A, original, MIT.

A guide for writing, debugging, and maintaining Windows batch files. Batch files are plain-text scripts run by Windows Command Prompt to automate commands.

In plain words
What is it for?
Use it to automate file operations, deployments, backups, scheduled tasks, command-line tools, and integrations with programs such as Git, Node.js, Python, and curl.
Why use it?
It helps avoid common problems with variables, error handling, quoting, and command interpretation in .bat and .cmd files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/boshi-xixixi/traeskill/batch-files
Any agent
npx skills add boshi-xixixi/TraeSkill --skill batch-files
Clone the repo
git clone --depth 1 https://github.com/boshi-xixixi/TraeSkill

Made for: Claude Code, Codex.

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 batch-files

README.md
[![agentmods](https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/batch-files.svg)](https://agentmods.dev/skills/boshi-xixixi/traeskill/batch-files)
Your own site
<a href="https://agentmods.dev/skills/boshi-xixixi/traeskill/batch-files"><img src="https://agentmods.dev/badge/skills/boshi-xixixi/traeskill/batch-files.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00102 $0.04644
Opus 5 $0.00051 $0.02322
Sonnet 5 $0.00020 $0.00929
Haiku 4.5 $0.00010 $0.00464

Measured 5d ago against content hash 64915b51fab7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

batch-files scanned grade A 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Integrating batch scripts with external tools (curl, git, Node.js, Python)
.trae/Skills/.agents/skills/batch-files/SKILL.md · 555 lines

How it starts

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

Batch Files

A comprehensive skill for creating, editing, debugging, and maintaining Windows batch files (.bat/.cmd) using cmd.exe. Applies to CLI tool development, system administration automation, scheduled tasks, file operations scripting, and PATH-based executable scripts.

When to Use This Skill

  • Creating or editing .bat or .cmd files
  • Automating Windows tasks (file operations, deployments, backups)
  • Building CLI tools intended for a bin/ folder on PATH
  • Writing scheduled task scripts (SCHTASKS, Task Scheduler)
  • Debugging batch script issues (variable expansion, error levels, quoting)
  • Integrating batch scripts with external tools (curl, git, Node.js, Python)
  • Scaffolding new batch-based projects with structured templates

Prerequisites

  • Windows NT-based OS (Windows 7 or later)
  • cmd.exe (built-in)
  • Optional: a bin/ directory on PATH for distributing scripts as commands
  • Optional: PATHEXT configured to include .BAT;.CMD (default on Windows)

Command Interpretation

cmd.exe processes each line through four stages in order:

  1. Variable substitution%VAR% tokens are replaced with environment variable values. %0%9 reference batch arguments. %* expands to all arguments.
  2. Quoting and escaping — Caret ^ escapes special characters (& | < > ^). Quotation marks prevent interpretation of enclosed special characters. In batch files, %% yields a literal %.
  3. Syntax parsing — Lines are split into pipelines (|), compound commands (&, &&, ||), and parenthesized groups ( ).
  4. Redirection> overwrites, >> appends, < reads input, 2> redirects stderr, 2>&1 merges stderr into stdout, >NUL discards output.

Variables

Environment Variables

set _MY_VAR=Hello World
echo %_MY_VAR%
set _MY_VAR=
  • set with no arguments lists all variables
  • set _PREFIX lists variables starting with _PREFIX
  • No spaces around =set name = val sets variable "name " to " val"

Read the full file on GitHub · 555 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 555 lines · 102 tokens per session scan A 64915b51fab7

Subscribe to this mod's changes

batch-files is a skill published in the GitHub repository boshi-xixixi/TraeSkill (259 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 4,644 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.