📝 docs(tsl-api-reference): localize skill guidance

This commit is contained in:
csh
2026-07-22 17:30:00 +08:00
parent 3117ca5ae4
commit 09314a2bdb
+15 -18
View File
@@ -1,38 +1,35 @@
--- ---
name: tsl-api-reference name: tsl-api-reference
description: "Use when writing or reviewing TSL code and needing authoritative TSL API facts: builtin/dotnet functions, module APIs, exact signatures, parameters, return values, examples, or Chinese keyword discovery when the function name is unknown." description: "在编写或审查 TSL 代码、需要权威的 TSL API 事实时使用:内置/dotnet 函数、模块 API、精确签名、参数、返回值、示例,或在不知道函数名时通过中文关键词检索。"
--- ---
# TSL API Reference # TSL API 参考
Use this skill for TSL API facts only: function/module names, exact signatures, skill 仅用于 TSL API 事实:函数/模块名、精确签名、参数、返回值和示例。
parameters, return values, and examples. For TSL syntax, control flow, variables, 若需查询 TSL 语法、控制流、变量、对象模型或运行时语言规则,请改用
object model, or runtime language rules, use the `tsl-syntax-reference` skill instead. `tsl-syntax-reference` skill
Do not infer API signatures from memory or similar languages. TSL names are 不要凭记忆或参照相似语言推断 API 签名。TSL 名称大小写不敏感,但下划线是有意义的:
case-insensitive, but underscores are significant: do not remove underscores or 查询或报告 API 时不要删除下划线,也不要把名称改写成驼峰式。
camel-case names when querying or reporting APIs.
Run the bundled lookup script. Replace `<this-skill-dir>` with the directory 运行随附的查询脚本。将 `<this-skill-dir>` 替换为包含本 `SKILL.md` 的目录。
containing this `SKILL.md`.
- Known API name: - 已知 API 名称:
```bash ```bash
python <this-skill-dir>/scripts/lookup.py --name argmax python <this-skill-dir>/scripts/lookup.py --name argmax
``` ```
- Unknown name, known behavior or Chinese keywords: - 未知名称,但知道其行为或中文关键词:
```bash ```bash
python <this-skill-dir>/scripts/lookup.py --kw 数组 排序 python <this-skill-dir>/scripts/lookup.py --kw 数组 排序
``` ```
- Keyword terms use AND semantics; add terms to narrow results. - 关键词采用 AND 语义;增加关键词可缩小结果范围。
- Use `--limit N` to change how many candidate rows are printed. - 使用 `--limit N` 调整打印的候选行数量。
Exact lookup prints the full entry body and source marker. Keyword lookup prints 精确查询会打印完整的条目正文和来源标记。关键词查询打印候选行;
candidate rows; pick a candidate, then rerun exact lookup with `--name`. 选定候选项后,再用 `--name` 重新执行精确查询。
If exact lookup has no match, retry with Chinese keywords. If bundled data is 若精确查询无匹配,改用中文关键词重试。若随附数据缺失,请重新安装本 skill。
missing, reinstall the skill.