files.write
Schema
Input = { path: string, // parent folders created automatically content: string, // text, or base64 when encoding = 'base64' encoding?: 'utf8' | 'base64', // default 'utf8' append?: boolean, // default false}
Output = { path: string, size: number, created: boolean, // false if the write replaced an existing file mime: string,}This is the single most-used skill in the whole Studio pipeline: every generator step and every
free-planned task is instructed to “save every deliverable with files_write… a task without a
saved file is not done” (see the runner’s runtimePrompt() in
Projects). A task’s saved files become its TaskOutput.files,
which in turn become ProjectOutput rows once the run finishes.
Example
curl -s -X POST http://localhost:4000/api/studio/skills/invoke \ -H 'content-type: application/json' -b cookies.txt \ -d '{"name":"files.write","input":{"path":"welcome-letter.md","content":"# Welcome\n\nGlad you are here."}}'{ "ok": true, "output": { "path": "welcome-letter.md", "size": 33, "created": true, "mime": "text/markdown" } }