cst-runtime-optimization

A workflow for optimizing CST simulation parameters through repeated runs and comparisons. CST is engineering software used to simulate electromagnetic designs.

In plain words
What is it for?
Use it to optimize geometry parameters against a defined objective, compare simulation results, check sensitivity, and record the findings.
Why use it?
It organizes parameter selection, probing, optimization, stopping decisions, validation, and reporting into one process.

Skill for Claude CodeCodex

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 skills/bbl21/cst-runtime-cli/cst-runtime-optimization
Any agent
npx skills add bbl21/cst-runtime-cli --skill cst-runtime-optimization
Clone the repo
git clone --depth 1 https://github.com/bbl21/cst-runtime-cli

Made for: Claude Code, Codex.

Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,877 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.00076 $0.04877
Opus 5 $0.00038 $0.02439
Sonnet 5 $0.00015 $0.00975
Haiku 4.5 $0.00008 $0.00488

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

Security

Grade A, and why

cst-runtime-optimization 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.

skills/cst-runtime-optimization/SKILL.md · 386 lines

How it starts

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

CST Runtime 优化 Skill

优化流程速查

Phase 0: 准备
  task 确认(工程/目标/参数/约束) → inspect-project(含category)
  [agent: 选几何参数 → 用户确认 → 翻译为objective spec]

Phase 1: 探针(参数≥4强制)
  run-probe-phase --objective <spec>
  [agent: 看top_params/edge_hit → 选参数/调范围/定算法]

Phase 2: 优化循环
  loop:
    run-optimization-step --objective <spec>
    [agent: objective达标? → break / ask_study_failed? → 换优化器]

Phase 3: 收尾
  generate-report → 灵敏度验证 → 经验→docs/
  [agent: 收敛质量判断 + 结论沉淀]

关键决策点:

阶段 节点 agent 行动
0 inspect-project 筛选 category=geometry 的参数作为候选
0 task确认 向用户确认5项:工程类型、objective函数、目标阈值、参数列表、几何约束
1 run-probe-phase 返回 main_effects_normalized > 0.1 保留,edge_hit=true 扩范围
1 算法选择 参数少+线性=TPE,多+交互复杂=CMA-ES,默认 suggested_algorithm
2 每轮返回 objective_value vs 目标阈值 → 达标break
2 ask_study_failed 未达标且 study 认为收敛 → 换优化器(最多一次)
3 收尾 灵敏度验证 + 经验入库

定位

本 Skill 专注 CST 参数优化闭环,依赖 cst-runtime-cli 提供底层基础设施。

  • 不携带 scripts/cst_runtime/ 源码;所有 CLI 调用走 base skill。
  • 负责定义优化迭代流程、早停判断、参数策略、数据导出和报告生成。
  • 所有生产任务使用标准 tasks/task_xxx_slug/runs/run_xxx/{projects,exports,logs,stages,analysis} 结构。

依赖声明

本 Skill 不实现 CST 操作,以下工具全部由 cst-runtime-cli 提供。所有 CLI 调用通过工作区的 -m cst_runtime 入口执行。

职责 CLI 工具
run 创建 prepare-runget-run-context
审计 record-stageupdate-status
进程/session cst-session-opencst-session-closecst-session-quit
参数 list-parameterschange-parameter
仿真 start-simulation-asyncwait-simulation
结果导出 export-run-results(统一导出 S11+2D+远场)
结果显示 generate-report(生成综合报告)
探针阶段 run-probe-phase(一键探针:设计→仿真→分析→注入 study)
优化迭代 run-optimization-step(一步迭代:ask→改参→仿真→tell,agent 判断早停)
Objective 函数 内置在管道中 — s11_min_db, s11_at_freq, gain_max, bandwidth, expression

Objective 函数系统

优化目标不再硬编码为 S11 min dB。通过在管道工具中传入 --objective <spec> 指定目标函数:

类型 格式 示例场景
S11 全局最小值 {"type": "s11_min_db"} 默认,最小化反射
指定频率 S11 {"type": "s11_at_freq", "freq": 2.4} 2.4GHz 阻抗匹配
最大增益 {"type": "gain_max", "port": 1} 优化天线增益
带宽 {"type": "bandwidth", "below_db": -10} S11<-10dB 带宽最大化
自定义表达式 {"type": "expression", "expr": "min(s11_db)"} 灵活组合

Read the full file on GitHub · 386 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. 2d ago First seen · 386 lines · 76 tokens per session scan A d8f2660b8072

Subscribe to this mod's changes

cst-runtime-optimization is a skill published in the GitHub repository bbl21/cst-runtime-cli (25 stars, last pushed 2mo ago), licensed MIT. It adds 76 tokens to every session and 4,877 once invoked, about $0.0004 per session on Opus 5. 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.