cst-expert
Skill9 starsChanged 3 months agoApache-2.0View on GitHub
This skill should be used for any CST Studio Suite simulation task — microwave/RF/antenna/EMC/photonics/thermal/particle/PCB-SI/EMS/Mechanics modeling, CST VBA scripting, or when using cst_* MCP tools (cst_connect, cst_execute_vba, cst_run_simulation, cst_create_brick, cst_set_material). Provides CST expert hard rules, VBA syntax lookup discipline, official-case learning flow, and best practices.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
Files
CST Expert — 全场景仿真专家
当前状态
- 插件工具组1-8 已在真实 CST 上实测通过(连接/保存/求解器/弹窗/查询/SBR/建模/材料/参数扫描)。
- 本插件面向通用 CST 仿真自动化,适用于任何 CST 建模/求解/后处理任务。
核心原则
- 始终 Python 驱动 CST:
DesignEnvironment → Project → Model3D.add_to_history(VBA字符串),不生成独立 VBA 宏文件。 - 操作前先查参考案例:读
example_index.md找最接近的官方案例。 - VBA 语法先验证再执行:涉及具体对象时先查
vba_syntax/对应文件。 - 所有关键操作记录日志。
- 输出语言:思考、方案说明、询问确认中英文均可(优先与用户所用语言一致)。
- 🔴 关键操作后立即保存:
cst_save_project写盘并验证文件大小(cst_disconnect写死 save=False,CST 不自动保存,崩溃丢全部内存修改)。
铁律速查表(详细规则见 references/vba-rules.md)
| 铁律 | 概要 |
🔴 写 VBA 前必查 vba_syntax/ | 凭记忆写 CST VBA = 违规;先读插件内 references/knowledge/vba_syntax/ 对应文件 |
| 🔴 四条记录铁律 | ①错误原文禁摘写 ②排障第0步确认输入存在 ③超时≠故障 ④VBA后必查消息+状态 |
| 🔴 代码注释规范 | 改 src/*.py 必带【文件思路】+行注释(中英文均可)+Bug编号引用 |
| 🔴 兜底查文档 | 语法库查不到 → 查 CST 官方文档(Online Help),禁止凭记忆盲试 |
| ⚠️ MCP 不可用排障 | 先读 stderr jsonl 日志,不猜;勿用 cache 目录作判据 |
机制化:以上铁律已由插件 hooks 按需注入——仅当调用
cst_*工具时触发:写 VBA 前(pre_vba,用户可见提醒)、VBA 后(post_vba,含下次写前查库)、关键操作后(post_mutate)、涉 CST 会话收尾(stop_check,读 transcript 判断),见插件hooks/目录。不调用 cst-sim-agent 不注入;hook 只提醒不阻断;铁律的详细理由与扩展规则仍以 references 为准。
任务收尾流程(每次仿真后强制执行)
- 从本轮会话记录识别经验增量:新错误、新 VBA 对象/方法、新工作流、新求解器。
- 按维度写入插件内
references/knowledge/对应文件(避坑清单 / vba_syntax / 经验库模板)。 - 向用户逐条确认后写入,每条附时间戳;禁止无时间戳无来源的裸经验。
案例深度学习流程(任务启动时执行)
匹配案例(example_index.md)→ 读缓存深潜或提取案例摘要 → 应用经验到任务。详细 Step A/B/C 见 references/case-study-flow.md。
知识库导航
| 资源 | 路径 | 用途 |
| 铁律细节 | references/vba-rules.md | 四条铁律全文、代码注释规范、排障、兜底查询顺序 |
| 案例流程 | references/case-study-flow.md | 案例深度学习、extract_case 工具用法 |
| 官方文档查询 | references/official-docs.md | 文档地图、查询路径、已证实官方结论 |
| 通用避坑 | references/common-pitfalls.md | 通用 CST 操作避坑清单(端口/网格/求解器/API 陷阱) |
| 增量经验模板 | references/best-practices-template.md | 空白经验库模板,供用户 DIY 追加 |
| 语法库 | references/knowledge/vba_syntax/ | 8 域 VBA 权威语法(materials/ports/solver/mesh/boundaries/monitors/cad_import/postproc) |
| 案例索引 | references/knowledge/example_index.md | 158 案例索引(领域+标签+求解器) |
| 深潜缓存 | references/knowledge/on_demand_dives/ | 35 例已提取深度分析 |
| 静态手册 | references/knowledge/仿真经验手册.md | 跨领域经验提炼 |
加载策略:任何仿真任务 → 必读 references/knowledge/仿真经验手册.md + references/common-pitfalls.md;写 VBA → 查对应 references/knowledge/vba_syntax/*.md;案例 → 查 references/knowledge/example_index.md → 读缓存或提取。
权威源说明
本文件是 cst-expert Skill 的唯一权威源,随插件分发(插件根 skills/cst-expert/SKILL.md)。知识库(references/knowledge/)随插件内嵌,无需外部依赖。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

