NateJoshuaSmith

Total War LLM General — AI skill for Claude Code

AI community

Claude commands the enemy army in Napoleon: Total War and Empire: Total War.

How to install Total War LLM General

This entry records only its repository, not the path inside it, so there is no exact command to give. Open NateJoshuaSmith/total-war-llm-general and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Total War LLM General does

Claude commands the enemy army in Napoleon: Total War and Empire: Total War. A Lua battle script streams the battlefield to Python, Claude picks orders in real time, and a toggleable overlay shows its prompts and plans.

Alternatives in AI

  • Claw Empire — Command Your AI Agent Empire from the CEO Desk — A local-first AI agent office simulator that orchestrates CLI 1.1k ★
  • Slotstream — Run a 105 GB AI model on a Mac that can't hold it 396 ★
  • OpenAgentd — The open-source, local-first alternative to Claude Code & Claude Cowork 208 ★

README

Total War LLM General

A mod where Claude replaces the battle AI in **Napoleon: Total War**, with **Empire: Total War** to follow. Claude commands the enemy army in real time, and you can toggle its plans on screen.

**Status: early development (Phase 0).** Nothing is playable yet. We are still confirming what the game's battle scripting allows.

How it works

Every few seconds:

  1. A small Lua script inside the battle writes the state of every unit (position, men alive, ammo, morale) to a file.
  2. A Python program on your PC reads that file, builds a short battle report, and asks Claude for orders.
  3. Claude picks orders from a fixed menu (move, attack, change formation, and so on). It never writes free-form commands.
  4. Python checks every order against the live unit list and drops any bad ones, then writes an orders file.
  5. The Lua script carries the orders out.

If Claude is slow or a call fails, units keep their last orders or the game's own AI takes over. The battle never waits on us.

Instant reactions, such as forming square when cavalry charges, run in Lua with no API call.

Roadmap

Phase Goal
0 Bridge spike A Python file makes one unit move in battle
1 Read the battlefield The Python report matches what's on screen
2 Remote control Every order in the menu works, sent by hand
3 Claude takes command Claude finishes a full battle without a crash
4 Make it good Beats the vanilla AI more often than it loses
5 Port to Empire The same test battles run in Empire
6 Ship it Anyone can install it from this README

Development setup

Requires Python 3.12 or newer.

python -m venv .venv
.venv\Scripts\activate          # Windows (on macOS/Linux: source .venv/bin/activate)
pip install -r requirements.txt
pip install -e .

Run the same checks CI runs:

ruff check .
ruff format --check .
lint-imports
pytest

Tests that call the real Claude API are marked `live` and skipped