# readFile()

Canonical URL: https://developers.iagenify.com/sdk/ref/agents/skills/read-file/
Language: en

`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.

Status: skills only · computer only · listed by get()

```javascript
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");
```

## Why extra files exist {#why}

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 {#agent}

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

## Errors {#errors}

| Code | Status | When |
| --- | --- | --- |
| not_a_skill | 400 | Called on the subagents library. Only skills have files. |
| path_not_found | 404 | No 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.

- [get()](/sdk/ref/agents/skills/get): Where the file names come from.
- [skill](/sdk/agent/tools/skill): The agent's side.

```python
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")
```
