CST Studio Suite Help Skill
Answer CST Studio Suite questions by searching the user's locally installed help documentation, then cite the local source. The Skill keeps all CST vendor content on the user's machine; it only stores scripts, config, and a locally generated SQLite FTS5 index. Never copy CST help text into this repository.
Paths below are relative to this Skill's own directory (the folder that
contains this SKILL.md). You discovered this Skill there, so you know where
that is. Run the commands from that directory. Always quote any path that
contains spaces.
Install Layout
cst-studio-suite-help/ (this Skill's own directory)
├─ SKILL.md (this file)
├─ reference.md (help architecture + retrieval workflow details)
├─ install.py (one-command setup: locate CST + build index + self-test)
├─ scripts\
│ ├─ locate_cst.py (find the CST help root)
│ ├─ build_index.py (build SQLite FTS5 index)
│ ├─ search.py (ranked search CLI)
│ ├─ show_topic.py (clean Markdown excerpt CLI)
│ └─ open_topic.py (open original page in browser)
└─ data\
├─ config.json
└─ cst_help_<version>.sqlite (generated; gitignored)
Workflow
Resolve the Skill directory first. Every command below uses an absolute
path to this Skill's scripts so it works no matter what your current directory
is. Compute the Skill root once (it is the folder that contains this
SKILL.md):
# This SKILL.md sits in the Skill root. Use the directory you discovered
# this Skill in. On Windows PowerShell, for example:
$skill = "C:\Users\<you>\.cursor\skills\cst-studio-suite-help"
Then run every command as python "$skill\scripts\<name>.py" .... Do not
run python scripts/search.py from your workspace root — that resolves
relative to the wrong directory and fails with
can't open file '...workspace\scripts\search.py'. The scripts self-locate
their own DB and config via Path(__file__).resolve(), so they work from any
cwd once given an absolute path.
Always quote any Windows path that contains spaces — the CST install path lives
under C:\Program Files (x86)\... and contains spaces and parentheses. The
Skill's own script paths contain no spaces, so they need no quotes.
1. Ensure the local index exists
First-time setup (run once after cloning):
python "$skill\install.py"
install.py locates the CST help root, builds the SQLite FTS5 index, and runs a
self-test. Re-run it whenever the help install changes or after parser/schema
updates. You may also call the steps individually:
python "$skill\scripts\locate_cst.py"
python "$skill\scripts\build_index.py"
If locate_cst.py prints the default CST path, build_index.py will pick it up
automatically.
2. Search before answering
python "$skill\scripts\search.py" "waveguide port" --top 8
python "$skill\scripts\search.py" "离散端口" --top 8
search.py expands common Chinese CST terms to English before FTS, returns
ranked hits with id, topic_id, module, title, heading_path, snippet,
and local_path. Prefer --json for agent consumption.
3. Read the most relevant excerpt
python "$skill\scripts\show_topic.py" --chunk-id 12
python "$skill\scripts\show_topic.py" --topic-id 5 --max-chunks 2
--context-chunks N adds N neighbor chunks when used with --chunk-id. To
cap a topic, use --max-chunks N with --topic-id (combining
--context-chunks with --topic-id is ignored with a warning). Read only what
you need — do not dump whole topics.
4. Answer with citations
For every CST-specific claim, cite the local help source in this form:
Source:
<topic title>—<local path>
Keep excerpts short. Quote at most a sentence or two per claim. Do not paste large blocks of CST vendor text into the answer or into any project file.
5. Optional: open the original page
python "$skill\scripts\open_topic.py" --topic-id 5
Useful when the user wants to see full context, screenshots, or interactive examples that are not captured in the index.
API Query Strategy
For CST VBA API questions (especially in Chinese), search runs an automatic intent→symbol pipeline — you do not need to guess English keywords:
- The query is parsed into intents (
获取/拾取/设置/...) × entities (面/边/曲线/...). - Glob patterns are generated (e.g.
获取面id→Get*Face*). - Patterns are matched against
data/symbols.json(real CST method names only — no phantom methods). This requires a recentbuild_index.pyrun to have emitted the sidecar. - Matched symbols both expand the FTS query and drive rerank: a hit whose topic contains a matched symbol gets +6.0; an exact method name in the chunk text gets +5.0.
So a question like cst vba 怎么获取面 id lands on the Pick Object topic,
which owns GetFaceIdFromPoint, GetPickedFaceByIndex, PickFaceFromId. Read
the top hit with --chunk-id <id> --context-chunks 2 to see the surrounding
methods. If the symbols sidecar is missing, search still works (TERM_MAP
anchors handle the common cases) but without the symbol rerank — re-run
build_index.py to restore it.
Behavior Rules
- Search first for any CST-specific detail before answering from memory.
- Cite local path for every CST-specific claim.
- Short excerpts only — keep the index useful for AI context.
- Bilingual: accept English or Chinese questions; the search step expands
Chinese CST terms (
波导端口→waveguide port,离散端口→discrete port,边界条件→boundary conditions,网格→mesh,求解器→solver,宏→macro/VBA). - Ask for clarification only when top hits split across incompatible CST contexts (e.g. 3D vs PCB vs VBA meaning of the same term).
- Never modify or copy the original CST installation directory.
See reference.md for the help architecture, parser rules, and ranking details.