Skip to content

skill_read

Gate: ungated · no kind, zero authority · read

Read a file that ships beside a skill's SKILL.md. A skill can bundle more than instructions: reference notes it points you to, a template to fill in, a script to run with code_run. This is how those files are fetched. Ungated, because reading pre-installed text is context, never reach — and confined to that one skill's directory at the syscall level.

Input

FieldTypeRequiredNotes
namestringyesThe skill the file belongs to. Unknown names are an error, not an empty result.
pathstringyesPath relative to the skill's own folder, e.g. scripts/analyze.js.

Output

The file's contents as text, capped at 256 KiB. A path that is not a regular file is an error rather than a surprise.

From JavaScript

const tpl = nocturn.skillFile("summarize-url", "template.md");

Notes

Confinement is enforced by os.Root over the skill's directory, so a path can never escape it — not via .., not via an absolute path, not via a symlink pointing out. That is kernel-enforced (openat2 / RESOLVE_BENEATH), not string arithmetic, which is what keeps this from becoming a general filesystem probe. Its companion skill_load pulls a skill's instructions into the model's context and is deliberately not reachable from a script: a script has no context to load into.