技能库

list()

api.agents.skills.list() → Promise<Skill[]>

两个来源, 合并并按名称分类。 每个项目都说明来源。

freesorted by nameno content
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const skills = await api.agents.skills.list();

for (const skill of skills) {
  console.log(skill.name, "—", skill.description, `(${skill.source})`);
}
skills = api.agents.skills.list()

for skill in skills:
    print(skill["name"], "—", skill["description"], f"({skill['source']})")
namestring

小写字母、数字和破折号。

descriptionstring

一条线 特工的罪名符合请求

sourcestring

"account" 或 "computer".

builtInboolean

总是 false - 没有内在的技能。

身体不在身体里

清单载有姓名和说明。 (c) () 获得 内容——由于同样的原因,系统也以同样的分割方式迅速使用。

合并

两个来源都是平行阅读的。一个账户名隐藏计算机名,其余的磁盘项目跟随。无法读取的磁盘会提供空列表而不是错误。

展示

const [mine, shared] = [
  skills.filter((s) => s.source === "computer"),
  skills.filter((s) => s.source === "account"),
];
// A computer item is read-only here: it is a file, changed on that machine.
mine = [s for s in skills if s["source"] == "computer"]
shared = [s for s in skills if s["source"] == "account"]
# A computer item is read-only here: it is a file, changed on that machine.