К основному содержанию
скилл CX Codex

upload-files — скилл для Claude Code: загрузка файлов в ImageKit

Скилл проводит загрузку файлов в медиатеку ImageKit через DAM MCP: подписывает файлы и запускает POST там, где лежит сам файл.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add imagekit-developer/skills --skill upload-files -a claude-code
Открыть на GitHub

Что делает upload-files

Скилл нужен, когда файлы надо положить в медиатеку ImageKit, а не пересылать их содержимое через диалог. Байты файла в разговор не попадают: ни base64, ни data URI, ни потоки. Для больших файлов такой путь просто не работает.

Загрузка устроена так: multipart/form-data POST на endpoint ImageKit, авторизация — короткоживущая одноразовая подпись. DAM-сервер только подписывает. Файл идёт напрямую: с машины пользователя, если он локальный, или его забирает ImageKit, если это публичный URL. Есть shell — вызывается create_upload_signatures_in_bulk, затем возвращённая uploadCommand. Она переходит в локальную папку, забирает манифест и грузит до 16 файлов за раз, печатая по строке на файл. Без shell остаётся upload_file без параметров: открывается выбор файла с именем, папкой, тегами и метаданными. create_upload_signature берут, когда пользователь загружает сам и ему нужны подписанные поля формы.

Подпись живёт от 60 до 3 600 секунд, по умолчанию 600. До истечения ту же команду можно запустить снова — упавшие файлы повторятся, уже загруженные отклонятся. После истечения команда печатает manifest unavailable и не грузит ничего, поэтому подписывать надо заново. Ссылку на манифест держите как пароль: у кого она есть, тот может загрузить подписанные файлы, пока не вышло время. Папка — это путь в медиатеке, начинающийся с /, а не локальный путь.

Какие задачи решает

  • загрузить пачку локальных файлов в медиатеку ImageKit
  • подписать загрузку, не вытаскивая содержимое файла в чат
  • залить файл по публичному URL силами ImageKit
  • выдать пользователю подписанные поля формы для своей загрузки
  • проверить, что файлы действительно дошли до библиотеки

Примеры запросов агенту

  • Загрузи все картинки из папки assets/hero в ImageKit
  • Подпиши загрузку этих файлов, я залью их своим скриптом
  • Проверь через search_media_library, что файлы появились в медиатеке

Как установить upload-files

1Через Skills CLI (Vercel)

npx skills add imagekit-developer/skills --skill upload-files -a claude-code

2Вручную: положить файлы

~/.claude/skills/upload-files/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/upload-files/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о upload-files

Как установить upload-files в Claude Code?

Выполните npx skills add imagekit-developer/skills --skill upload-files -a claude-code, после чего скилл окажется в ~/.claude/skills/upload-files/SKILL.md.

Что делает upload-files?

Помогает агенту загрузить файлы в медиатеку ImageKit через DAM MCP: получает подписи и запускает POST там, где лежит файл, не пересылая его содержимое через диалог.

Почему нельзя передать файл прямо в аргументе инструмента?

Скилл запрещает base64, data URI, буферы и потоки: это тратит токены и ломается на больших файлах. Подпись короткоживущая и одноразовая, поэтому подписывать нужно незадолго до загрузки.

Исходный текст

SKILL.md · MIT
---
name: upload-files
description: "Upload files to the ImageKit media library via DAM MCP. With a shell, use create_upload_signatures_in_bulk for any number of local files or URLs; without one, upload_file (interactive picker); create_upload_signature only when the user runs the upload elsewhere. Never inline file bytes into the conversation."
---

# Upload files

Uploads go through DAM (`https://imagekit.io/mcp/dam`).

**Never put file bytes in the conversation or a tool argument.** No base64, data URIs, Buffers, or streams. That burns tokens and fails for large files.

## How an upload works

An upload is a multipart/form-data POST to ImageKit's upload endpoint, authorized by a short-lived, single-use signature. The DAM server only signs. The file goes straight from where it lives to ImageKit: from the user's machine for a local file, or fetched by ImageKit for a public URL. Your job is to get a signature for each file and make sure the POST runs where the file is.

## Which tool

| Situation | Call |
|-----------|------|
| You can run shell commands in the user's environment (one file or many, local paths or public URLs) | `create_upload_signatures_in_bulk`, then run the returned `uploadCommand`. |
| No shell, and the user wants to pick a file on their computer (the client can show MCP Apps) | `upload_file` with **no parameters**. Opens a picker (filename, folder, tags, custom metadata). |
| The user will run the upload themselves elsewhere and needs the signed form fields | `create_upload_signature`; they POST each file with its `formFields`. |

Prefer `create_upload_signatures_in_bulk` whenever there is a shell, even for a single file: the signed tokens never enter the conversation, and one command uploads everything and reports a status line per file.

If they asked you to write upload code for their app, use `search_docs` — do not upload to their library unless they asked for that.

## `create_upload_signatures_in_bulk`

- Signs 1 to 1,000 entries in one call. Each entry is either a file directly inside one local directory or a public URL, with its own `fileName`, `folder`, and upload fields.
- The tokens are not returned. They stay on the server behind `manifestUrl` until `expire` (60 to 3,600 seconds, default 600). Pass `localDirectory` so the command knows where the local files are.
- Run the returned `uploadCommand` in the user's shell. It changes into the local directory, fetches the manifest, and uploads up to 16 files at a time.
- It prints one line per file: `<status> <name>`. `200` means uploaded. `SKIP <name>` means the name was refused locally (empty, contains `/` or `"`, or starts with `.`).
- Before expiry, re-running the same command retries failed files. Files that already uploaded are rejected, not duplicated. After expiry it prints `manifest unavailable` and uploads nothing, so sign again.
- Treat the manifest URL like a credential: anyone who has it can upload the signed files until it expires. Do not paste it anywhere other than the command.

## `create_upload_signature`

For when the user runs the upload themselves (their own script or another machine). The result contains the signed tokens.

- One call can sign several files: send one entry per file with `fileName`, plus optional `folder`, `tags`, `customMetadata`, and other upload fields. `expire` applies to all of them.
- The result has `uploadUrl` and, per file, `formFields`: the exact fields its signature is bound to, including `token`.
- Each file is POSTed to `uploadUrl` with `file=@<LOCAL_FILE_PATH>`, or `file=<PUBLIC_URL>` to have ImageKit fetch it, plus that file's `formFields` exactly as returned. Adding, removing, or re-serializing fields fails the signature check.
- Tokens are short-lived and single-use. Sign shortly before uploading.

## Procedure

1. Confirm folder, filename, tags, and custom metadata. Fields must already exist (`list_custom_metadata_fields`).
2. Call the tool from the table above.
3. Confirm the files landed with `search_media_library`, the upload responses, or the bulk command's status lines.

## Notes

- Folder is a media-library path starting with `/`, not a local path. Nested folders are created as needed.
- Free plan limits: 25MB images, 100MB videos. Max 100 versions per file.
- To preserve a migrated asset's original creation date, set the reserved `_internal_original_created_datetime` custom metadata key to an ISO 8601 string. It exists only on accounts that enabled the original creation date setting; check `list_custom_metadata_fields` for it (`reserved: true`).

© imagekit-developer · MIT · imagekit-developer/skills

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
upload-insecure-files yaklang Скилл даёт готовый сценарий для проверки безопасности загрузки файлов в веб-приложениях. Он помогает обнаружить обход валидации, уязвимости хранилища и ошибки в фоновых конвертерах. CX Codex +1 3 500установок gws-drive-upload официальный googleworkspace Скилл загружает файл в Google Drive одной командой и сам определяет MIME-тип. Пригодится, когда агент должен положить отчёт или датасет в нужную папку. CX Codex +1 49 300установок experience-ui-bundle-file-upload-generate forcedotcom Настраивает загрузку файлов в React-компонентах Salesforce UI bundle. Помогает связать файлы с ContentVersion и отслеживать прогресс передачи. CX Codex +1 5 200установок catalyst-stratus catalystbyzoho Скилл для работы с объектным хранилищем Catalyst Stratus: загрузка файлов, подписанные ссылки, составная загрузка. Пригодится, если проект хранит файлы в Stratus. CX Codex +1 994установок extension-object-storage caffeinelabs Скилл добавляет в проект хранилище файлов: содержимое лежит вне сети, а бэкенд держит только ссылки на него. Пригодится для галерей изображений, видео и документов. CX Codex +1 28 100установок stitch::upload-to-stitch официальный google-labs-code Скилл отправляет локальные изображения, макеты, разметку и HTML-страницы в проект Stitch напрямую по HTTP в обход ограничений вывода инструментов MCP. CX Codex +1 9 900установок

Из того же набора2

Спонсоры проекта

Компании, которые помогают держать аналитику открытой