Skill Files
Read and edit the files of a skill by path.
The Skill File object
object"skill.mcp_availability"requiredskill_idstringrequiredavailablebooleanrequiredexceeded_limits"file_count" | "size"[]requiredfile_countnumberrequiredsizenumberrequiredmax_file_countnumberrequiredmax_sizenumberrequiredEndpoints
List skill files
/skills/:skill_id/filesLists every file of a skill with its path, size and etag. Directories are implied by file paths.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Example request
Get skill MCP availability
/skills/:skill_id/mcp-availabilityReturns whether apps connected over MCP can see the skill. Skills with too many files or too large a total size are left out of MCP connections and keep working everywhere else.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Example request
Get skill file
/skills/:skill_id/files/contentRetrieves a single skill file by path. Documents include their text content, other files include a download URL.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Query parameters
pathstringrequiredPath of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.
Example request
Write skill file
/skills/:skill_id/filesCreates or replaces the file at a path. Parent directories are created automatically.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Request body
pathstringrequiredPath of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.
contentstringoptionalThe new text content of the file. Markdown files are stored as documents, other files as plain text files.
file_idstringoptionalThe ID of a previously uploaded file to place at the path. Use this for binary files. Files that belong to a document cannot be attached; use content to write markdown documents.
if_matchstringoptionalnullableOnly apply the change if the file still has this etag. Pass null to require that no file exists at the path yet. Omit to skip the check.
Example request
Delete skill file
/skills/:skill_id/filesDeletes the file at a path. Directories that were created automatically and become empty are removed. The root SKILL.md cannot be deleted.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Query parameters
pathstringrequiredPath of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.
if_matchstringoptionalOnly apply the change if the file still has this etag. Omit to skip the check.
Example request
Move skill file
/skills/:skill_id/files/moveMoves or renames a file. The root SKILL.md cannot be moved.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Request body
pathstringrequiredPath of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.
to_pathstringrequiredThe new path of the file.
if_matchstringoptionalOnly apply the change if the file still has this etag. Omit to skip the check.
Example request
Apply skill file changes
/skills/:skill_id/files/batchApplies up to 100 put, delete and move changes one after another, in order. Every change is validated before any is applied, but changes are not applied atomically: if a change fails while being applied, the changes before it stay applied. Every change can carry its own if_match precondition.
Path parameters
skill_idstringrequiredThe unique identifier for the skill
Request body
changesobject[]requiredThe changes to apply, in order.