技能调用指南
概述
本章介绍 CLI 的 技能(Skills) 体系,适用于以下场景:
- 希望查看当前 CLI 中可用的技能集合。
- 希望直接调用某个量子算法或 PDE 求解工作流。
- 不确定应当调用上层索引技能还是具体叶子技能。
- 希望通过
Tab自动补全快速定位技能名称。
本章覆盖以下内容:技能概念、/skills 多级目录树、/<技能> 直接调用、Tab 自动补全、查看技能详情 (/info 与 /cat)、索引技能与叶子技能的区别,以及典型调用示例。
什么是技能
技能(Skill)是 CLI 内置的 Agent 能力单元,用于定义 Agent 在特定任务中的行为约定。
每个技能都对应一份 SKILL.md 描述文件,其中定义了:
- 技能的目标与适用范围。
- Agent 应调用哪些工具,以及调用顺序。
- 输入与输出的约定。
技能按照文件系统层级进行组织。例如,当前发行版的目录结构如下(具体内容可能随版本变化):
quantum-skills/ [索引]
algorithms/ [索引]
cryptography/ [索引]
shor Shor's algorithm
discretelog Discrete logarithm
simon Simon's algorithm
primitives/ [索引]
amplitude-amplification Amplitude-amplification's algorithm
amplitude-estimation Amplitude-estimation's algorithm
hadamard-test Hadamard-test's algorithm
hadamard-transform Hadamard-transform's algorithm
hamiltonian-phase Hamiltonian-phase-estimation's algorithm
-estimation
quantum-phase-estimation Quantum-phase-estimation's algorithm
linear-systems/ [索引]
hhl HHL's algorithm
lcu LCU's algorithm
quantum-signal-processing Quantum-signal-processing's algorithm
hamiltonian-simulation/ [索引]
qdrift Qdrift's algorithm
trotter Trotter's algorithm
schrodingerization/ [索引]
advection-schrodinger Advection-schrodingerization's algorithm
-ization
backward-heat-1d Backward-heat-1d-schrodingerization's algorithm
-schrodingerization
heat-1d-schrodinger Heat-1d-schrodingerization's algorithm
-ization
heat-2d-schrodinger Heat-2d-schrodingerization's algorithm
-ization
quantum-machine-learning/ [索引]
qaoa QAOA's algorithm
qcbm QCBM's algorithm
qnn QNN's algorithm
vqc VQC's algorithm
vqe VQE's algorithm
quantum-error-correction/ [索引]
simulators/ [索引]
pennylane Pennylane's simulator
qiskit Qiskit's simulator
unitarylab Unitarylab's simulator
create_pde_task PDE 求解任务
submit-algorithm-library-task 提交一个算法任务 索引技能与叶子技能
每份技能文档都属于以下两种类型之一:
- 叶子技能(leaf):可直接执行的具体能力,例如
shor、create_pde_task。 - 索引技能(index):用于组织与聚合子技能的目录入口,其下仍包含更细分的技能。调用索引技能时,Agent 会根据其中声明的引用关系,逐层解析并定位合适的子技能。
技能类型的判定不依赖文档中的描述文字,而是基于真实文件系统结构。无论文档中使用 See reference:、Reference: 或其他自定义引用格式,CLI 都会根据目录结构正确识别。
如果不确定应调用哪一层,通常建议优先调用上层索引技能,由 Agent 自动递归定位更具体的能力节点。
/skills:多级目录树浏览
/skills 会按照真实文件层级展示完整技能树,不进行额外分类或合并。例如:
[agent│deepseek-v4-pro] › /skills
? 选择技能:
» quantum-skills [索引] · 2 项 Root entrypoint for the quantum-skills package. Us…
create-pde-task Create a partial differential equation (PDE) solving task. U…
submit-algorithm-library-task Submit a computation task from the algorithm library when th…
取消进入 quantum-skills 后:
? 选择技能 [quantum-skills]:
» ← 返回上一级
★ 直接调用此索引:quantum-skills Root entrypoint for the quantum-skills package. Use this ski…
algorithms [索引] · 7 项 A collection of quantum algorithms implemented usi…
simulators [索引] · 3 项 A collection of quantum simulators for quantum pro…
取消继续进入 algorithms:
? 选择技能 [quantum-skills/algorithms]:
» ← 返回上一级
★ 直接调用此索引:algorithms A collection of quantum algorithms implemented using Unitary…
cryptography [索引] · 3 项 Quantum algorithms that attack classical cryptogra…
hamiltonian-simulation [索引] · 2 项 Quantum Hamiltonian simulation methods for approxi…
linear-systems [索引] · 3 项 A set of quantum algorithms for solving linear sys…
primitives [索引] · 6 项 A collection of fundamental quantum computing prim…
quantum-machine-learning [索引] · 5 项 Variational quantum algorithms for optimization an…
schrodingerization [索引] · 4 项 Quantum PDE solvers using Schrodingerization, tran…
quantum-error-correction A clear and practical skill guide for learning and running a…
取消继续进入 cryptography:
? 选择技能 [quantum-skills/algorithms/cryptography]:
» ← 返回上一级
★ 直接调用此索引:cryptography Quantum algorithms that attack classical cryptographic proto…
discretelog Use when users ask about solving the discrete logarithm prob…
shor Use this skill when the user asks for Shor integer factoriza…
simon Use for implementing, explaining, running, or debugging Simo…
取消每一级目录均遵循以下约定:
[索引] · N 项:表示该目录为索引技能,自身包含SKILL.md,且下方存在 N 个子项。[目录] · N 项:表示该目录仅作为路径节点存在,自身不包含SKILL.md,但下方仍有子技能。- 叶子技能会显示对应的首段简介。
★ 直接调用此索引:将整个索引技能交由 Agent 解析,Agent 会沿引用关系继续定位下级技能。← 返回上一级与取消:始终可用。
在
--no-interactive或非终端环境下,/skills会退化为提示信息,引导使用/<技能名> [需求]直接调用技能。
/<skills>:直接调用
更常见的使用方式是通过技能名直接调用:
[agent│deepseek-v4-pro] › /shor 解释 Shor 算法,并用最小示例演示
(Agent 加载 shor 技能,并按其中定义的工具调用约定执行)也可以直接调用索引技能,由 Agent 自动定位更具体的子技能:
[agent│deepseek-v4-pro] › /cryptography 帮我比较 Shor / discretelog / Simon 三种攻击的适用场景
(Agent 加载 cryptography 索引,并沿引用关系继续解析相关子技能)当不带需求时:
[agent│deepseek-v4-pro] › /shor
? 补充需求(可回车跳过):- 输入需求:等价于带参数调用。
- 直接回车:仅显示技能简介(等价于
/info),不会触发模型调用。
裸
/+ 回车不再触发隐式技能导航。CLI 会输出提示信息:`/` 是命令前缀,按 `Tab` 浏览命令,`/skills` 进入技能导航,`help` 查看完整帮助
查看技能详情
除了直接调用技能让 Agent 执行任务外,CLI 还提供了两个在本地快速查看技能描述的命令。这两个命令仅在本地读取文件,不会触发大模型网络调用:
-
/info <技能名>提取并输出目标技能的概要与简介部分。这在你不确定某个技能的具体用途,但又不想查看冗长原文时非常有用。 (注:如前文所述,直接输入/<技能名>后不输入需求并回车,其效果等同于/info)。 -
/cat <技能名>直接在终端无修饰地打印目标技能对应的SKILL.md完整原文。如果你想了解底层逻辑,看看 Agent 在执行该技能时具体会收到什么样的 prompt 指令和工具调用约定,可以使用此命令。
示例:
[agent│deepseek-v4-pro] › /info shor
(终端仅输出 Shor 算法技能的简短说明文本)
[agent│deepseek-v4-pro] › /cat create_pde_task
(终端完整打印 create_pde_task 的 SKILL.md 原文,包含所有规则和约束)适用于已经明确目标技能与具体任务的场景。
调用索引技能,由 Agent 自动选择
[agent│deepseek-v4-pro] › /algorithms 我想用一个量子算法解决线性方程组问题适用于仅明确问题方向,希望 Agent 自动定位具体子技能的场景。
浏览技能树后再调用
[agent│deepseek-v4-pro] › /skills
(在多级目录树中定位目标技能,再选择具体叶子技能或索引技能)适用于首次使用或不熟悉当前发行版技能结构的场景。
调用 PDE 求解流程
[agent│deepseek-v4-pro] › /create_pde_task 求解一维热方程,区间 [0, 1],初值 sin(πx)
(Agent 调用 PDE 工具链,并在任务完成后自动打开结果文件)生成的可视化结果(SVG、PDF 等)会按照 交互对话指南 中的规则自动打开。
使用建议
- 首次使用时建议优先浏览
/skills:通过目录树理解技能之间的层级关系,通常比仅根据名称猜测更可靠。 - 不确定时优先调用索引技能:上层索引技能能够让 Agent 自动递归定位更具体的能力节点,从而降低选错技能的概率。
- 结合 Tab 自动补全提升效率:已知部分技能名称时,可直接输入前缀后按
Tab快速补全。 - 注意权限与环境约束:技能仅定义 Agent 的调用约定;若技能内部依赖远端服务或工具,仍需具备相应的认证状态与网络可达性。