agentleFS
badmoonrbadmoonr/loopilot/skills/douyin-music-library/SKILL.md

douyin-music-library

Skill1 starsChanged 28 days agoApache-2.0View on GitHub

Maintain a reusable, account-scoped local library of music that is selectable in a target Douyin Creator Center publishing account. Use when listing or syncing that account's music picker, importing previously verified Creator Center audio, refreshing availability, or resolving a local music asset for video editing. Enforce account isolation and pause assets that disappear from a complete picker scan while retaining their files and history.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to acquire and maintain reusable music assets before editing.

    line 14
  2. Very specific:

    Use douyin_cdp_music.py list for a read-only picker check, or sync to download missing tracks from the selected tab.

    line 20
  3. Very specific:

    Use manage_music_library.py import-manifest to migrate already verified run assets without downloading them again.

    line 21
  4. Very specific:

    Use manage_music_library.py select before editing.

    line 22
  5. Distinctive:

    Never reuse another account's availability evidence, even when audio hashes match.

    line 46
  6. Distinctive:

    Never persist cookies, headers, tokens, browser-profile contents, or a full signed media URL.

    line 47
  7. Distinctive:

    Never click the music picker's “使用” button, submit a publishing form, or modify a video.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

素材首次入库、同商品资料复用或剪辑前查找背景音乐时,按需读取相邻 reusable-material-library/SKILL.md 及其类型说明。先复用已有理解,再补实际缺口;采用结果交原消费者并回读实际产物。

Douyin Music Library

正式独立运行时遵循任务方案、工作台登记与主动定位:主 Agent 登记真实任务并打开当前聊天对应详情;子阶段沿原任务,后台仅更新数据。此约定不扩大本 Skill 的业务权限。

Use this skill to acquire and maintain reusable music assets before editing. Do not mix audio into video and do not publish.

Workflow

  1. Read references/input-output-contract.md.
  2. Resolve platform_account_uid (the internal Creator Center UID, not the public Douyin ID) from the target account config. Connect only to that account's loopback CDP endpoint, then verify the same-origin read-only identity response before opening the music picker.
  3. Use douyin_cdp_music.py list for a read-only picker check, or sync to download missing tracks from the selected tab.
  4. Use manage_music_library.py import-manifest to migrate already verified run assets without downloading them again.
  5. Use manage_music_library.py select before editing. Continue only when the returned asset has matching account_scope, usage_status=active, rights_review_status=passed, and a valid local sha256.
  6. Refresh availability with a complete picker scan. If a stored track disappears, set usage_status=paused but retain its local file and history. A partial or limited scan must never pause unseen assets.

Commands

python3 scripts/manage_music_library.py import-manifest \
  --source-manifest /abs/path/music_asset_manifest.json \
  --account-id <account_id> \
  --library-root /abs/path/data/account-music-library

python3 scripts/manage_music_library.py select \
  --account-id <account_id> \
  --asset-id <asset_id> \
  --library-root /abs/path/data/account-music-library

python3 scripts/douyin_cdp_music.py list \
  --config-root /abs/path/configs \
  --account-id <account_id> \
  --tab favorites --limit 5

Safety Rules

  • Never reuse another account's availability evidence, even when audio hashes match.
  • Never persist cookies, headers, tokens, browser-profile contents, or a full signed media URL.
  • Download through the authenticated browser context with CDP Network.loadNetworkResource and IO.read; fail closed if unavailable.
  • Accept only a complete response, write to .part, validate bytes, sha256 and audio metadata, then atomically promote it.
  • For batches, process the first item immediately, wait a random 15–30 seconds after each successful item, and stop on the first failure.
  • Never click the music picker's “使用” button, submit a publishing form, or modify a video.

Failure Boundaries

Fail closed on missing or remote CDP endpoints, unauthenticated or mismatched accounts, closed picker, ambiguous media responses, incomplete downloads, invalid audio, account mismatch, paused assets, missing files, or hash drift. Do not fall back to another account, exported cookies, a third-party downloader, or raw unauthenticated HTTP.

Resources

  • Contract: references/input-output-contract.md
  • Persistent library and migration CLI: scripts/manage_music_library.py
  • Creator Center CDP adapter: scripts/douyin_cdp_music.py

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.