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

tiktok — скилл для Claude Code: что делает и как установить

Публикует готовые видео в профиль TikTok или загружает их в черновики через API v2. Скилл запрашивает подтверждение настроек приватности перед каждой отправкой.

Apache-2.0 178 установок ★ 17 обновлён 2026-10-25

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

Что делает tiktok

Скилл работает с TikTok Content Posting API v2 через curl, jq и скрипты Python. Для вызовов требуется действующий токен в переменной $TIKTOK_TOKEN. Профиль проверяется перед отправкой: инструмент получает базовые данные пользователя и сверяет никнейм автора, не пытаясь запрашивать закрытые области видимости вроде чужих подписок или статистики.

Поддерживаются два сценария публикации: прямое размещение в профиле и отправка в черновики TikTok. Локальные файлы MP4 загружаются напрямую, если их вес не превышает 64 МБ. Для удалённых ссылок подходят только прямые HTTPS-адреса на проверенном домене acedata.cloud.

Перед прямым постом скилл вызывает request_action_confirmation. Без подтверждённого OAuth-токена в $TIKTOK_TOKEN вызовы API завершаются ошибкой 401. Параметры приватности, запрет дуэтов или сшиваний агент не выбирает наугад — эти значения передаются строго из подтверждённой карточки.

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

  • опубликовать локальный MP4-файл напрямую в профиль TikTok
  • загрузить смонтированное видео в черновики TikTok для наложения звука в приложении
  • задать параметры приватности, комментариев и дуэтов перед отправкой
  • отслеживать статус обработки видео по publish_id

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

  • Загрузи final_edit.mp4 в черновики моего TikTok
  • Опубликуй видео promo.mp4 в TikTok с выключенными дуэтами
  • Проверь статус обработки видео по publish_id

Как установить tiktok

1Через Skills CLI (Vercel)

npx skills add AceDataCloud/Skills --skill tiktok -a claude-code

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

~/.claude/skills/tiktok/SKILL.md

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

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

Вопросы о tiktok

Как установить tiktok в Claude Code?

Выполните команду npx skills add AceDataCloud/Skills --skill tiktok -a claude-code. Конфигурация сохранится по пути ~/.claude/skills/tiktok/SKILL.md.

Что делает скилл tiktok?

Он отправляет видеоролики в TikTok через официальный API v2. Скилл умеет публиковать ролики на страницу после подтверждения или передавать их в черновики аккаунта.

Какие ограничения действуют для видеофайлов?

Локальный файл MP4 должен весить не более 64 МБ. Загрузка по URL возможна только с прямых HTTPS-адресов поддоменов acedata.cloud.

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

SKILL.md · Apache-2.0
---
name: tiktok
description: Publish a creator's video directly to TikTok after their review and confirmation, or upload it to drafts when requested.
when_to_use: |
  Trigger when the user wants to post a video to their own TikTok account
  or send it to TikTok drafts. For a direct post, show the TikTok publish
  card and use the creator's selected privacy and interaction settings.
  Use the inbox flow only when the user asks for a draft.
connections: [tiktok]
allowed_tools: [Bash, request_action_confirmation]
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "2.4"
---

Call the **TikTok API v2** with `curl + jq`. The user's OAuth bearer token is in
`$TIKTOK_TOKEN`; every call needs `Authorization: Bearer $TIKTOK_TOKEN`. Base
URL: `https://open.tiktokapis.com/v2`.

```bash
T="https://open.tiktokapis.com/v2"; AUTH="Authorization: Bearer $TIKTOK_TOKEN"
```

Responses wrap everything in `{"data":…,"error":{"code","message","log_id"}}`.
**Check `error.code`, not just the HTTP status** — several real failures
(`spam_risk_too_many_posts`, `spam_risk_user_banned_from_posting`,
`reached_active_user_cap`) come back as **HTTP 200** with a non-`ok` code. Show
`error.message` verbatim. `401` / `access_token_invalid` = re-connect TikTok.

## Read the account

```bash
# Basic profile — open_id identifies the user for every posting call
curl -sS -H "$AUTH" "$T/user/info/?fields=open_id,display_name,avatar_url" \
  | jq '.data.user'
```

Follower / like counts, bio, and the user's video list need the **Display API**
scopes (`user.info.stats`, `user.info.profile`, `video.list`), which this app
has not been granted — don't call `/v2/video/list/` or request those fields,
they will fail with `scope_not_authorized`.

## Direct Post to the creator's profile

The production app has passed TikTok's Content Posting API audit. A direct post
publishes to the creator's profile after processing; it is not a draft. Never
choose a privacy level, interaction setting, or disclosure on the creator's
behalf. Never retry an init request while its `publish_id` is processing.

Required sequence:

1. Identify the exact video and its source. Measure its duration and preview
   it. A server-hosted video must use a public, non-redirecting HTTPS URL under
   the verified `acedata.cloud` domain (`PULL_FROM_URL`). A creator-selected
   device-local MP4 may use `FILE_UPLOAD` and must be no larger than 64 MB.
2. Query the selected connection with
   `python3 skills/tiktok/scripts/tiktok.py creator-info`. Check
   `creator_username` against the account the creator named. Copy the current
   nickname, avatar, `privacy_level_options`, interaction restrictions, and
   maximum duration into `request_action_confirmation` with
   `kind: "tiktok.publish"` and the real video preview. Do not invent or
   preselect a privacy option.
3. If cancelled, stop. If confirmed, use exactly the card's returned `title`,
   `privacy_level`, `disable_comment`, `disable_duet`, `disable_stitch`,
   `brand_organic_toggle`, and `brand_content_toggle`. Add `is_aigc: true`
   for AI-generated content and `false` otherwise. For an Ace Data Cloud brand
   promotion, the creator must select the own-brand promotional disclosure.
   Store these values in a temporary JSON file outside the repository.
4. Submit **once** after confirmation, with the exact selected account:

   ```bash
   # Server-hosted video on the verified domain:
   python3 skills/tiktok/scripts/tiktok.py post-url "$VIDEO_URL" \
     --duration-sec "$DURATION" \
     --expected-creator-username "$CONFIRMED_CREATOR_USERNAME" \
     --values-file "$VALUES_JSON" --confirmed

   # Creator-selected device-local MP4:
   python3 skills/tiktok/scripts/tiktok.py post-file video.mp4 \
     --duration-sec "$DURATION" \
     --expected-creator-username "$CONFIRMED_CREATOR_USERNAME" \
     --values-file "$VALUES_JSON" --confirmed
   ```

   Both commands re-query creator info and reject a different account, an
   unavailable privacy level, disabled interactions, or an overlong video.
   Never substitute confirmed fields after this check.
5. Poll the returned `publish_id` with `status` until `PUBLISH_COMPLETE` or a
   terminal failure. Report the actual outcome. An accepted init or successful
   file transfer is not a published post.

## Upload the video to the user's drafts

Use this when the creator explicitly asks for a draft. The video lands in their TikTok **inbox /
drafts**; they open the TikTok app to add caption, sound and privacy, then post.

Required order:

1. Identify the exact video and its source: a creator's device-local file or a
   server-hosted URL under the verified `acedata.cloud` domain. Preview it.
2. Call `request_action_confirmation` with `kind: "generic"`, the real video
   preview, and a summary that says this uploads to drafts rather than publishing.
3. If cancelled, stop. If confirmed, run exactly one upload. For a device-local
   file use `python3 skills/tiktok/scripts/tiktok.py upload video.mp4`. For a
   server-hosted video use
   `python3 skills/tiktok/scripts/tiktok.py upload-url "$VIDEO_URL"`.
4. Poll with `python3 skills/tiktok/scripts/tiktok.py status PUBLISH_ID` until
   terminal. Never call `upload` again while polling.

Two source modes are available. The developer portal verified `acedata.cloud`
on 2026-10-03, covering its subdomains. Server-hosted videos on that domain
must use `PULL_FROM_URL`; use `FILE_UPLOAD` only for a creator's device-local
file. Verify that the exact URL is public HTTPS and does not redirect.

### FILE_UPLOAD (creator device-local file)

Use this only for a file the creator selected from their own device. Files
under 64 MB go up as a single chunk.

```bash
SIZE=$(stat -f%z video.mp4 2>/dev/null || stat -c%s video.mp4)

INIT=$(curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
  -d "$(jq -n --argjson s "$SIZE" \
    '{source_info:{source:"FILE_UPLOAD", video_size:$s, chunk_size:$s, total_chunk_count:1}}')" \
  "$T/post/publish/inbox/video/init/")
echo "$INIT" | jq '{publish_id:.data.publish_id, error:.error.code}'

UPLOAD_URL=$(echo "$INIT" | jq -r '.data.upload_url')
curl -sS -X PUT "$UPLOAD_URL" \
  -H "Content-Type: video/mp4" \
  -H "Content-Length: $SIZE" \
  -H "Content-Range: bytes 0-$((SIZE-1))/$SIZE" \
  --data-binary @video.mp4 -o /dev/null -w '%{http_code}\n'
```

The `PUT` returns **201** when the whole file landed (206 for intermediate
chunks). `upload_url` expires in **1 hour**.

### PULL_FROM_URL (only from a verified domain)

```bash
python3 skills/tiktok/scripts/tiktok.py upload-url "$VIDEO_URL"
```

The helper requires public HTTPS under the verified `acedata.cloud` domain,
`video/mp4`, and no redirects. Domain verification covers subdomains downward.

## Poll status

```bash
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
  -d "$(jq -n --arg id "$PUBLISH_ID" '{publish_id:$id}')" \
  "$T/post/publish/status/fetch/" | jq '.data | {status, fail_reason}'
```

`PROCESSING_UPLOAD` / `PROCESSING_DOWNLOAD` → **`SEND_TO_USER_INBOX`** = done,
the video is waiting in the creator's TikTok inbox. Tell them to open the
TikTok app to finish posting, and that processing takes a few minutes.

Don't retry on `auth_removed`, `spam_risk_text`, `spam_risk`, or
`spam_risk_user_banned_from_posting` — those are terminal. `internal` is
retryable.

## Gotchas

- **Never preselect `privacy_level`** in the confirmation card. The helper
  checks the creator's selection against fresh `privacy_level_options` before
  making the one Direct Post call. Branded content cannot be `SELF_ONLY`.
- Connections made with the former Sandbox app must be reconnected to the
  Production app. If TikTok returns
  `unaudited_client_can_only_post_to_private_accounts`, stop and ask the
  creator to reconnect; do not retry the same post or change its privacy.
- Rate limits per user token: `creator_info/query` 20/min, `video/init/`
  **6/min**, `status/fetch/` 30/min. TikTok also caps posts at roughly 15/day
  per creator, **shared across all apps** — another app can exhaust it.
- `SEND_TO_USER_INBOX` is success for this flow, not an intermediate state.
  Don't wait for `PUBLISH_COMPLETE` — that only happens once the user posts
  from the app.

© acedatacloud · Apache-2.0 · AceDataCloud/Skills

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

Все скиллы по теме «Маркетинг и контент» →
tiktok-script social-media-skills Скилл tiktok-script пишет нативный сценарий TikTok под алгоритм For You Page: хук на первую секунду, удержание, повторные просмотры и поисковые ключевые слова. CX Codex +1 1 600установок tiktok-automation davepoon Скилл tiktok-automation автоматизирует выгрузку видео, публикацию фото и сбор статистики TikTok через Rube MCP и Composio прямо из диалога с агентом. CX Codex +1 140установок tiktok-launch-video Cogny AI Скилл tiktok-launch-video для Claude Code и пяти других платформ генерирует вертикальное 9:16 лаунч-видео через HyperFrames: хук за первую секунду, врезанные субтитры, TikTok-ритм. CX Codex +1 ★ 116звёзд репо tiktok-captions kostja94 Скилл tiktok-captions для Claude Code готовит подписи и сценарии TikTok. Он включается при запросах о публикациях, видео, хештегах и продвижении в TikTok. CX Codex +1 3 000установок tiktok-ads kostja94 Скилл tiktok-ads для Claude Code помогает настроить рекламу в TikTok: выбрать формат объявлений, подготовить креативы 9:16, настроить таргетинг и отслеживание конверсий через TikTok Pixel и Events API. CX Codex +1 1 400установок noti-tiktok-full-text notivn Скилл noti-tiktok-full-text для Claude Code собирает вертикальные TikTok-видео с разбором научных статей через HyperFrames. Включается по стенограмме, иллюстрациям и сканам страниц PDF. CX Codex +1 ★ 147звёзд репо

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

Весь набор →
weibo Скилл weibo работает с вашим аккаунтом 微博 через собственный логин-cookie: покажет последние посты с числами репостов, комментариев и лайков и опубликует новую запись. CX Codex +1 180установок google-sheets Скилл читает и изменяет Google Sheets через Sheets v4 REST API. Он пригодится для работы с ячейками, диапазонами, вкладками и строками из чата с агентом. CX Codex +1 179установок juejin Скилл ведёт ваш аккаунт на Juejin через собственные cookie: показывает статьи с просмотрами и лайками, открывает одну по id и публикует Markdown-черновик. CX Codex +1 179установок microsoft-teams Даёт агенту чтение и отправку сообщений в чатах Microsoft Teams через Microsoft Graph v1.0: список чатов, последние сообщения, отправка с подтверждением. CX Codex +1 178установок google-analytics Скилл для Claude и других агентов: тянет отчёты Google Analytics 4 и список свойств через Analytics API, работая из оболочки на curl и jq. CX Codex +1 177установок google-ads Запрашивает через Google Ads API кампании, группы объявлений, ключевые слова и расходы. Получает данные о кликах и конверсиях для отчётов. CX Codex +1 177установок vercel Скилл проверяет сборки, читает логи ошибок и управляет доменами на Vercel через REST API прямо из чата с агентом. CX Codex +1 176установок bilibili Скилл читает статистику статей в Bilibili и помогает публиковать новые через ваш аккаунт. Для работы нужны cookies входа. CX Codex +1 175установок

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

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