SkillsGrove
SkillsGrove/Vídeo curto e criadores/leecyno1/newma-media-studio/social-auto-upload-bridge

social-auto-upload-bridge

Instalação

$npx skills add https://github.com/leecyno1/newma-media-studio --skill social-auto-upload-bridge
$git clone --depth 1 https://github.com/leecyno1/newma-media-studio.git /tmp/newma-media-studio && mkdir -p ~/.claude/skills && cp -r /tmp/newma-media-studio/skills/social-auto-upload-bridge ~/.claude/skills/social-auto-upload-bridge
Por favor, instale esta Agent Skill para mim: https://github.com/leecyno1/newma-media-studio/tree/1760eda6177fb7a2a566126c889c485e630c03b5/skills/social-auto-upload-bridge. Leia primeiro o SKILL.md e os scripts, e só a instale na minha pasta de skills depois de confirmar que é segura.

Resumo

Descrição original · MITUse when Newma Publish needs a bridge to the external social-auto-upload project for video upload packages across Bilibili, Xiaohongshu, Douyin, Kuaishou, WeChat Channels, Baijiahao, TikTok, or YouTube.
O SKILL.md abaixo é reproduzido de leecyno1/newma-media-studio (commit 1760eda) sob a licença MIT. O texto não foi alterado; apenas os metadados do cabeçalho do arquivo foram omitidos, as imagens são exibidas como links e arquivos muito longos são truncados. Copyright 2026 Newma Media Studio. Licença: LICENSE. Apenas o arquivo de instruções é exibido; consulte o repositório original para ver os scripts.

Social Auto Upload Bridge

Role

Use social-auto-upload as the guarded local video uploader for 小红书、抖音、B站和视频号. It is a project-local upstream dependency kept under vendor/publish/, excluded from the main repository, and independently updateable.

Default root:

${SOCIAL_AUTO_UPLOAD_ROOT:-${DASHENG_PROJECT_ROOT:-.}/vendor/publish/social-auto-upload}

When To Use

  • Publish has a completed video channel_pack.json.
  • The target channel is xiaohongshu_video, douyin_video, bilibili_video, or wechat_channels_video.
  • A completed channel_pack.json contains the final MP4 and platform metadata.
  • The account is represented by an explicit account_name or stable account_slot; default is slot-1.

Inputs

  • channel_pack.json
  • Final MP4 path
  • Title, description, tags, cover if available
  • Platform account/session already configured in the external project

Workflow

  1. Check upstream registry:
    python3 scripts/check_publish_upstreams.py --name social-auto-upload
    
  2. Check local external repo exists and is healthy.
  3. Convert channel_pack.json into the external project's expected upload config.
    python3 scripts/build_video_upload_package.py --channel-pack <channel_pack.json>
    
  4. Build the exact login-check and upload command without publishing:
    python3 scripts/execute_social_auto_upload.py --channel-pack <channel_pack.json>
    
  5. Show the platform, account slot, title, video, cover, schedule and generated command for review.
  6. Only after explicit current-session confirmation run:
    python3 scripts/execute_social_auto_upload.py \
      --channel-pack <channel_pack.json> \
      --confirm-execute
    
  7. The executor must run sau <platform> check --account <account> before upload. Invalid login blocks execution and returns the headed login command.
  8. Write results back under ~/Desktop/自媒体创作/<run_id>/05_发布/channel_packs/... and keep verification as needs_manual_verification until a platform URL or draft ID is recovered.

For two-version, multi-account distribution, build a Campaign first. The campaign owns platform-specific titles, descriptions, tags, covers, activity state and logical-account routing; this bridge only executes each frozen task package:

python3 scripts/build_publish_campaign.py --spec <campaign_spec.json> --output-dir <run_dir>
python3 scripts/publish_accounts.py --check-auth --output <run_dir>/account_auth_report.json
python3 scripts/build_publish_campaign.py --spec <campaign_spec.json> --output-dir <run_dir>
python3 scripts/execute_publish_campaign.py --campaign <run_dir>/publish_campaign.json

Platform Mapping

Newma channel sau platform Notes
xiaohongshu_video xiaohongshu Video, cover, tags and schedule
douyin_video douyin Video, cover, tags and schedule
bilibili_video bilibili Requires platform_notes.tid or category_id
wechat_channels_video tencent Supports short title, category, draft and dual cover hints

Douyin activities are discovered live through OpenCLI when available. Pass platform_notes.activity_selected only after editorial confirmation. Pass platform_notes.declaration only when the exact Douyin option text was explicitly approved; never infer it.

Account Slots

  • platform_notes.account_name has highest priority.
  • platform_notes.account_slot: 1 maps to slot-1; slot 2 maps to slot-2.
  • Login state belongs under ~/Library/Application Support/NewmaPublishSessions/social-auto-upload/cookies/. The ignored upstream cookies/ path is only a symlink to this secure state directory.
  • Login must be performed interactively with the relevant sau <platform> login --account <slot> --headed command.
  • Account aliases, slots and auth methods are registered in configs/publish/account_registry.json; the registry contains no secrets or cookies.
  • Initialize or audit account storage with python3 scripts/publish_accounts.py --init and validate sessions with python3 scripts/publish_accounts.py --check-auth.

Hard Rules

  1. Never copy generated videos or credentials into skills/.
  2. Never commit the nested upstream repository, its .venv, cookies, logs, or browser state into the main repository.
  3. Never execute final publish without explicit current-session confirmation. auto_confirm is not accepted by the guarded executor.
  4. If login, CAPTCHA, cookie, or upload permission fails, export a manual package and mark the execution fallback_export.
  5. Always run Publish Guard or platform-specific verification before reporting success.
  6. A zero CLI exit code means only “upload command completed”; it is not proof of publication.
  7. Use headed mode by default for browser-based platforms to reduce login and anti-bot failures.
  8. Campaign execution requires every primary social_auto_upload account status to be valid; browser state alone is not proof that the CLI session is usable.
  9. Never invent or auto-select a platform activity. Unselected activities remain live_discovery_required.

Upstream

Tracked in:

configs/publish/upstream_repos.json
Ver o texto completo da licença (MIT)
MIT License

Copyright (c) 2026 Newma Media Studio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.