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.
curl -O https://raw.githubusercontent.com/qingzhoupro/afsim-skill/master/.cursor/commands/afsim-debug.mdgit clone --depth 1 https://github.com/qingzhoupro/afsim-skillWrote 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.
[](https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-debug)<a href="https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-debug"><img src="https://agentmods.dev/badge/commands/qingzhoupro/afsim-skill/afsim-debug/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.
<a href="https://agentmods.dev/commands/qingzhoupro/afsim-skill/afsim-debug"><img src="https://agentmods.dev/badge/commands/qingzhoupro/afsim-skill/afsim-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01216 |
| Opus 5.5 | $0.00000 | $0.00486 |
| Sonnet 5.5 | $0.00000 | $0.00243 |
| Haiku 4.5 | $0.00000 | $0.00122 |
Grade A, and why
afsim-debug 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.
How it starts
The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/afsim-debug — 报错处理与教训激活
粘贴 Warlock/Wizard 的报错信息,获取修正方案和相关教训。
使用方式
/afsim-debug
[粘贴报错信息]
核心原则
报错后绝不立即猜测根因。必须用断点(逐段注释/最小测试文件)隔离问题。
处理流程
Step 1: errors-ref 快速匹配
在 refs/errors-ref.md 中搜索报错关键字:
Unknown commandInvalid positionnot foundexpectedundefinedsyntax error- 具体命令名(如
platform_type、radar_signature等)
匹配到 [Exxx] 条目后,记录相关教训 ID。
Step 2: 教训激活(应激触发)
仅在 errors-ref 命中时,加载 memory/cold/lesson-index.md 查找相关教训 ID。
找到教训 ID 后,加载 memory/cold/lesson-root-causes.md 中对应段落。
Step 3: 修正方案输出 + 断点验证
输出格式:
## 报错分析
[描述报错原因]
## 修正方案
```text
[修正后的代码片段]
断点测试计划
修正后,写一个最小化测试文件(只保留报错相关的最小片段), 验证修正是否正确。测试通过后再改主文件。
Demo 参考
详见:refs/demos-index.md → [相关 Demo 名称]
### Step 4: 追加记录(需用户确认)
如果该报错在 errors-ref 中无记录:
1. 将报错模式和修正方案追加到 `refs/errors-ref.md`
2. 如果该错误有深层根因,创建对应教训追加到 `memory/cold/`
> **注意**:追加前必须等用户 Warlock 验证通过后再追加,不可提前追加未经确认的教训。
---
## 断点调试工作流(核心)
> 当报错信息不足以直接定位根因时,必须使用断点调试。
### 何时使用
- 报错关键字模糊(如 `Unknown weapon`、`not found`)
- 修正后错误依然存在
- 无法从报错行号直接推断问题
### 断点调试流程
1. **提取最小片段**:从原文件中提取报错相关的最小代码块
2. **写测试文件**:将最小片段写成独立测试文件(`output/staging/test_xxx.txt`)
3. **Warlock 验证**:用 Warlock 打开测试文件,确认是否仍报错
4. **逐步加回**:测试通过后,逐步加回被注释掉的代码,再次验证
5. **确认根因**:通过断点测试精确定位问题,然后修正原文件
### 断点测试文件命名规范
output/staging/test_<功能><编号>.txt 例如: test_weapon_type_1.txt # 断点1:weapon 类型定义 test_weapon_with_type_1.txt # 断点2:weapon + platform_type test<具体修正点>.txt
### 断点调试示例
场景:报错 "Unknown weapon: my_weapon"
断点1(最小化): weapon MY_WEAPON WSF_EXPLICIT_WEAPON launched_platform_type MY_MISSILE end_weapon random_seed 1 end_time 1 sec → Warlock 测试
断点2(加上 platform_type): weapon MY_WEAPON WSF_EXPLICIT_WEAPON launched_platform_type MY_MISSILE end_weapon platform_type MY_MISSILE WSF_PLATFORM end_platform_type random_seed 1 end_time 1 sec → Warlock 测试
断点3(加上 platform 实例): weapon MY_WEAPON WSF_EXPLICIT_WEAPON launched_platform_type MY_MISSILE end_weapon platform_type MY_MISSILE WSF_PLATFORM end_platform_type platform test WSF_PLATFORM weapon my_weapon MY_WEAPON end_weapon end_platform random_seed 1 end_time 1 sec → Warlock 测试
通过后,再加回其他配置(mover、sensor 等)
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.
- 1mo ago First seen · 156 lines · 0 tokens per session scan A 9edfe056d894
afsim-debug 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,216 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.
Other commands, from other repositories
qa-changes
This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…
react-native
Command "react-native" from getsentry/toolkit, covering xcode build step (react-native xcode) and important notes.
auditar-cascading
Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.
http-service
Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
doctor
Badi configuration validation. Checks all Badi components and produces a diagnostic report.