Skills library

readFile()

api.agents.skills.readFile(name, file) → Promise<File>

One of a skill's extra documents — a template, a checklist, a reference table. Computer skills only: an account skill is a single document.

skills onlycomputer onlylisted by get()
Using Python?

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

const skill = await api.agents.skills.get("release-notes");
console.log(skill.files);        // ["template.md", "examples.md"]

const template = await api.agents.skills.readFile("release-notes", "template.md");
skill = api.agents.skills.get("release-notes")
print(skill.get("files"))        # ["template.md", "examples.md"]

template = api.agents.skills.read_file("release-notes", "template.md")

Why extra files exist

They keep the body short. A template or a long reference belongs beside the skill, not inside it — the body is in the prompt once the skill is loaded, and a file costs nothing until it is opened.

The agent opens them the same way

skill { name, file } — the file names are listed when the skill loads. One tool for both sides.

Errors

CodeStatusWhen
not_a_skill400Called on the subagents library. Only skills have files.
path_not_found404No disk here, or no such file in the skill's folder.
An account skill answers path_not_found

It is a single document — there is nothing beside it. The message says so rather than implying the file was lost.