afsim

A command entry point for generating and debugging AFSIM scenarios. AFSIM is software for simulating military operations, while a scenario describes entities such as aircraft, sensors, weapons and routes.

In plain words
What is it for?
Use it to generate a complete scenario automatically or step through it module by module, learn syntax from documents, and request corrections for Warlock or Wizard errors.
Why use it?
It provides guided commands and checked examples so you do not have to invent unfamiliar AFSIM syntax from scratch.

Command for Cursor

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 commands/qingzhoupro/afsim-skill/afsim
Clone the repo
git clone --depth 1 https://github.com/qingzhoupro/afsim-skill

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00588
Opus 5 $0.00000 $0.00294
Sonnet 5 $0.00000 $0.00118
Haiku 4.5 $0.00000 $0.00059

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

Security

Grade A, and why

afsim scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/commands/afsim.md · 86 lines

What it actually says

/afsim — 主命令入口

显示 AFSIM-SKILL 命令列表和快速参考。

命令列表

命令 功能
/afsim-auto 全自动代码生成,无需确认直接输出
/afsim-auto step 半自动,逐模块确认,适合学习/复杂场景
/afsim-learn <文档路径或内容> 解析 MD/PDF 文档,融入 skill
/afsim-debug 报错处理,粘贴 Warlock/Wizard 报错信息获取修正

黄金法则

不要凭空自造 AFSIM 语法,要基于验证过的模板和官方 Demo 输出!

快速开始

新建场景(推荐用 /afsim-auto step

/afsim-auto step

按提示输入需求,例如:"做一个红方萨姆防空系统对抗蓝方战机的场景"

AI 会逐模块确认:platform_type → sensor → weapon → route → processor,每步等待你的确认。

快速生成(用 /afsim-auto

/afsim-auto 做一个红方萨姆防空系统对抗蓝方战机的场景

AI 自动完成全流程,直接输出代码。

学习文档(用 /afsim-learn

/afsim-learn 将这个.md文件解析进skill:f:\docs\afsim_传感器.md

AI 自动解析文档中的 AFSIM 语法要点,存入 refs/learn/ 对应分类。

报错处理(用 /afsim-debug

/afsim-debug

粘贴 Warlock/Wizard 的报错信息,AI 会匹配 errors-ref 并激活相关教训,给出修正方案。

快速参考

AFSIM 代码的核心块结构:

radar_signature NAME
  constant 10 m^2
end_radar_signature

platform_type NAME WSF_PLATFORM
  side blue
  icon F-18E
  radar_signature NAME
  mover WSF_AIR_MOVER
     debug
  end_mover
end_platform_type

platform instance_name TYPE
  side blue
  route
     position 30:00:00n 120:00:00e altitude 10000 ft msl
        speed 300 kts
  end_route
end_platform

random_seed 1
end_time 30 sec

完整模板见 refs/quick-ref.md Demo 速查见 refs/demos-index.md

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. 2d ago First seen · 86 lines · 0 tokens per session scan A 4a4c232a241e

Subscribe to this mod's changes

afsim is a command published in the GitHub repository qingzhoupro/afsim-skill (51 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 588 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.