---
title: "Update Skill Files Route"
method: PATCH
path: "/skills/{id_or_slug}/files"
---

# Update Skill Files Route

`PATCH /skills/{id_or_slug}/files`

## Request

- Base URL: `https://api.goodeye.dev/v1`
- URL: `https://api.goodeye.dev/v1/skills/{id_or_slug}/files`
- Auth: none declared

Change specific files in a skill, keeping every path the request does not name.

Only the paths in ``files`` and ``delete_paths`` are touched: everything
else rides forward unchanged, so a caller editing one file never has to
read back and resend the rest of the tree. This is the opposite of
``POST /v1/skills``, where ``files`` is a full snapshot and any path left
out is deleted.

Each entry in ``files`` carries that file's complete new content, and the
reserved path ``SKILL.md`` rewrites the runbook itself. ``executable`` and
``purpose`` keep their current values unless set. Requires edit access and
a current ``expected_version_token``; writes the next version of the skill.

## Path parameters

- `id_or_slug` string, required

## Request body

- UpdateSkillFilesIn: Request body for changing named files in a skill.
  - `expected_version_token` string, uuid, required
  - `files` FilePatchEntry[]
    - `path` string, required: Normalized relative POSIX path for the file being changed (e.g. 'references/rubric.md'). Must not be empty, absolute, contain '..' or '.' segments, empty segments (a trailing slash or 'foo//bar'), backslashes, or ASCII control characters.
    - `content` string, nullable: New inline file content as a UTF-8 text string, stored verbatim. Use 'content_base64' for binary files. Mutually exclusive with 'content_base64' and 'sha256'.
    - `content_base64` string, nullable: New inline binary file content as base64-encoded bytes, decoded on receipt. Mutually exclusive with 'content' and 'sha256'.
    - `sha256` string, nullable: Hex SHA-256 digest referencing a blob already known to the registry, used as the file's new content. Mutually exclusive with 'content' and 'content_base64'.
    - `executable` boolean, nullable: Whether the file should be marked executable when extracted. Leave unset to keep the file's current executable setting unchanged; set it explicitly only to change that setting.
    - `purpose` string, nullable: Short label describing the file's role in the skill. Leave unset to keep the file's current label unchanged; set it explicitly only to change that label.
  - `delete_paths` string[]
  - `source` 'manual' | 'teach' | 'optimization' | 'description_optimization' | 'audit', nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodeye/apis/goodeye-api.md) · [All operations](https://skmtc.dev/goodeye/apis/goodeye-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodeye/apis/goodeye-api/revisions/547cb8bb6ede?raw)
