afsim-skill: Command for Claude Code

.cursor/commands/afsim-learn.md

afsim-learn is a command for Claude Code, Cursor from qingzhoupro/afsim-skill. It costs 0 tokens per session (1,093 once invoked), scanned A, original, MIT.

A command that reads Markdown or PDF documents about AFSIM, a simulation system, and stores extracted syntax and concepts by category. Categories include sensors, weapons, platforms, scripts, radar, and communications.

In plain words
What is it for?
Use it to learn AFSIM syntax from a file or pasted text and save the results under the relevant category.
Why use it?
It turns scattered reference documents into organized learning files that can be checked against an existing reference.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is qingzhoupro/afsim-skill's own configuration. It tells Claude Code and Cursor how to work on afsim-skill 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 afsim-skill configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/parse_doc.py f:\docs\afsim.pdf --category sensor.

Reuse

Borrowing it

Nothing to install: this file belongs to qingzhoupro/afsim-skill. 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/qingzhoupro/afsim-skill/master/.cursor/commands/afsim-learn.md
Clone the repo
git clone --depth 1 https://github.com/qingzhoupro/afsim-skill

Made for: Claude Code, Cursor.

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 afsim-learn

README.md
[![agentmods](https://agentmods.dev/badge/commands/qingzhoupro/afsim-skill/afsim-learn/github.svg)](https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-learn)
Your own site
<a href="https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-learn"><img src="https://agentmods.dev/badge/commands/qingzhoupro/afsim-skill/afsim-learn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for afsim-learn

Your own site · 80×15
<a href="https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-learn"><img src="https://agentmods.dev/badge/commands/qingzhoupro/afsim-skill/afsim-learn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 1,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.01093
Opus 5.5 $0.00000 $0.00437
Sonnet 5.5 $0.00000 $0.00219
Haiku 4.5 $0.00000 $0.00109

Measured 1mo ago against content hash b3d961c45817, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

afsim-learn 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 1mo 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-learn.md · 144 lines

How it starts

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

/afsim-learn — 文档解析融入 Skill

将 MD/PDF 文档中的 AFSIM 语法要点解析并融入 skill。

使用方式

方式一:提供文件路径

/afsim-learn f:\docs\afsim_传感器教程.md

方式二:直接粘贴文档内容

/afsim-learn
[粘贴文档内容]

方式三:指定分类

/afsim-learn f:\docs\afsim_传感器教程.md sensor

支持的分类:sensor / weapon / platform / mover / processor / script / radar / comm / other


解析流程

Step 1: 内容获取

读取文档内容(MD 直接读取,PDF 调用解析脚本)。

Step 2: 语法提取

自动识别并提取:

  • platform_type 定义块
  • sensor / weapon / mover / processor 配置块
  • 坐标格式(d:m:s N/S e/w)
  • 参数格式(时间、速度、单位)
  • 注释和说明
  • 关键概念和术语

Step 3: 分类存入

解析结果存入 refs/learn/ 对应分类目录:

refs/learn/
├── sensor.md
├── weapon.md
├── platform.md
├── mover.md
├── processor.md
├── script.md
├── radar.md
├── comm.md
└── other.md

每个文件按「来源文档」分隔,格式:

---
source: afsim_传感器教程.md
date: 2026-05-25
---

## platform_type SENSOR_EXAMPLE (来源: xxx.md)

### 关键语法

sensor find WSF_GEOMETRIC_SENSOR
   location 0 0 0 m
   ignore_same_side
   frame_time 10 sec
   reports_location
   on
   track_quality 0.5
end_sensor

**注意**:`sensor` 后必须跟传感器名称(如 `find`),然后才是基类型(如 `WSF_GEOMETRIC_SENSOR`)。不能省略名称。

### 注意事项

- location 指定传感器在平台上的位置
- frame_time 影响传感器刷新率

Step 4: 对比验证(关键步骤)

必须与 refs/complete-ref.md 交叉对比:

  1. 对每个提取出的语法参数,在 complete-ref.md 中查找是否有相同参数
  2. 若发现 skill 文档中未记录的新参数,标记为「待验证 ⚠️」
  3. 若发现参数值与 skill 记录不一致,标记为「疑似冲突 ⚠️」
验证结果格式:
- [✅] 参数名 X:与 complete-ref.md 一致
- [⚠️] 参数名 Y:未在 complete-ref.md 中记录(待验证)
- [⚠️] 参数名 Z:值与 skill 记录不符(疑似新语法)

Step 5: 冲突检测

对于每个提取的语法块:

  1. 若同名块(如 sensor find)已在 refs/learn/ 中存在,对比参数列表
  2. 参数完全相同 → 跳过(避免重复)
  3. 参数有差异 → 追加为「疑似新语法变体 ⚠️」,不覆盖原记录
  4. 新块类型 → 直接追加

Step 6: 更新索引

解析完成后:

  1. 在 refs/demos-index.md 中补充来源文档信息
  2. 若发现新错误模式,同步追加到 refs/errors-ref.md
  3. 若发现新深层教训,同步追加到 memory/cold/

解析脚本

对于 PDF 文件,使用 scripts/parse_doc.py:

python scripts/parse_doc.py f:\docs\afsim.pdf --category sensor

支持的格式:.md(直接读取)、.pdf(调用 parse_doc.py)


融入规则

  • 提取的代码片段必须保持原始格式,不得修改语法
  • 每个来源文档在目标文件中用 --- 分隔,包含 source 和 date 元信息
  • 如果某个语法模式已有记录,追加到现有条目后,不要覆盖
  • 如果提取到新的错误模式或教训,同步追加到 refs/errors-ref.md
  • 新参数必须对比 refs/complete-ref.md:已记录的标记为 ✅,未记录的标记为 ⚠️ 待验证
  • 冲突不覆盖:同一块类型的不同参数值追加为「疑似新语法变体 ⚠️」

Read the full file on GitHub · 144 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. 1mo ago First seen · 144 lines · 0 tokens per session scan A b3d961c45817

Subscribe to this mod's changes

afsim-learn is a command published in the GitHub repository qingzhoupro/afsim-skill (63 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,093 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.