Afsim Skill logo

Afsim Skill

Community
qingzhoupro
afsim-skill

AFSIM 场景代码生成、报错调试、文档解析。触发词:/afsim /afsim-auto /afsim-learn /afsim-debug。当前版本:v1.0.2。当用户提到 AFSIM、Warlock、platform_type、sensor、weapon、mover、route、AFSIM 场景/兵棋推演时使用本 Skill。

Overview

Publisherqingzhoupro
Repositoryafsim-skill
Skill nameafsim-skill
Stars
63
Forks
11
Bundled files
20
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 20 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by qingzhoupro on GitHub. Read the source before you install it.

Installation

Install the Afsim Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/qingzhoupro/afsim-skill/tree/master
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/qingzhoupro/afsim-skill.git \
  .claude/skills/afsim-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Afsim Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Afsim Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Afsim Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AFSIM Skill — 核心入口 | v1.0.2

精简入口,详细工作流见 .cursor/commands/ 下的各子命令文件。

黄金法则

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

AI 可基于模板修正/组合输出,但新手不建议自造。报错 → errors-ref 匹配 → 教训激活 → 积累。

渐进披露

本 Skill 采用渐进披露策略节省上下文:

层级文件何时加载
0(始终)本文件默认
1(按需)refs/errors-ref.md报错时快速匹配
2(命中后)memory/cold/lesson-index.mderrors-ref 命中特定条目时
3(匹配后)memory/cold/lesson-root-causes.mdlesson-index 匹配到教训 ID 时
4(查询时)refs/quick-ref.md需要模板时
5(查询时)refs/demos-index.md需要 Demo 时
6(查询时)refs/complete-ref.md需要完整语法参考时

教训体系:索引 + 激活联动

Layer 1: errors-ref.md(快速索引,条件反射)

报错时第一反应去 refs/errors-ref.md 快速匹配。 格式:## [E001] 报错关键字 → 根因 → 修正方案 → Demo路径

Layer 2: memory/cold/(深度教训,应激激活)

不主动加载,仅当 errors-ref 命中特定条目时触发:

  1. errors-ref 命中 [Exxx] → 查 memory/cold/lesson-index.md 找相关教训 ID
  2. 加载 memory/cold/lesson-root-causes.md 中对应教训段落
  3. 输出修正方案 + 教训提醒

联动流程

用户报错 → refs/errors-ref.md 匹配 → 命中 [Exxx]
                                          ↓
                              lesson-index.md 查教训 ID
                                          ↓
                              lesson-root-causes.md 加载教训段落
                                          ↓
                              输出修正方案 + 教训提醒

代码生成原则

  1. 基于模板输出:不凭空自造,优先在 refs/quick-ref.md / templates/ 找模板
  2. 不明确则交互:需求模糊时询问关键参数(平台类型、武器、传感器、仿真时长等)
  3. 自检后输出:检查块结构、基类型、参数格式、单位
  4. 成果存入 output 目录:不得直接输出,告知用户保存路径(见下方成果管理闭环)

成果管理闭环

所有生成的代码通过 临时 → 验证 → 成熟 三阶段闭环管理:

目录结构

output/
├── staging/           # 临时成果区(初始输出位置)
│   └── [生成的 .txt / .md 文件]
└── verified/         # 成熟成果区(用户认可后归档)
    ├── scenario/     # 完整场景(可运行的 .txt 场景文件)
    ├── component/   # 组件模块(platform_type、processor 等可复用块)
    └── template/    # 模板片段(可直接复制到新场景的参数组合)

生命周期

生成代码 → 存入 output/staging/ → Warlock 验证
    ↓
[用户认可] → 从 staging 移动到 verified/ 对应子目录
    ↓
[后续生成] → 从 verified/ 中选取成熟案例作为参考

归档触发

以下任一条件满足时,将 output/staging/ 中的文件移动到 output/verified/ 对应子目录:

  1. 用户明确认可:"确认"、"很好"、"这个可以"
  2. 通过 Warlock/Wizard 验证:Warlock successfully loaded 无报错
  3. 仿真运行成功:end_time 内正常终止,无崩溃

归档操作

text
# 用户认可后,AI 执行归档
mv output/staging/xxx.txt output/verified/scenario/

# 同时在 verified/scenario/README.md 记录元信息

参考成熟成果

生成新代码时,优先从 output/verified/ 中找同类案例作为参考(仅次于 templates/ 和官方 Demo)。

命令入口

命令功能
/afsim显示命令列表和快速参考
/afsim-auto全自动代码生成
/afsim-auto step半自动,逐模块确认
/afsim-learn解析 MD/PDF 文档,融入 skill
/afsim-debug报错处理,联动教训体系

参考

  • 快速参考:refs/quick-ref.md
  • Demo 速查:refs/demos-index.md
  • 报错索引:refs/errors-ref.md
  • 完整语法:refs/complete-ref.md
  • 教训索引:memory/cold/lesson-index.md
  • 教训本体:memory/cold/lesson-root-causes.md
  • 模板目录:templates/
  • 成果目录:output/staging/(临时)/ output/verified/(成熟)

已验证语法白名单

以下语法已通过官方 Demo 交叉验证,生成代码时应优先使用。⚠️ 标记的参数需进一步确认。

sensor 高级参数

块类型参数验证来源备注
sensorreceive_onlysensor_demos.md ~42纯接收模式
sensortransmit_onlysensor_demos.md ~68纯发射模式
sensormaximum_rangesensor_demos.md ~3085快速剔除范围
sensorminimum_rangesensor_demos.md ~2083最小探测距离
sensorframe_timeengage.md ~54刷新频率
sensorscan_modesensor_demos.md ~1387azimuth / azimuth_and_elevation
sensorazimuth_scan_limitssensor_demos.md ~1388方位扫描范围
sensorantenna_heightsensor_demos.md ~1384用于地形遮蔽
sensorantenna_tiltsensor_demos.md ~1385波束下倾角
sensorlocationengage.md ~2912NED 坐标系位置
sensorinternal_linkengage.md ~58连接处理器
sensorintegration_gainsensor_demos.md ~57信号处理增益
sensorprobability_of_false_alarmsensor_demos.md ~1840虚警概率
sensorrequired_pdsensor_demos.md ~1841所需发现概率
sensorone_m2_detect_rangesensor_demos.md ~20861m² RCS 的探测距离
sensorhits_to_establish_tracksensor_demos.md ~2658建立航迹所需命中数
sensorreports_rangesensor_demos.md ~62报告距离
sensorreports_bearingsensor_demos.md ~63报告方位
sensorreports_locationengage.md ~55报告位置
sensorignore_same_sideengage.md ~53忽略同阵营

antenna_pattern 方向图类型

|| 类型关键词 | 验证来源 | 备注 | |-----------|---------|------| | constant | sensor_demos.md ~31 | 常数增益 | | circular_pattern | sensor_demos.md ~1371 | 圆锥波束 | | rectangular_pattern | sensor_demos.md ~1495 | 矩形波束 | | constant_pattern | sensor_demos.md ~342 | 恒定方向图 | | sine_pattern | sensor_demos.md ~3067 | 正弦方向图 | | uniform_pattern | sensor_demos.md ~2617 | 均匀全向 |

processor 状态机

参数验证来源备注
show_state_transitionsengage.md ~71调试输出
evaluation_intervalengage.md ~73多状态独立配置
next_stateengage.md ~75状态转换目标

comm 通信

|| 参数 | 验证来源 | 备注 | |------|---------|------| | internal_link | engage.md ~27 | 内部链路 | | frequency | sensor_demos.md ~49 | 工作频率 | | maximum_range | comm.md ~110 | 通信距离 | | power | sensor_demos.md ~75 | 发射功率 |

space_mover 轨道

|| 参数 | 验证来源 | 备注 | |------|---------|------| | semi_major_axis | satellite_demos.md ~834 | 半长轴 km | | eccentricity | satellite_demos.md ~832 | 离心率 | | inclination | satellite_demos.md ~833 | 轨道倾角 | | raan | satellite_demos.md ~216 | 升交点赤经 | | anomaly | satellite_demos.md ~217 | 近地点幅角 | | revs_per_day | satellite_demos.md ~5611 | 每日转数 |

全局配置

|| 参数 | 验证来源 | 备注 | |------|---------|------| | start_date | satellite_demos.md ~1042 | 仿真开始日期 | | start_time | satellite_demos.md ~1043 | 仿真开始时间 | | end_time | engage.md ~59 | 结束时间 | | random_seed | quick-ref.md | 随机种子 | | thread_count | engage.md ~13 | 并行线程数 | | realtime | script_demos.md ~61 | 实时仿真 | | event_output | script_demos.md ~327 | 事件输出 | | event_pipe | script_demos.md ~121 | 事件管道 | | dis_interface | script_demos.md ~62 | DIS 接口 | | include | engage.md ~15 | 包含外部文件 | | include_once | base_types.md ~315 | 仅包含一次 | | define_path_variable | satellite_demos.md ~184 | 路径变量 | | file_path | satellite_demos.md ~187 | 文件搜索路径 |

签名定义

类型有无基类型验证来源备注
radar_signature有(WSF_RADAR_SIGNATURE)engage.md ~18常用
optical_signature两种皆可base_types.md ~17Demo 中多无基类型
constant-base_types.md ~18固定值
plt_file-base_types.md ~46978频率依赖 RCS
bistatic_signature-base_types.md ~47069双基地雷达

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Afsim Skill AI skill do?

AFSIM 场景代码生成、报错调试、文档解析。触发词:/afsim /afsim-auto /afsim-learn /afsim-debug。当前版本:v1.0.2。当用户提到 AFSIM、Warlock、platform_type、sensor、weapon、mover、route、AFSIM 场景/兵棋推演时使用本 Skill。

Why use Afsim Skill on TypingMind?

Because you install it once and use it with any model. Afsim Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Afsim Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/qingzhoupro/afsim-skill/tree/master. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Afsim Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Afsim Skill?

As many as you like. As long as a model supports skills, you can use Afsim Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Afsim Skill AI skill free?

Yes. It is published on GitHub by qingzhoupro under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇